Home >php教程 >php手册 >grid++report combined with thinkphp printing

grid++report combined with thinkphp printing

WBOY
WBOYOriginal
2016-12-01 00:00:182262browse

Grid++Report can be used to develop desktop C/S reports and WEB reports (B/S reports). C/S report development is suitable for VB.NET, C#, VB, VC, Delphi, etc. WEB report development is suitable for ASP, ASP.NET, JSP/Java, PHP, thinkphp, etc., and supports all WEB servers and databases. Developing desktop reports and WEB reports share the same development knowledge and resources, greatly improving report development efficiency.
You must first understand grid++report
Controller code // Set report data and you can develop it yourself here <br>          $orderArray ['EmployeeID'] = '01';<br>         $orderArray ['Title'] = 'Manager';<br>         $orderArray ['name'] = 'Zhang San';<br> ​​​​<br> ​​​​//The data format to be obtained in the report<br>         $xmlReportData = get_reports_xml_byarray ( $orderArray );<br>         $this->assign ( 'xmlReportData', $xmlReportData );<br>              // Report file to be printed<br>          $reportName = '1f.grf';<br>          $this->assign ( 'reportName', $reportName );<br> <br>                          $this->display();Front-end code<html><br> <br> <head><br>                                                                                             <script src="__public__/grid/CreateControl.js" type="text/javascript"></script><br> </head><br> <br> <body><br> <br>                                                                                  <button type="button" onclick="printView();" class="button button-danger">Print report</button><br>                                                                                                 <a href="http://weixin.gsjfjt.com/demo_qyh/grinstall/grbsctl6.exe">Download plug-in</a><br>           <script type="text/javascript"><br> //Print report function Create report object<br> ​​​​​CreateReport("Report");<br>                function printView() {<br>                                                                                                                                                                                                                                                                                        to read the report template<br>                  Report.LoadFromURL("__public__/grf/{$reportName}");<br> //Load report data<br>                  Report.LoadDataFromXML("{$xmlReportData}");<br>                                                                                                                 Report.PrintPreview(true);<br>              };<br>                                                                                          </body><br> </html><br>Consult QQ: 409077741<br> <br> http://weixin.gsjfjt.com/demo_qyh/index.php/Home/Grid<br> <br>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn