Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Report - Passing Structures To Print Functions
Message
From
01/07/1999 09:30:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Crystal Report - Passing Structures To Print Functions
Miscellaneous
Thread ID:
00236412
Message ID:
00236412
Views:
81
I have been working with VFP and Crystal Reports for a couple of months. In that time I have found some of the same issues documented on this site. For those of you interested, I also found a work around for connecting to VFP via ODBC. I have also found a way to make the printouts faster.

Work around for ODBC...
Rather than connecting to your VFP table via ODBC copy your data to a Foxpro 2.6 format. You can connect to it with Crystal Reports without ODBC. It is faster to copy to a 2.6 structure. COPY TO [Filename] TYPE FOX2X, once you create the structure you can append directly into it in the future.

Make Printouts Faster...
I started working with the Crystal Report OCX, but found it slow. I have recetly switched to the Crystal Report API (CRPE32.DLL). You can open and send printouts as much as twice as fast as connecting to the OCX.

My Problem...
When using the Crystal Report API can do almost everthing except pass a structure to a function. The function PEOutputToPrinter requires a PEPrintOptions structure to control things like page range, number of copies, collation, etc. I understand I have to pass the structure as a string but Im not sure about the conversion. The Structure is as follows:

struct PEPrintOptions
{WORD StructSize;
unsigned short startPageN,
stopPageN;
unsigned short nReportCopiues;
unsigned short collation;
chr outputFileName [PE_FILE_PATH_LEN];};

I have looked at the clshelp.prg file and understand some of the conversions, but I still don't understand the entire process.

Thanks For The Help
Mark Parker
MAP Software, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform