need run twice to get right report?
My CR connect to a table called Report_table. I let user to choose order, then
I open a recordset and load data to Report_table and use vb6 code to run report.
I got everything right except: when I run CR first time, I got report in random order(not the order user selected). I close it and select the same thing. THis time I got everything right(in order).
What could be the problem?
Thanks a lot.
Re: need run twice to get right report?
Is the "Save Data With Report" option checked?
Re: need run twice to get right report?
Quote:
Originally Posted by brucevde
Is the "Save Data With Report" option checked?
I checked and still need run twice to get right one.
thank you.
Re: need run twice to get right report?
Sorry, the option should be unchecked. If you are using Crystal's CRAXDRT objects to manipulate the report within VB, the Report object has a DiscardSavedData method.
Re: need run twice to get right report?
Quote:
Originally Posted by brucevde
Sorry, the option should be unchecked. If you are using Crystal's CRAXDRT objects to manipulate the report within VB, the Report object has a DiscardSavedData method.
I added code before .action:
CrystalReport1.DiscardSavedData = True
still have the same problem.