|
Re: Border for Table Detail columns [message #926567 is a reply to message #925975] |
Fri, 28 September 2012 19:37 |
|
It looks like you are applying the border to the rows. You need to apply the borders to the row cells.
for example:
CellHandle cell = (CellHandle) tableheader.getCells( ).get( 0 );
cell.setProperty(StyleHandle.BORDER_BOTTOM_COLOR_PROP, "#000000");
cell.setProperty(StyleHandle.BORDER_BOTTOM_STYLE_PROP, "solid");
cell.setProperty(StyleHandle.BORDER_BOTTOM_WIDTH_PROP, "2px");
Jason
|
|
|
|
|
|
Re: column span problem [message #931290 is a reply to message #929616] |
Wed, 03 October 2012 04:29 |
Nitin Kulkarni Messages: 13 Registered: September 2012 |
Junior Member |
|
|
Hi jason,
Thanks for your reply... There is no design file for this report am creating the report dynamically, i mean table item and master page.. everything am creating dynamically
Not only bank column being messed up, all the columns from bank column are getting messed up..
Am applying columns span for the "Grand Total" cell so because of that this problem is arising...
Any solution for this problem?? jason
Nitin
[Updated on: Wed, 03 October 2012 07:47] Report message to a moderator
|
|
|
Re: column span problem [message #931812 is a reply to message #931290] |
Wed, 03 October 2012 14:51 |
|
When you create the report dynamically you should have access to the report design handle. After generating all the report, use the design handle to do a saveAs and save the report. You can then open the report in the designer. Are you setting the column widths? You may want to try setting to a specific value.
Jason
|
|
|
|
|
|
|
|
Re: column span problem [message #937320 is a reply to message #934615] |
Mon, 08 October 2012 22:11 |
|
You should be able to use the basic same code, but use the Report Engine to open a report and get the design handle like:
config = new EngineConfig( );
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
IReportRunnable design = null;
//Open the report design
design = engine.openReportDesign("Reports/TopNPercent.rptdesign");
ReportDesignHandle report = (ReportDesignHandle) design.getDesignHandle( );
Jason
|
|
|
|
Re: column span problem [message #939839 is a reply to message #938726] |
Thu, 11 October 2012 04:51 |
|
You should be able to do this using the row handle:
HideRule hr = StructureFactory.createHideRule();
hr.setFormat("all");
hr.setExpression("if( row[\"mycol\"] == 0 ){true;}else{false;}");
PropertyHandle ph = rowhandle.getPropertyHandle(ReportItem.VISIBILITY_PROP);
ph.addItem(hr);
Jason
|
|
|
|
|
|
Re: column span problem [message #949340 is a reply to message #947466] |
Thu, 18 October 2012 23:12 |
|
To do it with the API just use the data item setOnCreate/setOnRender script. It takes a string parameter with the script to exectute.
You can insert an additional detail row in code like
RowOperationParameters ro = new RowOperationParameters(/*IListingElementModel.DETAIL_SLOT*/2, -1, 0);
table.insertRow(ro);
You get the detail row to add content like:
RowHandle tabledetail = (RowHandle) table.getDetail( ).get(1 ); //notice the 1 index instead of 0
You can then put a visibility rule on it so it will get hidden based on the data:
RowHandle tabledetail = (RowHandle) table.getDetail( ).get(1 );
HideRule hr = StructureFactory.createHideRule();
hr.setFormat("all");
hr.setExpression("true");
hr.setExpression("if( row[\"mycol\"] == 0 ){true;}else{false;}");
PropertyHandle ph = tabledetail.getPropertyHandle(ReportItem.VISIBILITY_PROP);
ph.addItem(hr);
Jason
|
|
|
|
Powered by
FUDForum. Page generated in 0.06954 seconds