That’s another sophisticated request . In order to access the first order, LL would need access to it during the drawing of the header information. For performance reasons however the providers usually don’t pass real data before actually printing it. Thus - a typical catch22 situation.
A possible workaround to make this work is a combination of
SetVar and a linked object.
First, in your data line definition, change the column you’d like to access (in my sample it’s the item number) to read
If (Count(1, false)=1, SetVar("FirstItemNumber",Item.ItemNo), Item.ItemNo)
What this does is for the first record setting the “FirstItemNumber” variable to the ItemNo field and printing it, in all other cases just printing the field. Thus, after printing the first line, you can access the item number in a formula like this:
"Customer "+Customer.Company+", first item is "+GetVar("FirstItemNumber")
In order to make sure the printing order is as required, you need to link your text field to the report container. I’m attaching a sample showing the concept here (Invoice sample for the DemoApplication24). Invoice.inv (147.7 KB)