Using View Loops in Reports

Posted by wweultjes on 23-Dec-2014 09:54

Hello,

I try to create a html report. In this report i use a loop based on a view that shows only finalized workorder.

{!#LOOP_BEGIN.R217338#217305}

I expect that only the finalized workorders will be shown in the report sorted and grouped like i defined in the view.

But unfortunate it is showing all the workorders. What is going wrong here. 

Is it me not understanding this Rollbase functionality or is it a bug.

Regards,

Wilco Weultjes.

Posted by Godfrey Sorita on 29-Dec-2014 07:32

I was already able to reproduce the issue in my environment. Defect PSC00324469 has been filed for this issue.

All Replies

Posted by Godfrey Sorita on 23-Dec-2014 13:27

Hi Wilco,

I was unable to reproduce the issue in my environment. Perhaps you can provide a sample code of your report?

You also mentioned that use are using this on a report. Is this loop within another loop?

For Example:

{!#LOOP_BEGIN.all#116461238}
	>{!name#text}<br>
	{!#LOOP_BEGIN.R116590576#117648464}
		>>{!R116590576.name#text}<br>
	{!#LOOP_END.R116590576}
{!#LOOP_END.all}

Thanks,
Godfrey

Posted by pvorobie on 23-Dec-2014 13:55

In my test environment Loops through related records are using filters from View correctly. Which Rollbase version you're using?

Posted by wweultjes on 24-Dec-2014 05:48

Hello Godfrey,

I'm talking about the master loop in this situation. As i understand this loop is based on a view.

So i expected that the selected loop in this situation would give me all workorders with status finalized sorted by Principal and project. Sorting is ok but filtering is not what i expected.

small example:

{!#LOOP_BEGIN.R217338#217305}

<tr>

<td>  {!principal}</td>

        <td>  {!project}</td>

<td>  {!workorder_number}</td>

        <td>  {!location}</td>

        <td>  {!start}</td>

<td>  {!hours}</td>

</tr>

{!#LOOP_END.R217338}

I hope it's more clear now

Regards,

Wilco.

Posted by wweultjes on 24-Dec-2014 05:49

I'm using 3.1.1

Posted by Godfrey Sorita on 24-Dec-2014 07:52

Yes, it is much clearer now.

Did you use the original ID of the view in the #LOOP_BEGIN token? All related records are also displayed (no filter) when I use an incorrect view ID on the #LOOP_BEGIN token.

Also, it's a good practice to use the Template Helper in determining the tokens on your html template. 

I believe the template should be written like:

{!#LOOP_BEGIN.R217338#217305} 
 {!R217338.principal}
 {!R217338.project}
 {!R217338.workorder_number}
 {!R217338.location}
 {!R217338.start}
 {!R217338.hours}
{!#LOOP_END.R217338} 

Posted by wweultjes on 29-Dec-2014 04:15

Hello Godfrey,

I think i've somehow misled you with my example. That was an example of bad cutting and pasting.

The real example should look like:

{!#LOOP_BEGIN.all#231984}

{!principal}

{!project}

{!workorder_number}

{!location}

{!start}

{!hours}

 {!#LOOP_END.all}

Regards,

Wilco

Posted by Godfrey Sorita on 29-Dec-2014 07:32

I was already able to reproduce the issue in my environment. Defect PSC00324469 has been filed for this issue.

Posted by wweultjes on 30-Dec-2014 01:34

Thank you

Posted by Godfrey Sorita on 19-Feb-2015 06:25

Hi John,

The fix for this defect will be released on version 3.2.0.0. The release is tentatively scheduled on March 6, 2015.


Regards,
Godfrey

This thread is closed