Upgrade from rb7 to rb10, report can't go back to page 1
Greetings,
I just upgraded from RB 7.03 Std to RB10.0 Std. (I needed the PDF export
capability)
Now one of my other applications is having problems. I have a custom preview
form with a
TppOutlineViewer on it. When printing grouped reports, page 1 does not show
up correctly
in multiple page reports that contain more than 1 group. Also, no matter
what grouping is
selected, the first record of the first page of each group is actually a
duplicate of the last record.
So if the records are passed as "Adams, Davis, Lynn, Roberts" the output on
page 1 is :
"Roberts, Davis, Lynn, Roberts" no matter how many or which groups are
selected.
Remaining pages are in the correct order.
And of course, the report was "working just fine in the prior version" blah
blah blah....
Here are some cases where the report works and does not work:
Works fine:
If the report has only 1 page
If the report has only 1 group that crosses multiple pages
Doesn't work
If the report has more than 1 group
Things I have tried to fix this:
1) It doesn't matter how many records or pages are in the report as long
as there are at least 2 records and 2 groups to trigger the failure.
2) It doesn't matter if I turn off or on the ppGroup1.NewPage property.
3) I also checked (multiple times) the records going into the report by
exporting them
to a table based on an exact copy of the SQL statement that fills the
report, and they
are in the correct order with no known issues.
4) I have also tried printing directly without the preview.
I included an attachment with 2 previews in the jpg.
The top is the start of a correct display of page 2.
The bottom is the corrupt display of page 1. Note that Jonathan Seltzer is
actually
the last camper from Bunk 3.
Any ideas?
I need to nail this down and start building a new release.
This upgrade to RB10 is kicking my butt and I am considering going back to
7.03.
Thanks,
Scott Lynn
I just upgraded from RB 7.03 Std to RB10.0 Std. (I needed the PDF export
capability)
Now one of my other applications is having problems. I have a custom preview
form with a
TppOutlineViewer on it. When printing grouped reports, page 1 does not show
up correctly
in multiple page reports that contain more than 1 group. Also, no matter
what grouping is
selected, the first record of the first page of each group is actually a
duplicate of the last record.
So if the records are passed as "Adams, Davis, Lynn, Roberts" the output on
page 1 is :
"Roberts, Davis, Lynn, Roberts" no matter how many or which groups are
selected.
Remaining pages are in the correct order.
And of course, the report was "working just fine in the prior version" blah
blah blah....
Here are some cases where the report works and does not work:
Works fine:
If the report has only 1 page
If the report has only 1 group that crosses multiple pages
Doesn't work
If the report has more than 1 group
Things I have tried to fix this:
1) It doesn't matter how many records or pages are in the report as long
as there are at least 2 records and 2 groups to trigger the failure.
2) It doesn't matter if I turn off or on the ppGroup1.NewPage property.
3) I also checked (multiple times) the records going into the report by
exporting them
to a table based on an exact copy of the SQL statement that fills the
report, and they
are in the correct order with no known issues.
4) I have also tried printing directly without the preview.
I included an attachment with 2 previews in the jpg.
The top is the start of a correct display of page 2.
The bottom is the corrupt display of page 1. Note that Jonathan Seltzer is
actually
the last camper from Bunk 3.
Any ideas?
I need to nail this down and start building a new release.
This upgrade to RB10 is kicking my butt and I am considering going back to
7.03.
Thanks,
Scott Lynn
This discussion has been closed.
Comments
1. Please do not post attachments to the newsgroups. Email to
support@digital-metaphors.com.
2. As a test try running the report with the default previewer.
We are not aware of any compatibility issues with running reports created by
RB 7.x. RB 10 does not contain any changes to the report engine, only a few
bug fixes, but that is all. RB 9 included bug fixes and support for new
features such as Anchors and Borders, but these were primarily additions,
not changes to the report engine itself. We have had a large number of
customers update from RB 7 to RB 9 in the past year and half, and now have
many moving to RB 10, but we have not heard of issues with reports not
running correctly. I can only think of a couple cases, that had to do with
the use of ShiftWithParent, are you using that feature?
Have you tested other reports? Do they work correctly? Can you create test
case that we can run here? If so please email in zip format to
support@digital-metaphors.com.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Sorry about the attachment.
With further work, I have isolated the problem some more.
I am only seeing this issue on reports where I use bookmarks to filter
the records. Here is my code for bookmark filtering :
BookmarkList := TList.Create;
REnrollmentSummary.ppRLA.First;
while not REnrollmentSummary.ppRLA.EOF do begin
if TestRecordForInclusion() then begin
BookmarkList.Add(Pointer(REnrollmentSummary.ppRLA.GetBookmark));
end;
REnrollmentSummary.ppRLA.Next;
end;
REnrollmentSummary.ppRLA.First;
// Old way of freeing bookmarks, I switched to ClearBookmarkList since it
was in RB10 demo
// REnrollmentSummary.ppRLA.FreeBookmarks;
REnrollmentSummary.ppRLA.ClearBookmarkList;
for i := 0 to BookmarkList.Count-1 do begin
REnrollmentSummary.ppRLA.AddBookmark(Integer(BookmarkList[i]));
end;
BookmarkList.Free;
If I comment out the following lines from the end of the snippet, the record
order and
pagination is correct, of course, I don't get the extra filtering, but these
lines seem to
be related to the problem:
REnrollmentSummary.ppRLA.ClearBookmarkList;
for i := 0 to BookmarkList.Count-1 do begin
REnrollmentSummary.ppRLA.AddBookmark(Integer(BookmarkList[i]));
end;
I have tried type-casting to Longint as in the RB example.
Another wierd note, if I remove the REnrollmentSummary.ppRLA.First line
before adding the bookmask, I get another phantom page instead of the
corrupt page 1.
Am I getting closer to fixing this thing?
Your help is appreciated.
Scott Lynn
I will post the solution here when I receive it.
It appears that the page 1 display is only corrupted when the
report reaches the last page. So Two-Pass reports automically
corrupt the first page, and the first page is only corrupted on
a one-pass report when you page down to the last page and then
return to the first. Also, when the report is run multiple times
in one application, you only see the corruption on the first
preview/print.
Looking forward to hearing from you,
Scott Lynn
Thanks for sending the examples - that was a huge help.
This is fixed for RB 10.01.
This bug was isolated to a very specific case involving DataPipeline
bookmark traversal.
In the example, you open the DataSet and then have a loop that traverses the
DataPipeline and calls DataPipeline.Getbookmark. If you call
DataPipeline.Open rather than Dataset.Open the code will work. There was a
bug fix related change to the DataPipeline that caused
DataPipeline.GetBookmark to return 0 (nil), unless DataPipeline.Open is
called first.
That is why your example worked if you ran the first (non-bookmark) report
and then ran the other bookmark based reports (i.e. the first report would
open the datapipeline).
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com