Group records in pdf files

I have created a Bot that works correctly that saves on the drive a pdf single receipts of the receipts table.

The “receipts” table has fields: [date], [performance], [price], [total (virtual column that adds the price contained in the rows of the child table “received rows”)]

I would like to obtain a pdf that groups the records of the “received” table by date. Ex .:

"Receipts" table 
1. data1, performance1, price1, total
2. data1, performance1, price1, total
3. data1, performance2, price2, total
4. data1, performance1, price1, total
5. data2, performance1, price1, total
6. data2, performance1, price1, total
7. data3, performance1, price1, total
8. data3, performance1, price1, total
9. data3, performance2, price2, total

The desired result should look like this:

Pdf file
1. data1, performance1, price1, total
2. data1, performance2, price2, total
3. data2, performance1, price1, total
4. data3, performance1, price1, total
5. data3, performance2, price2, total

I have tried with this code written in a Google doc Template

<<Start: ORDERBY(FILTER("RICEVUTA", ([IDRICEVUTA] = MAXROW("RICEVUTA", "_ROWNUMBER", ([_THISROW-1].[DATA] = [DATA])))), [DATA])>>
<<ORDERBY(FILTER("RICEVUTA", ([IDRICEVUTA] = MAXROW("RICEVUTA", "_ROWNUMBER", ([_THISROW-1].[MIN E MAX] = [MIN E MAX])))), [MIN E MAX])>>
<<ORDERBY(FILTER("RICEVUTA", ([IDRICEVUTA] = MAXROW("RICEVUTA", "_ROWNUMBER", ([_THISROW-1].[PRESTAZIONI SANITARIE] = [PRESTAZIONI SANITARIE])))), [PRESTAZIONI SANITARIE])>>
<<ORDERBY(FILTER("RICEVUTA", ([IDRICEVUTA] = MAXROW("RICEVUTA", "_ROWNUMBER", ([_THISROW-1].[SOMMA IMPOSTA] = [SOMMA IMPOSTA])))), [SOMMA IMPOSTA])>>
<<End>>

It simply sorts but does not group

Solved Solved
0 2 205
1 ACCEPTED SOLUTION

Please try below.

  1. Please create a VC called say [DataPerformPrice] on the “Receipts” table with an expression something like

A) CONCATENATE([Data], [Performance], [Price]) if for same data and performance the price can be different.

or simply

B) CONCATENATE([Data], [Performance]) , if price is going to be same for the same data and performance combination.

  1. Please create a slice called say GroupForReports with a filter expression something like

[Receipts Table Key Column]= MINROW(“Receipts”, “_ROWNUMBER”, [DataPerformPrice]=[_THISROW].[DataPerformPrice])

  1. Please create your report expression template based on this slice something like

View solution in original post

2 REPLIES 2

Please try below.

  1. Please create a VC called say [DataPerformPrice] on the “Receipts” table with an expression something like

A) CONCATENATE([Data], [Performance], [Price]) if for same data and performance the price can be different.

or simply

B) CONCATENATE([Data], [Performance]) , if price is going to be same for the same data and performance combination.

  1. Please create a slice called say GroupForReports with a filter expression something like

[Receipts Table Key Column]= MINROW(“Receipts”, “_ROWNUMBER”, [DataPerformPrice]=[_THISROW].[DataPerformPrice])

  1. Please create your report expression template based on this slice something like

it works perfectly. Thank you

Top Labels in this Space