- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How do I combine these codes?
Hi there,
I would like to combine these codes so that they run from the "Formulation Change Review (new)" and closes the new data table/tabulate tab only leaving the graph.
Any help much appreciated!
(Data Table( "Formulation Change Review (new)" ) <<
Tabulate(
Add Table(
Column Table( Grouping Columns( :Lab RFT ), Statistics( Row % ) ),
Row Table( Grouping Columns( :Grade ) )
)
)) << Make Into Data Table
Graph Builder(
Size( 1896, 951 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X(
:Grade,
Order By( :Name( "Row %(Y)" ), Ascending, Order Statistic( "Mean" ) )
),
Y( :Name( "Row %(Y)" ) ),
Overlay( :Grade )
),
Elements( Bar( X, Y, Legend( 6 ), Label( "Label by Value" ) ) ),
SendToReport(
Dispatch( {}, "graph title", TextEditBox, {Set Text( "RFT % per grade" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "RFT%" )} )
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I combine these codes?
Created:
Feb 10, 2021 06:53 AM
| Last Modified: Feb 10, 2021 4:07 AM
(616 views)
| Posted in reply to message from JC7 02-10-2021
untested, but split it up into smaller blocks like this:
dt1 = Data Table( "Formulation Change Review (new)" );
tab = (dt1 << Tabulate(
Add Table(
Column Table( Grouping Columns( :Lab RFT ), Statistics( Row % ) ),
Row Table( Grouping Columns( :Grade ) )
)
)) ;
dt2 = tab << Make Into Data Table;
gb = dt2 << Graph Builder(
Size( 1896, 951 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X(
:Grade,
Order By( :Name( "Row %(Y)" ), Ascending, Order Statistic( "Mean" ) )
),
Y( :Name( "Row %(Y)" ) ),
Overlay( :Grade )
),
Elements( Bar( X, Y, Legend( 6 ), Label( "Label by Value" ) ) ),
SendToReport(
Dispatch( {}, "graph title", TextEditBox, {Set Text( "RFT % per grade" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "RFT%" )} );
tab<<closewindow;
close(dt2,nosave);
// gb is the handle to the graphbuilder report
edit: There appear to be missing ) at the end of the graph builder section. Make sure you grab all of the JSL from the save-to-script-window when you paste it together.
edit 2: just before the close(dt2,nosave) you might want to
gb << journal;
gb<<closewindow;
because the graph builder report needs the table open but the journal is self contained. The journal'd graph is not connected to the data and can't do row selection.
Craige