cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
saitcopuroglu
Level IV

Script for putting reports into tabs (Interactive HTML)

I know the JMP 12 Application Builder will be able to create containers as tabs like here:

8348_Screen Shot 2015-03-13 at 13.19.38.png

But I am unable to use application builder and I guess will never be able to use it efficiently (also I use Panel Boxes for each report so Application Builder cant detect it to put in tabs anyway).

Is there a way of scripting this with with the actual JMP 11.2.1 Mac?

If not what will be the script for JMP 12?

Thank you all in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Script for putting reports into tabs (Interactive HTML)

I wonder if something like this would work for your needs. This is supported in JMP 11. Used TabBox and panelbox, like I think you are doing.

Open( "$SAMPLE_DATA/Big Class.jmp" );

New Window("test tabbed pages",

tb = TabBox("First page",

vlb1 = panelbox(

textBox("Report 1")

),

"Second page",

vlb2 = panelbox(

textBox("Report 2")

),

"Third page",

vlb3 = panelbox(

textBox("Report 3")

)

));

// Reports in each one of the tabs.

vlb1 << append(Oneway( Y( :height ), X( :sex ), Name( "Means/Anova" )(1), Mean Diamonds( 1 ) ));

vlb2 << append(Distribution(

  Continuous Distribution( Column( :weight ) ),

  Nominal Distribution( Column( :age ) )

));

vlb3 << append(Bivariate( Y( :weight ), X( :height ), Fit Line( {Line Color( {208, 64, 86} )} ) ));


Connect with me on LinkedIn: https://bit.ly/3MWgiXt

View solution in original post

7 REPLIES 7

Re: Script for putting reports into tabs (Interactive HTML)

I wonder if something like this would work for your needs. This is supported in JMP 11. Used TabBox and panelbox, like I think you are doing.

Open( "$SAMPLE_DATA/Big Class.jmp" );

New Window("test tabbed pages",

tb = TabBox("First page",

vlb1 = panelbox(

textBox("Report 1")

),

"Second page",

vlb2 = panelbox(

textBox("Report 2")

),

"Third page",

vlb3 = panelbox(

textBox("Report 3")

)

));

// Reports in each one of the tabs.

vlb1 << append(Oneway( Y( :height ), X( :sex ), Name( "Means/Anova" )(1), Mean Diamonds( 1 ) ));

vlb2 << append(Distribution(

  Continuous Distribution( Column( :weight ) ),

  Nominal Distribution( Column( :age ) )

));

vlb3 << append(Bivariate( Y( :weight ), X( :height ), Fit Line( {Line Color( {208, 64, 86} )} ) ));


Connect with me on LinkedIn: https://bit.ly/3MWgiXt
saitcopuroglu
Level IV

Re: Script for putting reports into tabs (Interactive HTML)

Thank you, this was what I was looking for.

saitcopuroglu
Level IV

Re: Script for putting reports into tabs (Interactive HTML)

But it does not work for Interactive HTML Would it work with JMP 12?

Re: Script for putting reports into tabs (Interactive HTML)

Here is the output from JMP 12 as interactive html.  The output is different vs. JMP 11, which seems to flatten the tabs into a single report. So yes, this will work as expected in JMP 12.

Connect with me on LinkedIn: https://bit.ly/3MWgiXt
saitcopuroglu
Level IV

Re: Script for putting reports into tabs (Interactive HTML)

Wünderbar! Thanks to all HTML5 Code Team!

saitcopuroglu
Level IV

Re: Script for putting reports into tabs (Interactive HTML)

And what should a script look like if I would like to add multiple reports each in a panel box for each tab? Thanks

saitcopuroglu
Level IV

Re: Script for putting reports into tabs (Interactive HTML)

Dear danielvalente,

Finally I am using JMP 12, tried hours and hours to put my report into a tabbed format as your guide script but unfortunately I can't "jump".

My reports consist of 53 reports (think them as subtitles) grouped into 8 main titles and the report is growing each day. The output which my skill allows is screenshotted. It is okay but too long for the final user. I would like to put the subtitles into "tabbed titles: SIMULATTION, METRICS by MONTH, METRICS by MARKET .....

I really would appreciate your help!

8582_Screen Shot 2015-04-20 at 00.47.43.png

The first "title" part of the sript is as follows and if you help with trplication it in 3 seperate tabs I guess I will be able to make the rest;

Many many thanks in advance!

