I have reworked your script a bit. You will need to go through it an study what I have done. The basic issue is that when you use a BY() on the platforms, it generates a separate report for each level of by.
The script as written will generate the journals for each group. I have commented out the show window and the saving of the journal to html. I did this, so to start with you will see the different journals. You just need to take the comments out, and it should work the way you want.
Names Default To Here( 1 );
dt = Current Data Table();
out_path = "*****";
Summarize( groupid = by( :Group ) );
Summarize( paramgroup = by( :Parameter ) );
mydf = {};
For( k = 1, k <= N Items( groupid ), k++,
grp_name = groupid[k];
myhtm = New Window( "30d Trend Plots Group Wise", lb = Lineup Box( N Col( 2 ) ) );
For( i = 1, i <= N Items( paramgroup ), i++,
idname = Char( paramgroup[i] );
outfile = out_path || grp_name || "_" || "trend_plots" || ".html";
df_ooc = dt << Bivariate(invisible,
Y( :Value ),
X( :DATE ),
Where( :group == grp_name ),
By( :Parameter ),
);
vc = Variability Chart(invisible,
Y( :Value ),
X( :Date ),
Std Dev Chart( 0 ),
where( :group==grp_name ),
By( :parameter )
);
// For each value in the By group, there is a separate report
theEnd=.;
try(theEnd=nitems(df_ooc)); if(ismissing(theEnd), theEnd=1);
For( rptGroup = 1, rptGroup <= theEnd, rptGroup++,
IF( theEnd == 1,
lb << append( Report( df_ooc ) );
lb << append( Report( vc ) );
,
lb << append( Report( df_ooc[rptGroup] ) );
lb << append( Report( vc[rptGroup] ) );
);
);
df_ooc << close window;
vc << close window;
); ///// 2nd for loop end
jrn_df = New Window( "Trend Correlation Report", <<Journal );
text box("Group = " || grp_name)<<journal;
lb << Journal( Freeze All );// << show window( 0 );
myhtm << close window;
//jrn_df << Save HTML( outfile );
//Close All( Journals, "No Save" );
); //1st for loop end
The script worked without error on your supplied sample data.
Jim