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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports Ignoring Records

Status
Not open for further replies.

rgh

Programmer
Feb 2, 2000
33
GB
Hi,

I am using the Crystal Reports Control (crystal32.ocx) to view a crystal report within VB. I am dumping the data for the report out to an access database and then calling the crystal report to show the data. The first time I run the program all the 5 records are displayed. If I then run the report again, without exiting the form or changing the query, one of the records is missing, yet the record is in the data that is output. Below is the code that I use to call the report. If I put a msgbox in the routine code below just beofre the .rest then the report works fine.

Any ideas?

Richard.

rptCompBusBreakdown.Reset
rptCompBusBreakdown.ReportFileName = c:\reports\CompanyBusinessBreakdown.rpt"
rptCompBusBreakdown.DataFiles(0) = "c:\reporst\user.mdb"
rptCompBusBreakdown.PrinterDriver = Printer.DeviceName
rptCompBusBreakdown.Destination = 0

rptCompBusBreakdown.Action = 1
 
I am having a similar problem using Crystal Reports Data Object (CR 7 Pro & VB6). Did you find a solution? Colin Chevrier
Colin_Chevrier@dmr.ca

 
Yes,

In the VB App that we use we do all out processing in VB code and write out a temporary access database that Crystal reports then uses for the report. We use a global connection to this database which always remains open. To sort out the problem I closed the connection to this database prior to showing the report and then opened the connection again after the report is displayed.

Hope this helps,


Richard.
 
Thanks. Our app uses the Crystal Reports Data object so our situation is a little different. I did manage to solve the problem though. The 2D array was of type Variant so I changed it to a string array.
Colin Chevrier
Colin_Chevrier@dmr.ca

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top