I am making a report from a wide(ish) data table using the command
dispObj = DT << get as report;
This generates a borderBox Display Object which I then add to a new window using
newWindow("Test", dispObj);
Problem is the report table has a horizontal scroll bar added which I do not want. How do I remove this scroll bar and allow the report display object to fill the window fully in the horizontal direction? If the Window is widened it does not make a difference to the underlyng report...i.e. it does not widen or remove the scroll bars
reportWindow.jpg
My experience with this, is that if you change the window size for the data table, before you move the table into the report.
names default to here(1);
dt=current data table();
dt<<set window size(2400,800);
dispObj = DT << get as report;
newWindow("Test", dispObj);
My experience with this, is that if you change the window size for the data table, before you move the table into the report.
names default to here(1);
dt=current data table();
dt<<set window size(2400,800);
dispObj = DT << get as report;
newWindow("Test", dispObj);
Jim, I like this solution and didn't realise the report generated is dependant on the table (window) size. Do you know of a way to identify the width of the contents of a data table window - i.e. the width of the combined columns - not the width of the DT Window which I could get with DT<< getWindowSize() . This would allow me to dynamically set the window size to the width of the columns in my data table (up to a max width dependent on my GUI) before allowing the scroll bar to be used.
Cheers.
One way to ensure that no scroll bars are used is to turn off the scrolling for the TableBox all together. See example below for details.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
rpt = dt << get as report();
rpt[Table Box( 1 )] << Set scrollable( 0 );
New Window( "Test", rpt );
EDIT: Please note that this also turns off the vertical scroll bar.
I line up the report with a wide spacer box:
dt = current data table();
dispObj = dt << get as report;
new window("test",
LineupBox(NCol(1),
Spacer Box(Size(1200,0)),
dispObj
)
)