cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
itzikd
Level II

Center text in a report

I'm trying to center a report a created so the text is all centered instead of RTL for number and LTR for text

here is my code, dt is just a data table I tried using "Horizontal Alignment( "center" )" but it didn't work

5 REPLIES 5
itzikd
Level II

Re: Center text in a report

myPlatform = New Window( "Record Wafers",
modal,
myDispObj = dt << getAsReport,
myDispObj[Table Box( 1 )] << Set Scrollable( 0, 0 ) << Horizontal Alignment( "center" )
);
ian_jmp
Level X

Re: Center text in a report

Assuming the text you mention is in a 'StringColBox()':

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
biv = dt << Bivariate( Y( :weight ), X( :height ), Fit Line );
repBiv = Report(biv);

Wait(3);
repBiv[StringColBox(1)] << setJustify( "center" );
itzikd
Level II

Re: Center text in a report

thanks but it doesn't work here is my code again, i added the excel, hopefully you can show me what's wrong

 

dt = Open( "C:\Users\test.xls", "invisible" );
ob = Outline Box( "test", vl = V List Box() );
myPlatform = New Window( "test",
modal,
myDispObj = dt << getAsReport,
myDispObj[StringColBox( 1 )]<< setJustify( "center" );
myDispObj[Table Box( 1 )] << Set Scrollable( 0, 0 );
);

 

itzikd_0-1604585384276.png

 

ian_jmp
Level X

Re: Center text in a report

Using JMP 15.2 (on a Mac), with your code above I get (after stretching the column);

Screenshot 2020-11-05 at 14.42.49.png

If I remove the 'setJustify()', I see:

Screenshot 2020-11-05 at 14.42.05.png

itzikd
Level II

Re: Center text in a report

I'm using jmp 12 ... but even in jmp 15 the "test2" and "test3" are still not in the middle, you can see "test2" is not center, but aligned to the right.
is there a way to center all the columns?