Help in resetting report using TClientDataSet
I have a problem telling RBPro to reset my data after running a report.
Problem setup:
qryX: TIBQuery
dspX: TDataSetProvider
cdsX: TClientDataSet
dsX: TDataSource
ppdbX: TppDBPipeline
ppdbX.Datasource := dsX;
dspX.Dataset := qryX;
cdsX.ProviderName := dspX;
dsX.Dataset := cdsX;
I loop through to get the latest data by resetting the qryX.SQL and
retrieving the report data from the database. The first report prints
the correct data.
THE PROBLEM: After the first report, the TppDBPipeline stil prints the
data from the first report. I've checked the qryX and it retrieved the
latest from by changing qryX.SQL.Text. The cdsX.CancelUpdates is called
too to remove the previous data. The TIBTransaction.RollBack is also
called to flush any previous data.
I've also tried the TppReport.Reset, TppReport.ResetDevice and the
problem still exist.
In the setup:
qryX: TIBQuery
dsX: TDataSource
ppdbX: TppDBPipeline
ppdbX.Datasource := dsX;
dsX.Dataset := qryX;
When I reset my qryX.SQL in a loop to get my report data, the
TppDBPipeline prints the current and correct report data without a
problem.
Any help is appreciated.
Jay Castillo
jay@media-services.com
Problem setup:
qryX: TIBQuery
dspX: TDataSetProvider
cdsX: TClientDataSet
dsX: TDataSource
ppdbX: TppDBPipeline
ppdbX.Datasource := dsX;
dspX.Dataset := qryX;
cdsX.ProviderName := dspX;
dsX.Dataset := cdsX;
I loop through to get the latest data by resetting the qryX.SQL and
retrieving the report data from the database. The first report prints
the correct data.
THE PROBLEM: After the first report, the TppDBPipeline stil prints the
data from the first report. I've checked the qryX and it retrieved the
latest from by changing qryX.SQL.Text. The cdsX.CancelUpdates is called
too to remove the previous data. The TIBTransaction.RollBack is also
called to flush any previous data.
I've also tried the TppReport.Reset, TppReport.ResetDevice and the
problem still exist.
In the setup:
qryX: TIBQuery
dsX: TDataSource
ppdbX: TppDBPipeline
ppdbX.Datasource := dsX;
dsX.Dataset := qryX;
When I reset my qryX.SQL in a loop to get my report data, the
TppDBPipeline prints the current and correct report data without a
problem.
Any help is appreciated.
Jay Castillo
jay@media-services.com
This discussion has been closed.
Comments
Try calling Report.Reset prior to Report.Print. This should force RB to
flush its cached data.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com