Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Crystl32.ocx to export to Excel sheet

Status
Not open for further replies.

Klutch

Programmer
Nov 3, 2000
12
US
I am using the Crystal ActiveX control through VB. The version of Crystal is 7.0. The version of VB is 6.0.

When the "PrintFileType" property of the ActiveX control is set to "crptExcel50", the spreadsheet that is created from the "Action=1" command contains about half of the records (or spreadsheet lines) that should be there. In other words, half of the records that get outputted if the rpt is run outside of the VB code. Also, when the rpt is run outside the VB code, I have no problem hand exporting the output to a Excel 8 spreadsheet.

The Crystl32.ocx file has a date of 11/8/98 on it. Perhaps that accounts for the highest output version of 5 for Excel. When the Crystal Report window displays the results of running the rpt and then exporting the data (throught the VB code), it claims that all records have been exported.

Is there a property I can set to solve this problem? Is it possible to retrieve a new OCX file? Please help

Karl
k.monster@usa.net
 
Hi,

When I am doing the same steps with CR 6.0 and VB 6.0, I am not getting any output. Please let me know I am doing something wrong.
 
I ended up working extensively with Seagate to solve this problem. The problem was that the ActiveX control does not output above Excel version 5. But, the Crystal Reports Engine does. Excel 5 can only handle 16,500 lines in a spreadsheet.

So, I had to write special VB code to use the Crystal Reports engine. The Crystal Reports print engine is like the assembler code of using Crystal Reports from an application. You have to do a lot to make it work but it works!

If you want to post your code, I might be able to tell what you are doing wrong. You can e-mail it to me a k.monster@usa.net too, if you would like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top