@gzmorgan0
Thanks for the repply.
I am trying to use JSL up until the point I need to create the report in pptx. The reason for saving the graphs according to the list name is because I need to create a report for each element of this list.
I have put the JSL script below. The script as it is works but it does not save the graphs with its correspondent list name, It only saves each graph as sample_1; sample_2...etc. For example the name of my sample_1 is "EH3", however, the names will change every month and so ideally I would need it to get the name from the list.
I still have to add a summary tabulate for each Sample[i] and add it together with the graph to pptx. Is this possible?
win = New window("Graphs", lub = Lineup Box (Ncol(3)));
//selecting the list of samples or variables for which a graph is required
Samples = (Associative Array(Column (dt4, "Sample"))<<Get keys);
//Loop through the list to generate the graphs
For (i = 1, i<= N items (Samples), i++,
dt4<<select where (:Sample==Samples[i]);
dt5=dt4<<subset(invisible,selected rows(1),selected column(0));
lub<<Append(
gb=dt5 << Graph Builder(
Size( 894, 625 ),
Legend Position( "Bottom" ),
Show Title( 0 ),
Show Control Panel( 0 ),
Variables(
X( :Days ),
Y( :Model Growth rate ),
Y( :Growth rate, Position( 1 ) ),
Group X( :Sample, Show Title( 0 ), N View Levels( 1 ) )
),
Elements(
Points( X, Y( 2 ), Legend( 14 ), Jitter Limit( 1.1193 ) ),
Smoother( X, Y( 1 ), Legend( 15 ), Lambda( 0.0000146251389195779 ) )
),
Local Data Filter(
Close Outline( 1 ),
Add Filter(
columns( :Sample ),
Where( :Sample == Samples[i] ),
Display( :Sample, Size( 224, 126 ), List Display )
)
), SendToReport(
Dispatch(
{},
"Days",
ScaleBox,
{Min( 0 ), Max( 21 ), Inc( 1 ), Minor Ticks( 1 ),
Label Row(
{Inside Ticks( 1 ), Set Font( "Calibri" ), Set Font Size( 14 )}
)}
),
Dispatch(
{},
"Model Growth rate",
ScaleBox,
{Inc( 50 ), Minor Ticks( 0 ),
Label Row(
{Inside Ticks( 1 ), Set Font( "Calibri" ), Set Font Size( 14 )}
)}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
14,
Level Name( 0, "Experimental", Item ID( "Growth rate", 1 ) ),
Properties( 0, {Marker Size( 5 )}, Item ID( "Growth rate", 1 ) )
), Legend Model(
15,
Level Name( 0, "Model", Item ID( "Smooth(Model Growth rate", 1 ) ),
Properties(
0,
{Line Color( 32 ), Line Width( 3 )},
Item ID( "Smooth(Model Growth rate)", 1 )
)
)}
),
Dispatch(
{},
"X title",
TextEditBox,
{Set Font( "Calibri" ), Set Font Size( 14 )}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Font( "Calibri" ), Set Font Size( 14 ),
Set Text( "Growth rate (g/s)" )}
),
Dispatch( {}, "Graph Builder", Outlinebox, {Set Title( "" )})));
Report(gb)[Axisbox(2)]<<Min(0);
gb<< save picture(Eval Insert("C:\Users\ioliveira\Desktop\data\sample_^i^.png"));););
(win << XPath("//OutlineBox[@helpKey='Data Filter']") ) << Visibility("collapse");