Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call a Crystal Report
Message
From
29/11/2001 06:36:44
Fausto Garcia
Independent Developer
Lima, Peru
 
 
To
28/11/2001 09:16:10
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00586914
Message ID:
00587391
Views:
31
In addition to Keith's I would like to contribute with another idea. What we do at work is use the Crystal Reports ActiveX control (CRYSTL32.OCX) to open a RPT and print it out directly to the user's PC default printer or direct the output to a window from where they can visualize the report before printing it and even export the report to a different format (Excel, HTML, etc.). Our RPTs are all associated to free DBF tables using a DSN that points to the Visual FoxPro ODBC driver. So what our apps do is:

1. Open the DBFs associated with the RPT, ZAP them and load the appropiate data into them (free tables reside on every user's PC to prevent concurrent access problems).
2. Then instantiate the control and put it to work. Here is a bunch of sample code:
...
loCR = CreateObject("Crystal.CrystalReport")
loCR.ReportFileName = "C:\YourApp\Reports\YourRpt.Rpt" && Your RPT fullname
loCR.Destination = 0 && 0: window; 1: printer
loCR.WindowState = 2 && Maximize control's window
lnResult = loCR.PrintReport
IF lnResult <> 0 THEN
   && Something went wrong
ELSE
   && It worked out fine !
ENDIF
...
When the control shows up you you will see the toolbar that allows you to do the print, refresh and export stuff. Also note that you will need to distribute a group of runtime files to every user PC to have this approach working (what file formats and destinations you have available for exporting also depends on the presence of specific DLLs); for testing purposes you can try it on your development PC -which has Crystal Reports installed I assume.

AFAIK you can also generate executable RPTs, check your CR documentation and let us know if we can be of service to give you more information :)

Hope this helps!
Solo se que nada se

Fausto J. Garcia Pino - MCSD.NET
.NET, Oracle, Tronador & Fondismo!
Previous
Reply
Map
View

Click here to load this message in the networking platform