Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Border for Table Detail columns(Border for Table Detail columns)
Border for Table Detail columns [message #925975] Fri, 28 September 2012 07:34 Go to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi all,

Am dynamically creating the table item using report engine API's, am able to apply border for the table header, table detail, table footer...
but the borders are coming to only for rows not columns..
i want to apply border for each column also..

For better understanding i have attached report file..

Please if anybody knows how to do than let me know..

Thanks in advance
Re: Border for Table Detail columns [message #926567 is a reply to message #925975] Fri, 28 September 2012 19:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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: Border for Table Detail columns [message #926985 is a reply to message #926567] Sat, 29 September 2012 06:04 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi Jason,

I followed as u said and its working now...


Thank you very much for the help, i was looking for the solution from last one week but wasn't able to do it..


column span problem [message #927199 is a reply to message #926567] Sat, 29 September 2012 11:12 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi jason,

Thanks for the previous solution and i have one more problem which is related to the column span in the table footer..

I have set column span for the first cell of table footer and its coming fine but its creating the problem for table detail band to disassociate.. i mean the alignment in the table detail band getting disturbed..

for your reference i have attached the two files, one without column span applied in the table footer and one with the column span applied in the table footer of first cell

Thanks in advance
Re: column span problem [message #929616 is a reply to message #927199] Mon, 01 October 2012 16:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Are you referring to the bank column being messed up? Can you post the design?

Jason
Re: column span problem [message #931290 is a reply to message #929616] Wed, 03 October 2012 04:29 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #932762 is a reply to message #931812] Thu, 04 October 2012 12:03 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi Jason,

I have solved the problem of column span by generating the design file by following as you said... actually it was my mistake, without dropping the next cell of a "Grand total" i applied column span so it was inserting one more column because of that problem was arising..

Now one more help i want from your side, i want to create report which will be having sub-report dynamically, i mean using report engine API's...

do you have any reference or java code for creating sub-report, if so please send me the code..

Thanks in advance
Re: column span problem [message #932985 is a reply to message #932762] Thu, 04 October 2012 16:26 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

When you say sub report, do you mean nested tables or do you mean adding a hyperlink to another report?

Jason
Re: column span problem [message #933022 is a reply to message #932985] Thu, 04 October 2012 16:56 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi Jason,

I mean nested tables... I need java code to create sub-report using report engine apI

Thanks in advance
Re: column span problem [message #934144 is a reply to message #933022] Fri, 05 October 2012 17:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at this example:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1546-de-api--create-a-nested-table/

Jason
Re: column span problem [message #934615 is a reply to message #934144] Sat, 06 October 2012 05:28 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi Jason,

The given example uses design engine api, I want report engine api for creating sub-report ....
I need java code


Nitin
Re: column span problem [message #937320 is a reply to message #934615] Mon, 08 October 2012 22:11 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #938726 is a reply to message #937320] Wed, 10 October 2012 05:20 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi jason,

Thank you once again for the solution, i have one more query related to the table detail row hiding..

What i want to do is if one of the column of a row is 0 than i want that complete row shouldn't be displayed..

Please give me a solution for how to achieve it

Nitin
Re: column span problem [message #939839 is a reply to message #938726] Thu, 11 October 2012 04:51 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #946358 is a reply to message #939839] Tue, 16 October 2012 06:29 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hello jason,

Thanks for the solutions you have given so far.. all the solutions are working very fine..

Now i have one problem like i have one table and a grid, what i need to do is i want to use sum of one column of a table in the grid.. so how can i achieve it, please suggest me for this..

----------------
EMPID NETVALUE --- Table
----------------
001 1000
----------------
002 4000
----------------

--------------
Gross 5000 --- Grid
--------------


Thanks in advance
Nitin
Re: column span problem [message #947382 is a reply to message #946358] Wed, 17 October 2012 03:32 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Look at the attached example.

Jason
Re: column span problem [message #947466 is a reply to message #947382] Wed, 17 October 2012 05:31 Go to previous messageGo to next message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hello jason,

Thanks for the reply and the solution..
Its based on eclipse designer, how to make the same using report engine API's,
Please give me solution..

I have one more query, while generating the table detail row using report engine api is it possible to add new row to the detail row manually, the situation i encountered is there will be a detail row which ll be generated using datbase column binding and based on some condition, if the condition is true than i want to add a row to the table(Note: not a new detail row, a simple row).. if its possible than how to achieve it?? please suggest me

Thanks in advance
Nitin
Re: column span problem [message #949340 is a reply to message #947466] Thu, 18 October 2012 23:12 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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
Re: column span problem [message #949833 is a reply to message #949340] Fri, 19 October 2012 10:47 Go to previous message
Nitin Kulkarni is currently offline Nitin KulkarniFriend
Messages: 13
Registered: September 2012
Junior Member
Hi jason,

Can you please tell me how to create aggregate(SUM) using design engine api or report engine api.. any one of them is okay


Thanks
Nitin
Previous Topic:GC overhead limit exceeded problem
Next Topic:Dynamic dial chart scale
Goto Forum:
  


Current Time: Fri Apr 19 04:55:38 GMT 2024

Powered by FUDForum. Page generated in 0.02801 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top