Resetting Report for new values.
Sorry I think I went brain dead.
I have Delphi 5, Reportbuilder 6.x
The report runs fine the first time, but when I change values in the data
set and rerun the report
it still has the previous data. I tried doing report.reset but to no
avail.
I know it is something simple, but I guess I can't see the tree for the
forest.
Thanks for any help.
--
Walt Kersten
Walt@wkersoft.com
I have Delphi 5, Reportbuilder 6.x
The report runs fine the first time, but when I change values in the data
set and rerun the report
it still has the previous data. I tried doing report.reset but to no
avail.
I know it is something simple, but I guess I can't see the tree for the
forest.
Thanks for any help.
--
Walt Kersten
Walt@wkersoft.com
This discussion has been closed.
Comments
try 'Report.Engine.Reset'.
HTH,
Chris Ueberall;
It seems that if I close the form and then go back I can get report to print
with new values the first time.. but then
it retains those values until I close the form.
--
Walt Kersten
Walt@wkersoft.com
I don't know how you are changing the data, can you refresh your dataset
components before calling 'Reset'?
HTH,
Chris Ueberall;
I have a form ... I added a report. (no pipeline)
Listbox.
Button (called Print)
Double click on report .... setup query for table, ect and sort .
I run the program ...
I select the data in the list box that I want created.
when I click on print ... the table is emptied of previous data ... and new
data is inserted.
The report should then display the data. (it does the first time)
If I then select (from the list box) other data .... the table is emptied
and the new data is inserted.
But the report still shows. the old data.
Note :
if I add a dbpipeline to the form and associate to the report then the data
does change on new selection but the sorting is all wrong.
I must be missing something ... I,m sure this is extremely simple.
Buy the way RB is the greatest invention since the wheel.
--
Walt Kersten
Walt@wkersoft.com
to reretrieve data. Here is a method which will accomplish this for you. You
still should call Report.Reset, especially if you are caching pages.
procedure RefreshDataForReport(aReport: TppReport);
begin
lModule := daGetDataModule(aReport);
for liIndex := 0 to lModule.DataViewCount - 1 do
lModule.DataViews[liIndex].OutOfSync;
end;
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
What type is lModule.
I have searched for daGetDataModule with no results.
Do I need to add something to my uses clause.
--
Walt Kersten
Walt@wkersoft.com
"Alexander Kramnik (Digital Metaphors)" wrote
uses daDataModule;
regards,
Chris Ueberall;
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com