How to Hide Table Detail Row Runtime [message #786432] |
Mon, 30 January 2012 07:18  |
Eclipse User |
|
|
|
Dear All,
I have created a table at runtime.
I am trying to hide the detail row depending on some circumstances.
I am using the code for the moment:
detail = table.getDetail( ).get( 0 );
if(params["paramDetail"] == "N")
{
detail.setProperty("height","0.01mm");
}
Is there a better way? I tried:
detail.setProperty("visibility","hidden");
but to no avail
even false does not work.
Could anyone hint me here?
Thanks a lot
Karvesh
|
|
|
|
Re: How to Hide Table Detail Row Runtime [message #786998 is a reply to message #786662] |
Mon, 30 January 2012 22:08   |
Eclipse User |
|
|
|
Dear Jason,
I tried:
table = elementFactory.newTableItem( null, (4 + columnHeaderArray.length), 1, 1, 1 );
table.setProperty( "dataSet", "dsAgeing" );
table.setProperty( "name", "tblAgeing" );
if(params["paramDetail"] == "N")
{
//detail.setProperty("height","0.01mm");
table.getDetail( ).get( 0 ).drop();
}
but to no avail
I get the error:
TypeError: Cannot call method "getContent" of null (/report/method[@name="beforeFactory"]#133) (Element ID:1)
Any clue why?
Please find attached my code just in case
Kind Regards,
Karvesh
|
|
|
Re: How to Hide Table Detail Row Runtime [message #787491 is a reply to message #786998] |
Tue, 31 January 2012 11:35   |
Eclipse User |
|
|
|
You need to move this code:
//hide the detail row in case report is summarised
if(params["paramDetail"] == "N")
{
//detail.setProperty("height","0.01mm");
table.getDetail( ).get( 0 ).drop();
}
to the line above:
//------------------------------------------------------
//fianlly add the table to the report
reportDesignHandle.getBody( ).add( table );
Jason
On 1/30/2012 10:08 PM, karvesh Mising name wrote:
> Dear Jason,
>
> I tried:
>
>
> table = elementFactory.newTableItem( null, (4 + columnHeaderArray.length), 1, 1, 1 );
> table.setProperty( "dataSet", "dsAgeing" );
> table.setProperty( "name", "tblAgeing" );
> if(params["paramDetail"] == "N")
> {
> //detail.setProperty("height","0.01mm");
> table.getDetail( ).get( 0 ).drop();
> }
>
>
> but to no avail
>
> I get the error:
> TypeError: Cannot call method "getContent" of null (/report/method[@name="beforeFactory"]#133) (Element ID:1)
>
> Any clue why?
>
> Please find attached my code just in case
>
> Kind Regards,
> Karvesh
|
|
|
|
Powered by
FUDForum. Page generated in 0.05638 seconds