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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 9 SP1 report - header with conditional printing

Status
Not open for further replies.

ashmac2

Programmer
Mar 3, 2003
11
US
I have a report that has columns of info and when it prints it looks like a grid. Therefore, I want the column headings' boxes to only print if there is data contained in them. I have the boxes set up to print when "NOT EMPTY(thatfield)". It works great except on 2 pages of about 6 pages of report. If I remove the condition, the box prints all the time. But I have one page, the last page, with data in the first 2 columns and the boxes are not printing around the headings. I haven't changed anything else that defaults from the report rectangle properties window that comes up. I welcome any ideas on where to look.

Thanks,
Laura Savana
 
I'm not sure I totally understand your situation. However, from what you're saying, the problem is that NOT EMPTY(thatfield) refers to a single record (the current record at the time the condition is evaluated). If you want to eliminate a heading based on whether there's data in a particular field anywhere in the report, you'll have to set a variable ahead of time and check it in the report. Something like:

COUNT FOR NOT EMPTY(ThatField) TO nNonEmpty
IF nNonEmpty = 0
lHeading = .F.
ELSE
lHeading = .T.
ENDIF

Tamar
 
I've made sure that each record in the report set has the data for that header in it. The data prints, ie the Job # and/or Work Request#, just the box doesn't print. Here is a link ( to an example of the report, page 4 and page 6 do not have the boxes but print the data in the headers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top