GroupBy sumlines to HTML/PDF reports

Posted by smartsysISV on 02-Mar-2015 06:20

Is it possible to get the sumlines from GroupBy on a view to be printed on a rpeort if I use "LOOP BEGIN" and "LOOP END" on the same view in the report?

Posted by Godfrey Sorita on 02-Mar-2015 11:39
Great! For my example I will use Group and Employee objects with One to Many relationship, respectively. First, create a formula field in Group which will compute the totals.

Example:
#CALC_SUM.R1234( salary | true );

Where:
R1234 -> Relationship integration name of Group and Employee
salary -> Integration name of a field

Then create an HTML report in Group. The main loop should get all group records while the related loop will get the related employee for that group.

Example:


{!#LOOP_BEGIN.all#7536}
{!name}

{!#LOOP_BEGIN.R1234#7662}
{!R1234.id}

{!#LOOP_END.R1234}
Total Salary: {!your_formula}

{!#LOOP_END.all}



Where:
7536 -> Original ID of the group object
7662 -> Original ID of a view in employee object
R1234 -> Relationship integration name of Group and Employee

All Replies

Posted by Godfrey Sorita on 02-Mar-2015 10:34
Hi Stein,

Unfortunately this feature is not supported in Rollbase loops. I might be able to give you a workaround solution if you're using a lookup field to group the records and compute the sum of certain fields though.


Regards,
Godfrey
Posted by smartsysISV on 02-Mar-2015 11:16

Hi Godfrey,

Yes. I'm using a lookup-field togroup records and a computed sum.

Posted by Godfrey Sorita on 02-Mar-2015 11:39
Great! For my example I will use Group and Employee objects with One to Many relationship, respectively. First, create a formula field in Group which will compute the totals.

Example:
#CALC_SUM.R1234( salary | true );

Where:
R1234 -> Relationship integration name of Group and Employee
salary -> Integration name of a field

Then create an HTML report in Group. The main loop should get all group records while the related loop will get the related employee for that group.

Example:


{!#LOOP_BEGIN.all#7536}
{!name}

{!#LOOP_BEGIN.R1234#7662}
{!R1234.id}

{!#LOOP_END.R1234}
Total Salary: {!your_formula}

{!#LOOP_END.all}



Where:
7536 -> Original ID of the group object
7662 -> Original ID of a view in employee object
R1234 -> Relationship integration name of Group and Employee
Posted by smartsysISV on 02-Mar-2015 11:46

Of course, we can use related loops :-)

Thank you!!

This thread is closed