Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2011
    Posts
    1

    Unanswered: No data in page header if detail is blank

    Greetings-

    Have a report with a page header containing data from a table, detail section which can contain numerous records, and a report footer containing a total from the detail section.

    The problem I'm having is if the last page does not contain any detail records, none of the data fields in the page header are populated, only the text items appear in the page header, and the report footer appears properly populated.

    Any hints on how I can populate the header on the last (total) page of the report if the detail section is blank?

    Thanks.

  2. #2
    Join Date
    Oct 2010
    Posts
    46
    Quote Originally Posted by SkiddMarx View Post
    Have a report with a page header containing data from a table, detail section which can contain numerous records, and a report footer containing a total from the detail section.

    The problem I'm having is if the last page does not contain any detail records, none of the data fields in the page header are populated, only the text items appear in the page header, and the report footer appears properly populated.
    There is no reason why the page header should print any of the data fields when there is no detail record. Think about it, the data source of the report is based on a result set. When there is no data in the detail record, it means the result set is null. If the result set is null, how can it print the fields in the page header?

    You may want to try this, this is not tested as I do not have your sample report rpt to test.

    Use a sub-report to print the data in the page header. With this approach, even there is no data in the main report, the page header may not be affected. This depends on what you pass in to the sub report. If you use a field from the main report, then likely the page header will not print the data because the main report would have no data to pass. But if you passed in a constant (formula), then the subreport will be able to retrieve whatever data and have them printed on the page header.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •