How to use nested Foreach in LINQ Reporting

I’ve attached my working solution. However, I want to apply another loop to avoid a hardcoded index. However, I am unable to find the correct syntax for that. I tried a couple of options mentioned in different threads, but none of them worked for me.

I want another inner loop on the Values array. Right now, it is accessed by

<<foreach [item in ProductDataTags[0].Values]>>

VSDWithAspose.docx (16.6 KB)

This is my C# Code.
CSharpAspose.zip (658 Bytes)

The last column’s value will be accessed from the outer foreach loop, and the first two columns’ values will be fetched from the inner loop.

@tabraiz

You can normally use nested foreach tags in such a scenario as per Working with Table-Row Data Bands.

If I understand your requirement correctly, then changing <<foreach [item in ProductDataTags[0].Values]>> to <<foreach [tag in ProductDataTags]>><<foreach [item in tag.Values]>> and then changing <</foreach>> to <</foreach>><</foreach>> should do the job.

If cells of the last column are going to access an item of the outer foreach tag, then Merging Table Cells Dynamically might be also helpful.