Print info in page header if condition is satisfied in detail section

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I have built a invoicing system and am tring to build a report that
will print a field in the page header depending of if a condition is
satisfied in th detail section.

We sell products that are in 6 different warehouses, Whs1 - Whse6. So
if the detail section has products from Whs1 and Whs4 then I want to
print Whs1 and Whs4 in the page header of the report.

I have tried 6 IIF statements in the PH but at the first detail item is
used. I have created 6 conditional text boxes in the detail section
and auto sum across all so my last detail has numbers only for the
fields present and can bring them to the the page footer but when I tie
the PH to them still nogo.

I can get the fields to print in the section footer or page footer but
not in the page header. The header seams to only look at the first
detail item.

Any ideas would be welcome.

TIA
 
Ron said:
I have built a invoicing system and am tring to build a report that
will print a field in the page header depending of if a condition is
satisfied in th detail section.

We sell products that are in 6 different warehouses, Whs1 - Whse6. So
if the detail section has products from Whs1 and Whs4 then I want to
print Whs1 and Whs4 in the page header of the report.

I have tried 6 IIF statements in the PH but at the first detail item is
used. I have created 6 conditional text boxes in the detail section
and auto sum across all so my last detail has numbers only for the
fields present and can bring them to the the page footer but when I tie
the PH to them still nogo.

I can get the fields to print in the section footer or page footer but
not in the page header. The header seams to only look at the first
detail item.

Place the sum text boxes in the Report Header:
=Sum(IIf(wharehose = "Whs1", 1, 0))
. . .

Then the Page Header can refer to them
=IIf(txtWhs1Cnt > 0, "Whs1 ", "") & IIf(txtWhs2Cnt > 0,
"Whs2 ", "") & . . .
 
Marshall said:
Place the sum text boxes in the Report Header:
=Sum(IIf(wharehose = "Whs1", 1, 0))
. . .

Then the Page Header can refer to them
=IIf(txtWhs1Cnt > 0, "Whs1 ", "") & IIf(txtWhs2Cnt > 0,
"Whs2 ", "") & . . .

That works. I tried to pull the information in everywhere except to
the report header. I didn't need it but will use it for this and
shrink text boxes and header size.

Thanks for the quick help!
 
Back
Top