Re: Control Preview Form visibility Part II
Jim:
I'm back with my problem. I've tried to do it the way u tell.
I didn't reach the end.It takes me to a lots of other small problems, i have
to control lots of things.
Besides if i can do it in a way that when user tells application to show
report, it's already in memory and it's just put it visible,
why should i make it in a way that when user tells application to show
report, application must load the report and show it.I think it's not the
optimized way to do it.I know it's just a couple seconds, but on the fly
it's the best way.
You wrote:
You aren't gonna want to change the interface section of RB source if
you have RAP.
I don't use RAP, just standard Delphi code.
You wrote:
The TppProducer ancestor provides a PreviewForm property, so you should
be able to set its Visible property.
Yes, but not funcional because you in ppProd.PrintToScreen you call show,
what makes the form visible
I'm back with my problem. I've tried to do it the way u tell.
I didn't reach the end.It takes me to a lots of other small problems, i have
to control lots of things.
Besides if i can do it in a way that when user tells application to show
report, it's already in memory and it's just put it visible,
why should i make it in a way that when user tells application to show
report, application must load the report and show it.I think it's not the
optimized way to do it.I know it's just a couple seconds, but on the fly
it's the best way.
You wrote:
You aren't gonna want to change the interface section of RB source if
you have RAP.
I don't use RAP, just standard Delphi code.
You wrote:
The TppProducer ancestor provides a PreviewForm property, so you should
be able to set its Visible property.
Yes, but not funcional because you in ppProd.PrintToScreen you call show,
what makes the form visible
This discussion has been closed.
Comments
Report.CachePages = True. Then interact with the user, then call report
print method.
uses
ppTypes, ppDevice;
procedure TForm1.Button1Click(Sender: TObject);
var
lDevice: TppScreenDevice;
begin
ppReport1.CachePages := True;
lDevice := TppScreenDevice.Create(Self);
lDevice.PageSetting := psAll;
lDevice.Publisher := ppReport1.Publisher;
ppReport1.PrintToDevices;
ShowMessage('Get User Selection');
ppReport1.Print;
lDevice.Free;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com