Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check is Details section empty on the current page 1

Status
Not open for further replies.

ipm

Programmer
Apr 5, 2005
16
DE
I need to add a section on the last page of the report in case if there are more then one page and on the last page there is no record in details section (report footer only).

How can I check this?
 
The above assumes the detail field you use has a not-null constraint in your database. If not, or just to be safe, you can use:

IsNull(Count({YourDetailFieldHere}))

Naith
 
May be I didn't explain precisely what I wanted.

I have a report with report header, details section and report footer. I'd like to keep report footer together. Normally last page contains some records from details section and report footer. But sometimes there is a situation where all records from details section are on the previous page and the last page contains report footer only. This situation I'd like to catch.

How to do it?
 
In your page header, place the following:
Code:
WhilePrintingRecords;
NumberVar RecordCounter := 0;
In your details section, place the following:
Code:
WhilePrintingRecords;
NumberVar RecordCounter := RecordCounter + 1;
Drive your report footer on the following clause:
Code:
WhilePrintingRecords;
NumberVar RecordCounter;

If RecordCounter > 0
Then //whatever you want to do if there are records//
Else //the opposite//
Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top