cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
NaiveJaguar366
Level II

How to create banner

I'm trying to create a company banner at the top of my html output file, which is saved from a journal.

 

I using the following jsl code:

<jsl>

logo = open("company_logo.png", png);
logo << set size({93, 48});

H List Box(
Picture Box(logo),
Text Box( "Company Name " )
),

<jsl>

The problem I got is the text inside the Text Box is aligned to the top of the image. I need to get the text sitting at the bottom of the image.

 

What would be the best way to go about creating a nice report header.

 

Note: using JMP 16.

1 ACCEPTED SOLUTION

Accepted Solutions
Jasean
Staff

Re: How to create banner

HListBox has an optional parameter to adjust the horizontal alignment of the child boxes.  Try

logo = open("company_logo.png", png);
logo << set size({93, 48});

H List Box(
	Align("Bottom"),
	Picture Box(logo),
	Text Box( "Company Name " )
)

View solution in original post

4 REPLIES 4
Jasean
Staff

Re: How to create banner

HListBox has an optional parameter to adjust the horizontal alignment of the child boxes.  Try

logo = open("company_logo.png", png);
logo << set size({93, 48});

H List Box(
	Align("Bottom"),
	Picture Box(logo),
	Text Box( "Company Name " )
)
Craige_Hales
Super User

Re: How to create banner

If you want something like this

 

A JMP report in the right side of a display tree. The left side is a vertical stack of two items.A JMP report in the right side of a display tree. The left side is a vertical stack of two items.

 

You could use something like this

 

dt = Open( "$sample_data/big class.jmp" );
the_report = V List Box( // use vlist for capturing, not displaying
    dt << Bivariate( Y( :weight ), X( :height ), Fit Line )
);

logo = Icon Box( "JMPLogo" ) << getpicture; // 262 wide by 152 tall
logo << set size( {93, 48} );
New Window( "test the logo",
    Border Box( Left( 10 ), top( 10 ),
        H List Box(
            V List Box(
                Picture Box( logo ),
                Text Box( "Company Name " )
            ),
            Border Box( Left( 5 ), the_report )
        )
    )
);

 Using a vlistbox for capturing the report will work better than most other boxes in some rare cases. The report notices it is being created inside of the vlist and does not open its own window. I added a little space with left(5) inside the logo boiler plate, and moved the logo away from the edge with left(10), top(10).

 

You don't have to show the window on the screen and manually capture the picture. You could use this:

 

dt = Open( "$sample_data/big class.jmp" );
the_report = V List Box( // use vlist for capturing, not displaying
    dt << Bivariate( Y( :weight ), X( :height ), Fit Line )
);

logo = Icon Box( "JMPLogo" ) << getpicture; // 262 wide by 152 tall
logo << set size( {93, 48} );

logoreport =
    Border Box( Left( 10 ), top( 10 ),
        H List Box(
            V List Box(
                Picture Box( logo ),
                Text Box( "Company Name " )
            ),
            Border Box( Left( 5 ), the_report )
        )
    );

logoreport<<savepicture("f:/test the logo.png");
open("f:/test the logo.png");

To get

Saved without opening a window.Saved without opening a window.

Craige
NaiveJaguar366
Level II

Re: How to create banner

Thanks for taking the time to reply. I never though about putting an Icon Box inside a Picture Box.

 

Many thanks.

Craige_Hales
Super User

Re: How to create banner

You're welcome! I was just grabbing the picture from the icon to follow your example. It could have used the icon directly, but then I would not have been able to size it.

Craige