Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Positioning the No Data message

edited March 2008 in General
Hi.

I am using Delphi 6 with Report Builder 6.03.

I have 2 reports that are linked to the same dataset.
The one report has a grouping on it and the other not.

Both have been setup to print a blank report with a message on the page
when the dataset returns no rows.
NoDataBehaviours
-ndMessageOnPage = True
-ndBlankReport = True

The report with the grouping displays the message in what appears to be
the header area. So it is quite high in the page in the middle of the
report labels.

The report with no grouping displays the message in the middle of the
report page. So it is below the labels of the report.

I would like the message to be displayed in the same location for both
reports.

I added a group to the second report but added no labels to it but that
did not alter the position of the message.

I then got the Top property of the aDrawCommand for the non grouped
report which is 99483. I set the Top property of the aDrawCommand to
99483 in the NoData event and the message is now displayed in the same
position on both reports.
TppDrawText(aDrawCommand).Top := 99483;

Is there a better way to achieve this behaviour other than the way I have
done it?

Thanks.

Stuart.



--- posted by geoForum on http://delphi.newswhat.com

Comments

This discussion has been closed.