- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Center text in a report
Created:
Nov 5, 2020 05:04 AM
| Last Modified: Nov 5, 2020 4:12 AM
(2551 views)
| Posted in reply to message from itzikd 11-05-2020
myPlatform = New Window( "Record Wafers",
modal,
myDispObj = dt << getAsReport,
myDispObj[Table Box( 1 )] << Set Scrollable( 0, 0 ) << Horizontal Alignment( "center" )
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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" );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Center text in a report
Created:
Nov 5, 2020 09:07 AM
| Last Modified: Nov 5, 2020 6:09 AM
(2497 views)
| Posted in reply to message from ian_jmp 11-05-2020
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 );
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Center text in a report
Using JMP 15.2 (on a Mac), with your code above I get (after stretching the column);
If I remove the 'setJustify()', I see:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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?
is there a way to center all the columns?