If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > No data in page header if detail is blank

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-10-11, 14:12
SkiddMarx SkiddMarx is offline
Registered User
 
Join Date: Jun 2011
Posts: 1
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.
Reply With Quote
  #2 (permalink)  
Old 09-15-11, 01:08
mission mission is offline
Registered User
 
Join Date: Oct 2010
Posts: 44
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.
Reply With Quote
Reply

Tags
blank header, last page

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On