nw = New Window( "Sales Performance Report",

    Outline Box( "SIMULATION",

  //SIMULATION

        Outline Box( "CUMULATIVE REVENUE CURVE of SIMULATED SALES and CONFIDENCE LIMITS",

            Panel Box(

                "Resort:Island, Report:Simulation, SubReport:CumulativeRevenueCurve, Author:SaitCopuroglu,  " || Long Date( Today() ) || " " ||

                Format( Time Of Day( Today() ), "h:m" ),

                dtsimulation << Graph Builder(

                    Size( 1372, 672 ),

                    Show Control Panel( 0 ),

                    Show Legend( 1 ),

                    Legend Position( "Bottom" ),

                    Fit to Window( "Off" ),

                    Back Color( {183, 207, 219} ),

                    Title Fill Color( "Light Blue" ),

                    Title Frame Color( "Medium Dark Gray" ),

                    Level Fill Color( {174, 203, 228} ),

                    Level Frame Color( "Medium Dark Gray" ),

                    Level Spacing Color( {131, 153, 182} ),

                    Level Underline( 1 ),

                    Page Level Fill Color( {132, 154, 183} ),

                    Page Level Underline( 0 ),

                    Spacing Borders( 1 ),

                    Variables(

                        X( :SALES DATE ),

                        Y( :Lower 95% Indiv Spline Predictor for ISL ),

                        Y( :Upper 95% Indiv Spline Predictor for ISL, Position( 1 ) ),

                        Y( :Name( "Cumulative[FitModelISL]" ), Position( 1 ) )

                    ),

                    Elements( Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 9 ) ) ),

                    Local Data Filter(

                        Mode,

                        Add Filter( columns( :Label ), Where( :Label == "2014" ), Display( :Label, Size( 103, 21 ), Check Box Display ) )

                    ),

                    SendToReport(

                        Dispatch(

                            {},

                            "Graph Builder",

                            OutlineBox,

                            {Set Title( "CUMULATIVE REVENUE CURVE of SIMULATED SALES and CONFIDENCE LIMITS" )}

                        ),

                        Dispatch(

                            {},

                            "SALES DATE",

                            ScaleBox,

                            {Min( 3489696000 ), Max( 3531772800 ), Interval( "Month" ), Inc( 1 ), Minor Ticks( 0 ), Label Row Nesting( 2 ),

                            Add Ref Line( 3529008000, "Dashed", "Black", "Season End", 1, 0.3 ), Label Row( 1, Show Major Grid( 1 ) )}

                        ),

                        Dispatch(

                            {},

                            "Lower 95% Indiv Spline Predictor for ISL",

                            ScaleBox,

                            {Format( "Engineering SI", 17 ), Min( 0 ), Max( 14000000 ), Inc( 2000000 ), Minor Ticks( 1 ), Label Row Nesting( 1 ),

                            Label Row(

                                {Minor Grid Line Color( -16053236 ), Show Minor Labels( 1 ), Show Minor Grid( 1 ), Show Major Grid( 1 ),

                                Set Font Style( "Plain" )}

                            )}

                        ),

                        Dispatch(

                            {},

                            "400",

                            ScaleBox,

                            {Legend Model(

                                9,

                                Level Name( 0, "Lower Confidence Limit (LCL)" ),

                                Level Name( 1, "Upper Confidence Limit (UCL)" ),

                                Level Name( 2, "Simulation (Cumulative Revenue by Sales Date)" ),

                                Properties( 0, {Line Color( 3 ), Line Style( "Dotted" ), Line Width( 2 ), Fill Color( 3 )} ),

                                Properties( 1, {Line Color( 4 ), Line Style( "Dotted" ), Line Width( 2 ), Fill Color( 4 )} ),

                                Properties( 2, {Line Color( 5 ), Line Width( 2 ), Fill Color( 5 )} )

                            )}

                        ),

                        Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),

                        Dispatch( {}, "400", LegendBox, {Position( {1, 2, 0} )} ),

                        Dispatch( {}, "Y title", TextEditBox, {Set Text( "CUMULATIVE REVENUE" )} ),

                        Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 2 )} )

                    )

                ),

            ),

        ),

  //SIMULATION2

        Outline Box( "CUMULATIVE REVENUE CURVE of ACTUAL SALES and CONFIDENCE LIMITS",

            Panel Box(

                "Resort:Island, Report:Simulation, SubReport:CumulativeRevenueCurve, Author:SaitCopuroglu,  " || Long Date( Today() ) || " " ||

                Format( Time Of Day( Today() ), "h:m" ),

                dtagencystay << Graph Builder(

                    Size( 1372, 672 ),

                    Show Control Panel( 0 ),

                    Show Legend( 1 ),

                    Legend Position( "Bottom" ),

                    Fit to Window( "Off" ),

                    Back Color( {183, 207, 219} ),

                    Title Fill Color( "Light Blue" ),

                    Title Frame Color( "Medium Dark Gray" ),

                    Level Fill Color( {174, 203, 228} ),

                    Level Frame Color( "Medium Dark Gray" ),

                    Level Spacing Color( {131, 153, 182} ),

                    Level Underline( 1 ),

                    Page Level Fill Color( {132, 154, 183} ),

                    Page Level Underline( 0 ),

                    Spacing Borders( 1 ),

                    Variables(

                        X( :SalesDate ),

                        Y( :CumSumBySalesDate ),

                        Y( :Confidence Lower 95%, Position( 1 ) ),

                        Y( :Confidence Upper 95%, Position( 1 ) )

                    ),

                    Elements( Line( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 20 ), Row order( 1 ) ) ),

                    Local Data Filter(

                        Mode,

                        Add Filter( columns( :Resort ), Where( :Resort == "ISLAND" ), Display( :Resort, Size( 112, 21 ), Check Box Display ) )

                    ),

                    SendToReport(

                        Dispatch( {}, "Graph Builder", OutlineBox, {Set Title( "CUMULATIVE REVENUE CURVE of ACTUAL SALES and CONFIDENCE LIMITS" )} ),

                        Dispatch(

                            {},

                            "SalesDate",

                            ScaleBox,

                            {Min( 3489696000 ), Max( 3531772800 ), Interval( "Month" ), Inc( 1 ), Minor Ticks( 0 ), Label Row Nesting( 2 ),

                            Add Ref Line( 3529008000, "Dashed", "Black", "Season End", 1, 0.3 ), Label Row( 1, Show Major Grid( 1 ) )}

                        ),

                        Dispatch(

                            {},

                            "CumSumBySalesDate",

                            ScaleBox,

                            {Format( "Engineering SI", 17 ), Min( 0 ), Max( 14000000 ), Inc( 2000000 ), Minor Ticks( 1 ), Label Row Nesting( 1 ),

                            Label Row(

                                {Minor Grid Line Color( -16053236 ), Show Minor Labels( 1 ), Show Minor Grid( 1 ), Show Major Grid( 1 ),

                                Set Font Style( "Plain" )}

                            )}

                        ),

                        Dispatch(

                            {},

                            "400",

                            ScaleBox,

                            {Legend Model(

                                20,

                                Level Name( 0, "Actual (Cumulative Revenue by Sales Date)" ),

                                Level Name( 1, "Lower Confidence Limit (LCL)" ),

                                Level Name( 2, "Upper Confidence Limit (UCL)" ),

                                Properties( 0, {Line Color( 5 ), Line Width( 2 ), Fill Color( 5 )} ),

                                Properties( 1, {Line Color( 3 ), Line Style( "Dotted" ), Line Width( 2 ), Fill Color( 3 )} ),

                                Properties( 2, {Line Color( 4 ), Line Style( "Dotted" ), Line Width( 2 ), Fill Color( 4 )} )

                            )}

                        ),

                        Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),

                        Dispatch( {}, "X title", TextEditBox, {Set Text( "SALES DATE" )} ),

                        Dispatch( {}, "Y title", TextEditBox, {Set Text( "CUMULATIVE REVENUE" )} ),

                        Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 2 )} )

                    )

                ),

            ),

        ),

       

  //CumRevPerformance % and Euro

        Outline Box( "CUMULATIVE REVENUE PERFORMANCE of ACTUAL SALES (In % and €)",

            Panel Box(

                "Resort:Island, Report:Simulation, SubReport:CumulativeRevenueCurve, Author:SaitCopuroglu,  " || Long Date( Today() ) || " " ||

                Format( Time Of Day( Today() ), "h:m" ),

                dtagencystay << Graph Builder(

                    Size( 1379, 784 ),

                    Show Control Panel( 0 ),

                    Show Legend( 1 ),

                    Legend Position( "Bottom" ),

                    Fit to Window( "Off" ),

                    Back Color( {183, 207, 219} ),

                    Title Fill Color( "Light Blue" ),

                    Title Frame Color( "Medium Dark Gray" ),

                    Level Fill Color( {174, 203, 228} ),

                    Level Frame Color( "Medium Dark Gray" ),

                    Level Underline( 1 ),

                    Page Level Underline( 0 ),

                    Variables( X( :SalesDate ), Y( :CumRevDifference ), Y( :CumRevPerf% ) ),

                    Elements( Position( 1, 1 ), Points( X, Y, Legend( 37 ), Summary Statistic( "Mean" ) ) ),

                    Elements( Position( 1, 2 ), Points( X, Y, Legend( 38 ), Summary Statistic( "Mean" ) ) ),

                    Local Data Filter(

                        Mode,

                        Add Filter(

                            columns( :Resort, :Name( "Year[SalesDate]" ) ),

                            Where( :Name( "Year[SalesDate]" ) == 2015 ),

                            Display( :Resort, Size( 112, 21 ), Check Box Display ),

                            Display( :Name( "Year[SalesDate]" ), Size( 96, 40 ), Check Box Display )

                        )

                    ),

                    SendToReport(

                        Dispatch( {}, "Graph Builder", OutlineBox, {Set Title( "CUMULATIVE REVENUE PERFORMANCE of ACTUAL SALES (In % and €)" )} ),

                        Dispatch(

                            {},

                            "SalesDate",

                            ScaleBox,

                            {Min( 3502915200 ), Max( 3530803912.42118 ), Interval( "Month" ), Inc( 1 ), Minor Ticks( 1 ), Label Row Nesting( 2 ),

                            Add Ref Line( 3529008000, "Dotted", "Black", "Season End", 1 ), Label Row( 1, Show Major Grid( 1 ) ),

                            Label Row( 2, Show Major Grid( 1 ) )}

                        ),

                        Dispatch(

                            {},

                            "CumRevDifference",

                            ScaleBox,

                            {Format( "Best", 17 ), Max( 749347.25848564 ), Inc( 300000 ), Minor Ticks( 1 ), Label Row Nesting( 1 ),

                            Add Ref Line( 0, "Solid", "Green", "", 1 ), Label Row(

                                {Minor Grid Line Color( -16053236 ), Show Minor Grid( 1 ), Show Major Grid( 1 )}

                            )}

                        ),

                        Dispatch(

                            {},

                            "CumRevPerf%",

                            ScaleBox,

                            {Min( 0 ), Max( 1.2 ), Inc( 0.1 ), Minor Ticks( 1 ), Label Row Nesting( 1 ), Add Ref Line(

                                {0.95, 1.05},

                                "Solid",

                                "Medium Light Green",

                                "",

                                1,

                                0.25

                            ), Label Row( {Show Minor Grid( 1 ), Show Major Grid( 1 )} )}

                        ),

                        Dispatch(

                            {},

                            "400",

                            ScaleBox,

                            {Legend Model(

                                37,

                                Level Name( 0, "Cumulative Revenue Difference in €" ),

                                Properties( 0, {Marker( "Circle" ), Fill Color( -42204 )} )

                            ), Legend Model(

                                38,

                                Level Name( 0, "Cumulative Reveneu Performance in %" ),

                                Properties( 0, {Marker( "Circle" ), Fill Color( -21101 )} )

                            )}

                        ),

                        Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),

                        Dispatch( {}, "X title", TextEditBox, {Set Text( "SALES DATE" )} ),

                        Dispatch( {}, "Y title", TextEditBox, {Set Text( "CUMULATIVE REVENUE DEFICIT IN €" )} ),

                        Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 2 ), Left( 1 ), Right( 1 ), Top( 1 ), Bottom( 1 )} ),

                        Dispatch( {}, "Y 1 title", TextEditBox, {Set Text( "CUMULATIVE REVENUE PERFORMANCE IN %" )} ),

                        Dispatch( {}, "Graph Builder", FrameBox( 2 ), {Marker Size( 2 )} )

                    )

                ),

            ),

        ),

  

  //TABULATE

        Outline Box( "TABULATE of CUMULATIVE REVENUE CURVES [Last 30 Days]",

            Panel Box(

                "Resort:Island, Report:Simulation, SubReport:CumulativeRevenueCurve, Author:SaitCopuroglu,  " || Long Date( Today() ) || " " ||

                Format( Time Of Day( Today() ), "h:m" ),

                dtagencystay << Tabulate(

                    Show Control Panel( 0 ),

                    Uniform plot scale( 0 ),

                    Set Format(

                        Mean(

                            :Confidence Upper 95%( 17, 2 ),

                            :Predicted Spline( 17, 2 ),

                            :Confidence Lower 95%( 17, 2 ),

                            :Name( "Cumulative[Fit Model ISL]" )(17, 2),

                            :CumSumBySalesDate( 17, 2 ),

                            :CumRevDifference( 17, 2 ),

                            :CumRevPerf%( 12, 2 )

                        )

                    ),

                    Add Table(

                        Column Table(

                            Analysis Columns(

                                :Confidence Upper 95%,

                                :Predicted Spline,

                                :Confidence Lower 95%,

                                :Name( "Cumulative[Fit Model ISL]" ),

                                :CumSumBySalesDate,

                                :CumRevDifference,

                                :CumRevPerf%

                            ),

                            Statistics( Mean )

                        ),

                        Row Table( Grouping Columns( :SalesDate ) )

                    ),

                    Local Data Filter(

                        Mode,

                        Add Filter( columns( :SalesDate ), Where( :SalesDate >= Today() - In Days( 30 ) & :SalesDate <= Today() ) )

                    ),

                    SendToReport( Dispatch( {}, "Tabulate", OutlineBox, {Set Title( "TABULATE of CUMULATIVE REVENUE CURVES [Last 30 Days]" )} ) )

                ),

            ),

        ),

    ),

    Outline Box( "METRICS by MONTH",

        dt_master = Data Table( "BudgetWithAgency.jmp" ),

.

.

.

.

.

.

.

.




@Daniel_Valente