473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to Crystal report use in php?

57
hi

i use following codes. here crystal report open in pdf format.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php 
  3.  
  4. //- Variables - for your RPT and PDF 
  5. //echo "Print Report Test"; 
  6. $my_report = "D:\\Program Fiels\\xampp\\htdocs\\RPT\\RPT-list.rpt"; // 
  7. //rpt source file 
  8. $my_pdf = "D:\\Program Fiels\\xampp\\htdocs\\RPT\\RPT-list.pdf"; // RPT export to pdf file 
  9. //-Create new COM object-depends on your Crystal Report version 
  10. $ObjectFactory= new COM("CrystalReports10.ObjectFactory.1") or die ("Error on load"); // call COM port 
  11. $crapp = $ObjectFactory-> CreateObject("CrystalRuntime.Application.10"); // create an instance for Crystal 
  12. $creport = $crapp->OpenReport($my_report, 1); // call rpt report 
  13.  
  14. // to refresh data before 
  15.  
  16. //- Set database logon info - must have 
  17. $creport->Database->Tables(1)->SetLogOnInfo("servername", "username", "password", "databasename"); 
  18. //- field prompt or else report will hang - to get through 
  19. $creport->EnableParameterPrompting = 0; 
  20.  
  21. //- DiscardSavedData - to refresh then read records 
  22. $creport->DiscardSavedData; 
  23. $creport->ReadRecords(); 
  24.  
  25.  
  26. //export to PDF process 
  27. $creport->ExportOptions->DiskFileName=$my_pdf; //export to pdf 
  28. $creport->ExportOptions->PDFExportAllPages=true; 
  29. $creport->ExportOptions->DestinationType=1; // export to file 
  30. $creport->ExportOptions->FormatType=31; // PDF type 
  31. $creport->Export(false); 
  32.  
  33. //------ Release the variables ------ 
  34. $creport = null; 
  35. $crapp = null; 
  36. $ObjectFactory = null; 
  37.  
  38.  
  39.  
  40. ?> 
  41.  
  42.  
But i want to crystal report data open in web browser(ie). Crystal report parameter passing through php script. Is it Possible. Please help me.
Jun 17 '10 #1
3 22704
Hi,

I have the same problem, you got any solution?
Sep 21 '10 #2
naeemulhaq07
1 Bit
just add these line at the end

print "<embed src=\"C:\\xampp\\htdocs\\test.pdf\" width=\"100%\" height=\"100%\">"
Nov 29 '22 #3
Vanisha
25 16bit
Crystal Reports is a popular reporting tool that allows users to create and design reports using various data sources. While it is primarily designed for use with Microsoft technologies, it is also possible to use Crystal Reports with PHP. Here's a high-level overview of how to use Crystal Reports in PHP:
Install Crystal Reports
Connect to a Data Source
Create a Report
Export the Report
Use the Report in PHP
Join PHP Online Course
Here are some additional resources to help you get started with using Crystal Reports in PHP:
Crystal Reports PHP Integration Guide
PHP Crystal Reports
Using Crystal Reports in PHP
Feb 15 '23 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
2
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
2
by: Karun Karunakaran | last post by:
Hi, I am using the Crystal Enterprise .NET assemblies to generate and display a crystal report in a webform. This report connects to an SQL server (running locally) using a specific username and...
1
by: bthomas71chevy | last post by:
I have just setup a WebServer and all the applications work fine, but when every any of the applications try to generate a Crystal Report the page errors out. "File or assembly name...
2
by: aldous scotch | last post by:
I designed a Crystal Report .rpt from within Microsoft Development Environment 2003 Version 7.1.3088 (VB .NET IDE). I selected database fields from the left side Field Explorer onto the Details...
0
by: Ray | last post by:
Dear all, I have some questions about the Crystal Report and vb.net 2003. 1. I have installed the crystal report 10 and vs.net 2003. Should I update the crystal report within the vb.net so as to...
2
by: Jason Huang | last post by:
Hi, The Crystal Report bundled with .Net 2003 is version 9. How do I update the Crystal Report V9 in my .Net 2003 to Version 11 so that whenever I open a .rpt file in my VS 2003, the Crystal...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.