Traversing multi-page width report in Viewer
Hi All
In setting up a report that is 2 page widths wide,
I set up a report w/ 2 child subreports and just let
the 1st page width generate first, then the second.
Th report generally isn't long but I would like to
somehow control the tppViewer pagination
to jump to the appropriate 2nd page width.
Example:
8 pages * 2 widths = 16 page report total
paging fwd from page 1 will go to page 9, to page 2
2 to 10, etc. Paging Bwd will traverse the opposite.
I saw your spreadsheet method in code but I am using
6.03 and D5. Can I just manipulate the Viewer paging
mechanisms to do what I want?
Thank you
Bill Lawler
The Elite Group
In setting up a report that is 2 page widths wide,
I set up a report w/ 2 child subreports and just let
the 1st page width generate first, then the second.
Th report generally isn't long but I would like to
somehow control the tppViewer pagination
to jump to the appropriate 2nd page width.
Example:
8 pages * 2 widths = 16 page report total
paging fwd from page 1 will go to page 9, to page 2
2 to 10, etc. Paging Bwd will traverse the opposite.
I saw your spreadsheet method in code but I am using
6.03 and D5. Can I just manipulate the Viewer paging
mechanisms to do what I want?
Thank you
Bill Lawler
The Elite Group
This discussion has been closed.
Comments
(which I think was in 6.x, but I don't recall) on the page and have total
control of how it views/behaves.
Ed Dressel
Team DM
I placed a Viewer on the form and assigned the report to it.
How do I control the pagination now. I tried using to GotoPage
method od the viewer like this...
if ppReport5.PageNo > (ppReport5.PageCount div 2) then
ppViewer1.GotoPage((ppReport5.PageCount div 2)-1)
else
ppViewer1.GotoPage((ppReport5.PageCount div 2) + ppReport5.PageNo);
But I get no movement other than +1/-1 paging (the default behaviour)
Can you provide any ideas?
Thank you
Bill
if lViewer.ArchivePageNo < lTargetPageNu then
begin
while (lViewer.ArchivePageNo < lViewer.ArchivePageCount) and
(lViewer.ArchivePageNo < lTargetPageNu) do
begin
lPageNumber := lViewer.ArchivePageNo;
ppViewer.NextPage;
if lPageNumber = lViewer.ArchivePageNo then
break;
end;
end
else
if lViewer.ArchivePageNo > lTargetPageNu then
begin
while (lViewer.ArchivePageNo > 1) and
(lViewer.ArchivePageNo > lTargetPageNu) do
begin
lPageNumber := lViewer.ArchivePageNo;
ppViewer.PriorPage;
if lPageNumber = lViewer.ArchivePageNo then
break;
end;
end;
end;
Ed Dressel
Team DM
remains the same--witha few changes ;-)
HTH,
Ed Dressel
Team DM