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

Crystal XI RDC problem

Status
Not open for further replies.

BernieBeattie

Programmer
Nov 29, 2002
22
0
0
GB
I have a report which works perfectly when running through full Crystal reports but selects no data when running through the viewer. It's only a problem with a particular data condition of a record belonging to category stored in another table which in turn belongs to a group in a third table. It runs fine through the viewer when the record belongs to a category which doesn't belong to a group in the other table. All the joins are Left Outer.

In debug, saving the report just before it calls the viewer and running the saved report in full Crystal works as expected. This proves it's not a problem with the report manipulation done in my VFP code.

Has anyone had similar problems or any ideas how to fix it?

The VFP code that runs the report looks like this:
oCrystal = Createobject("CrystalRuntime.Application")
oReport = oCrystal.OpenReport(o_path[7]+File_name)
If oReport.HasSavedData
oReport.DiscardSavedData()
Endif
Thisform.s_modifycrystalreport(oReport, o_forms_id)
***saved here and that runs fine via full Crystal
oReport.readrecords
If oReport.printingstatus.numberofrecordselected=0
**always comes in here with particular data condition
Wait Window "No records found" Nowait
Else
**calls separate viewer form with report
endif

Thanks

Bernie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top