Hi All,
Does anyone out there know how to implement the "Crystal Report Viewer" (CR 11) using PHP?
After doing some research I know how to generate a report and display it as a PDF file, but some of the reports we've been asked for require the CR Viewer (to fetch parameters). Further research lead me to believe that the only way to implement the Viewer is via ActiveX (GAK!) or Java Beans. I'm new to both CR and Java and would like to find a way to avoid reading the 500 pages of (decidely biased) documentation that CR has, so if anyone out there has a useful code snipet or link to a tutorial or something similar, please help asap!
Thanks!
Mitch
using Crystal Report Viewer in PHP
Moderator: General Moderators
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
Try using COM
Hope this will help you.
regards,
Dibyendra
Code: Select all
$cr=new com("Crystal.CRPE.Application") or die("cannot load cr com");
$rn="reports/report1.rpt";
$rap=$cr->OpenReport($rn);regards,
Dibyendra
Using COM objects will access the report, but not open it in the Crystal Report Viewer. (The "OpenReport" method only accesses the report, i.e. creates an object reference to the report, it doesn't display the report). I couldn't find anything in the reference documentation for the report object that indicated any way to display or view the report other than exporting it to another format first. This is fine for simple reports, but it doesn't work for reports that require additional paramteres. We want to use the Viewer to avoid having to code the pages involved in prompting the user for parameter values. But, as I mentioned, the only way to do this, according to the Crystal Reports documentation, is with Java Beans or ActiveX. I'm hoping there's someone out there who's already done this so I don't have to reinvent the wheel. Anyone?!?
Thanks!
Mitch
Thanks!
Mitch
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
May this link will help you to achieve your requirements. They have done on php-gtk and focused on crystal reports as well.
http://datavision.sourceforge.net/
Dibyendra
http://datavision.sourceforge.net/
Dibyendra