Designer not resetting report
I have a ppdesigner with the following in the OnShow event
TppDesignerWindow(ppDesigner1.Form).Notebook.SelectNextPage(True
);
TppDesignerWindow(ppDesigner1.Form).pgcDesigner.ActivePageIndex
:= 1;
This works fine and show the preview by default but the report
on gets generated once, every subsequent call to
ppdesigner.showmodal shows the same report even though the query
to which it is linked has been changed.
I have tried, ppdetailband.reset. ppreport.reset
(ppdesigner.reset doesn't exist) which seem to do nothing. Only
if the user clicks design and back to preview does it regenerate
the report with the current results of the query.
TppDesignerWindow(ppDesigner1.Form).Notebook.SelectNextPage(True
);
TppDesignerWindow(ppDesigner1.Form).pgcDesigner.ActivePageIndex
:= 1;
This works fine and show the preview by default but the report
on gets generated once, every subsequent call to
ppdesigner.showmodal shows the same report even though the query
to which it is linked has been changed.
I have tried, ppdetailband.reset. ppreport.reset
(ppdesigner.reset doesn't exist) which seem to do nothing. Only
if the user clicks design and back to preview does it regenerate
the report with the current results of the query.
This discussion has been closed.
Comments
The reason you are not getting the new report is probably due to the fact
that you are not regenerating a new report before calling the
Designer.ShowModal. ReportBuilder was not necessarily designed to work this
way but there are a couple things to try:
1. Before calling ppDesigner.ShowModal again, call ppReport.PrintToDevices;
2. Before calling ppDesigner.ShowModal, try setting
NoteBook.SelectNextPage(False) then True again.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com