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!

Report Header and Detail Help

Status
Not open for further replies.

RacerGirl117

Technical User
Sep 25, 2002
234
US
I have a packing slip report that has 5 header sections, the detail section, and one footer section. In the last header section I have two unbound fields that pull their values based on the values in bound data fields in the detail. For example: I have a field in the last header called "Shipping Instructions". It pulls it's value from the "bin location" field. The bin location is where the material is in the warehouse. If the bin location field equals "SHIP" then it displays the field value of the line item's description (from detail) in the Shipping Instructions field in the header). I have another field in the header called "Notes" that does the same thing but pulls from the Comments field of a line item in the detail section.

Currently, the header will only show one each of the Shipping Instructions and/or the Notes field in the header regardless of how many "notes" or "shipping instructions" there might be on the packing slip. In the past, this has never been a problem. But it came up today. It obviously doesn't happen enough to justify me spending any great amount of time on it (especially since tomorrow is my last day with the company) but I'd like to see if I can find a solution.

We'd like to be able to display multiple shipping instruction lines or notes lines in the header. The question is...how do I do that? Right now, I have very basic code that is an If...Then...Else statement. It works great for the one line, but how do I get it to repeat itself?

Here is the code I have for the respective fields:
'Display the shipping instructions in the page header
If Bin_Location = "SHIP" Then
ShippingInstructions = Description
End If

'Display *NOTE line item in header
If Item_No = "*NOTE" Then
Note = Comments
End If

It looks like, on the shipping instructions field, that it pulls the last (in alphabetical order) line item from the detail section. It appears to do the same thing with the Notes field as well.

Any help with this would be greatly appreciated.

Thanks in advance,

Jessica Morgan
Fire Fighter Sales & Service Co.
Pittsburgh, PA
 
Hi,
You can have multiple text boxes in the header, and only display them if there is data. To conditionally display data, you would set the Visible properties to True or False.

HTH, [pc2]
Randy Smith, MCP
California Teachers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top