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)
Dynamic text
mgranadino
Hi!
I have this definition of a table:
Header: type , value
Detail : [typeDataSet], [valueDataSet]
when I execute my report this is the result:
type | value
bonos | 525,33
fondos | 231,98
acciones | 7791,33
Then I want to access to the fondos's value in my text, but I dont know how to ask for this row in my dynamic text...
Thanks!
Find more posts tagged with
Comments
mwilliams
Hi mgranadino,
So, what you're wanting to do is report the value of a line item out of the table in a dynamic text box?
If this is the case, in the script for your detail row on your table, you should be able to write a simple if statement to check the "type" for "fondos" and then grab the "value" and put it in a variable to call in your dynamic text box.
Let me know if I'm not understanding correctly.
mgranadino
You understand correctly my question, tanks!
But I dont know how to generate the script for the detail row... where I write this script??
Regards,
María
mgranadino
hi, could somebody to reply my question please???
thanks!!!!
María
mwilliams
María,<br />
<br />
Sorry for the delayed response. To get the value of "fondos" and display it elsewhere in your report, you just need to do the following.<br />
<br />
1. In your "initialize" script for your report, create a variable. (i.e. f=0; )<br />
<br />
2. In the "onCreate" script for the detail row of your table, use this script:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(row["type"] == "fondos"){
f = row["value"];
}
</pre>
<br />
3. In a dynamic test box, use the variable 'f' to display the "fondos" value however you would like. (i.e. "fondos = " + f; )<br />
<br />
Hope this helps.
mgranadino
It works! Thanks!!
I have other question, how I can to format a dynamic text?? I have a decimal value and I want this format: x.****.****,****
Regards,
María