Dyanmic RAP (single pass)
Hello,
I am using report builder in an application to create normal reports ie.
that are like tables this is not a problem. I have then reports that are
job cards each job card can run to 10 pages and they are printed by 10-
200 job cards at a time (so giving a range of pages between 100-2000)
the structure of the report is as follows ...
Job card 1 : pages 2-7
Job Card 2 : page 8-15
Job card 3 : pages 16-21
etc. etc.
I trigger certain RAP code linked to conditions on certain pages eg. on
page 9 I have a data that changes the pagelayout, this is then reset at
page 15 ie. the start of the next job card, this works fine when moving
forward or directly print ie. always work from page 1 to n. The problem
I have if a user navigates back and forward then the state of the page
layout can be incorrect and similarly if the user previews/navigates
then prints.
My question is then I think I can fire the RAP just on say first pass so
would always work 1..n but if I stop it firing on preview and print the
page layout won't be correct either ie it will never change as the RAP
event won't fire.
Is it possible to create a dynamic report on an initial pass then fix
the report for subsequent preview/print ?
and if so how ?
Many thanks
Alex
--- posted by geoForum on http://delphi.newswhat.com
I am using report builder in an application to create normal reports ie.
that are like tables this is not a problem. I have then reports that are
job cards each job card can run to 10 pages and they are printed by 10-
200 job cards at a time (so giving a range of pages between 100-2000)
the structure of the report is as follows ...
Job card 1 : pages 2-7
Job Card 2 : page 8-15
Job card 3 : pages 16-21
etc. etc.
I trigger certain RAP code linked to conditions on certain pages eg. on
page 9 I have a data that changes the pagelayout, this is then reset at
page 15 ie. the start of the next job card, this works fine when moving
forward or directly print ie. always work from page 1 to n. The problem
I have if a user navigates back and forward then the state of the page
layout can be incorrect and similarly if the user previews/navigates
then prints.
My question is then I think I can fire the RAP just on say first pass so
would always work 1..n but if I stop it firing on preview and print the
page layout won't be correct either ie it will never change as the RAP
event won't fire.
Is it possible to create a dynamic report on an initial pass then fix
the report for subsequent preview/print ?
and if so how ?
Many thanks
Alex
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
Try setting Report.CachePages to True and in your event-handler code check
if Report.FirstPass then
begin
end;
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com