Invoice PDF Template: related list items as a numbered list

Dear All

I have gone through multiple tutorials about putting daughter related records in PDF Invoice as a Start: expression but the output looks incomplete. I want the invoice items to appear as a numbered list in the invoice pdf.

e.g. the item list table should contain columns like:

S. No. ; Item Name; Price; Quantity; Amount

Please help.

Solved Solved
0 4 239
1 ACCEPTED SOLUTION

How about

COUNT(
 filter("PresData", 
  AND(
   [_ROWNUMBER] <= [_THISROW].[_ROWNUMBER],
   [visit id] = [_THISROW].[visit id]
  )
 )
)

View solution in original post

4 REPLIES 4

If you add a column to the child record, (call it "Item No", perhaps), you should be able to create a formula that increments up for each child record.   I think the formula would look something like this: 

Max(Select(childTable[Item No], ([childTable[parentID] = [parentID]))) + 1

I'm not whether this formula will work on the first child record or not.  Hopefully, it just works, but if not, you might need to wrap it in an if statement so that you arrive at a numeric value for the first child.

 

Hi RedVox

thanks for the input, however, it could not get the issue solved. Then I tried this:

IF([_thisrow].[visit id]=[visit id],(MAX(PresData[Item No.]) + 1),"1")

PresData is the table name. Visit ID is ref Column of the parent table.

this formula seem to work but when new visit ID is created the item no. doesn't restart at 1 and continues from the last value in previous visit.

pls help

How about

COUNT(
 filter("PresData", 
  AND(
   [_ROWNUMBER] <= [_THISROW].[_ROWNUMBER],
   [visit id] = [_THISROW].[visit id]
  )
 )
)

Thanks TeeSee ! This formula worked however the numbering started from Zero so i just added +1 at the end of the formula and it worked!!!!

 

thanks again

Top Labels in this Space