I have a problem with <CFOUTPUT GROUP> attribute when i dynamically group based on number of columns user selected.
The logic follows:
<--- This is for first group --->
<CFOUTPUT QUERY="query_name" GROUP="#group1#">
<--- Since this is a dynamic grouping, store the number
of columns that user selected in a list and loop
from outermost group to second. Because first group
always default. --->
<CFLOOP INDEX="i" FROM="#ListLen(columnslist)#" TO="2"
STEP="-1">
<--- Inner block to display the data --->
<CFOUTPUT>
<TR>
<TD>
Display data
</TD>
</TR>
</CFOUPUT>
<--- Display subtotals. --->
<TR>
<TD>
Subtotals for group2, group3....etc.,
</TD
</TR>
</CFLOOP>
</CFOUTPUT>
The problem here is the data is displaying twice. For example if the user select 3 columns for grouping. For the second and third groups the data is displaying for each record.
Any idea?
Thanks
The logic follows:
<--- This is for first group --->
<CFOUTPUT QUERY="query_name" GROUP="#group1#">
<--- Since this is a dynamic grouping, store the number
of columns that user selected in a list and loop
from outermost group to second. Because first group
always default. --->
<CFLOOP INDEX="i" FROM="#ListLen(columnslist)#" TO="2"
STEP="-1">
<--- Inner block to display the data --->
<CFOUTPUT>
<TR>
<TD>
Display data
</TD>
</TR>
</CFOUPUT>
<--- Display subtotals. --->
<TR>
<TD>
Subtotals for group2, group3....etc.,
</TD
</TR>
</CFLOOP>
</CFOUTPUT>
The problem here is the data is displaying twice. For example if the user select 3 columns for grouping. For the second and third groups the data is displaying for each record.
Any idea?
Thanks