BernieBeattie
Programmer
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
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