Drilldown, show dialog, change data, need to redraw report when close dialog
I'm using Drilldown capability. Dialog pops up when click on detail line
item.
Then user can change data that changes the report.
When dialog closes, how do I redraw the report?
How do I tell preview to move to a given page?
Here's my current code:
procedure TDMJobListingReport.regDetailDrawCommandClick(Sender,
aDrawCommand: TObject);
var
tmp : integer;
begin
with TfrmJobPromisedCalendarDataEntry.Create (nil) do // form for data
entry
try
if execute (TppDrawCommand (aDrawCommand).Tag)
then
begin
tmp := rbReport.AbsolutePageNo;
DSetCalendarDetail.Requery;
rbReport.Engine.Reset;
rbReport.Print;
rbReport.AbsolutePageNo := tmp; // this won't compile because
AbsolutePageNo is readonly...
end;
finally
free;
end;
end;
item.
Then user can change data that changes the report.
When dialog closes, how do I redraw the report?
How do I tell preview to move to a given page?
Here's my current code:
procedure TDMJobListingReport.regDetailDrawCommandClick(Sender,
aDrawCommand: TObject);
var
tmp : integer;
begin
with TfrmJobPromisedCalendarDataEntry.Create (nil) do // form for data
entry
try
if execute (TppDrawCommand (aDrawCommand).Tag)
then
begin
tmp := rbReport.AbsolutePageNo;
DSetCalendarDetail.Requery;
rbReport.Engine.Reset;
rbReport.Print;
rbReport.AbsolutePageNo := tmp; // this won't compile because
AbsolutePageNo is readonly...
end;
finally
free;
end;
end;
This discussion has been closed.
Comments
TppDesigner to show the report on the screen.
I'm now using designer.view.regenerateReport and all looks good.
Sorry about the wasted msgs.
I use a TppDesigner report to show the report on-screen... Do, now my code
is like this: