Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Hiding a column from a table Dybamically
tinujoseph
hi , i a facing a issue while trying to hide a column from a table.<br />
I am using XML data source, and i am having two data sets<br />
<br />
1) If to the table i am adding a data field from First Data Set , then i cant add any fields from Second Data Set to the same table. Is the table work like this or i have done something wrong?<br />
<br />
2) From the same Data Set I add the fields and on condition check i want to hide one column. Please find the attachment for the Screen print.<br />
<br />
The condition i add in the column visibility property is <br />
if(row["SETT_CCY"]==row["PYMT_CCY"] ){<br />
true<br />
}else<br />
{<br />
false<br />
}<br />
<br />
<strong class='bbc'>in the above feilds SETT_CCY is in the table. PYMT_CCY is in the data set. <br />
i also tried adding the PYMT_CCY to the table as hidden , then also the same error.</strong><br />
<br />
<br />
<em class='bbc'><strong class='bbc'>in the preview it is trowing following error</strong><br />
<br />
Error.ScriptEvaluationError ( 1 time(s) )<br />
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "if(row["SETT_CCY"]==row["PYMT_CCY"] ){true}else{false}". at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:557) at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:529) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.evaluate(ReportItemExecutor.java:221) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.processColumnVisibility(ReportItemExecutor.java:433) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:91)<br />
</em><br />
<br />
<br />
Please advice<br />
<br />
thanks<br />
<br />
tinu
Find more posts tagged with
Comments
mwilliams
Hi tinu,
A table can be bound to just one dataSet. To get the data in your table from the other dataSet, you'll probably need to join the two dataSets with a joint dataSet.
For problem #2, if you click on the binding tab in the property editor for the table, is there a binding for row["PYMT_CCY"]?
tinujoseph
Thanks Michael<br />
<br />
row["PYMT_CCY"] was having no binding.....<br />
<br />
Let me explain my requirement... in my template i am having 2 rows(one header also) and 5 columns. <br />
<br />
For Column names i added one Header table(1st table-header table).For first row(Details Table-2nd table), data fields are added from <strong class='bbc'>first Data Set</strong>.For Second row (2nd table ), data fields from the <strong class='bbc'>second Data set</strong>. Please find attached screen.<br />
<br />
I want to hide one column in the out put , if the values in the first row and second row meet the condition. But with diff table i am not able to do that.<br />
<br />
With Grid i am able to do this, but problem i am facing with Grid is if the row is having multiple values , only the first row values are getting displayed. Rest of the values are not displaying.<br />
<br />
Please advice<br />
<br />
Thanks & best regards<br />
<br />
Tinu Joseph
mwilliams
Tinu,
Is there any way you can make a joint dataSet out of your two dataSets? This way there is an actual association between PYMT_CCY and SETT_CCY. With this association, you'd be able to hide values in a table based off of the other column's value.