Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Want to add parenthesis in Field of dataset
Sunil1
Hello all,
please Look into following image, there is "OBM" data set field in report design,
while i run the report i got the result which is as per second image,
in that i got value 12,
Now my question is
(1) can i display value of OBM field in parenthesis like (12) ?
(2) can i add Astrix to the value like 12* ?
Find more posts tagged with
Comments
Hans_vd
1: double click on the field in the table and go to the expressio builder; then enter<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>"(" + dataSetRow["OBM"] + ")"</pre>
<br />
2: idem, but enter:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>dataSetRow["OBM"] + "*"</pre>
<br />
Regards<br />
Hans
Sunil1
Thanks hans for your reply,
Its very good idea.
I have another question:
suppose i have another dataset field named "TOTAL"
now when the value of TOTAL becomes greater than zero i want to print 12*(value of OBM with Astrix)
so How can i put conditions on dataset field(TOTAL) ?
Hans_vd
Something like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if (dataSetRow["TOTAL"] > 0) {
dataSetRow["OBM"] * 12 + "*"
}
</pre>
<br />
Regards<br />
Hans
Sunil1
Thanks Hans,
I done it as per your suggestion.
Sunil1
Following is possible only if OBM is string:
so, keep OBM's datatype as a string.
"(" + dataSetRow["OBM"] + ")"
and
dataSetRow["OBM"] + "*"
Sunil1
Hello hans,<br />
Following is my expression for OBM:<br />
<br />
<br />
if(dataSetRow["OBM_BF_CORR"]>0)<br />
{<br />
dataSetRow["OBM"]+"*"<br />
}<br />
else<br />
dataSetRow["OBM"]<br />
<br />
<br />
should i have to create this type of coding block for each field or is there any feature in birt <br />
by which we can generate function which returns me string with * ?<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/public/style_emoticons/'>http://www.birt-exchange.org/org/forum/public/style_emoticons/</a><#EMO_DIR#>/confused.gif
<br />
<br />
Thanks,<br />
Sunil