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)
how to add two different fields of to differnet datasets
Karsten
Hello,
I try to add two different fields of to differnet datasets.
How can I do that?
I had two Tables with summation in the footer of tables.
Now only these two summations I want to add in one extra field.
Thanks!
Karsten
Find more posts tagged with
Comments
mwilliams
Hi Karsten,
Can you explain a little more about your issue? I'm not sure I'm understanding completely. Thanks!
Karsten
I add an image for explanation...
the goal is to get "X" (X = 1 + 2).
I don't know how I can add these to fields.
Please Help me.
Thanks!
Karsten
mwilliams
Karsten,
You could assign both of those values to global variables and call both of them in the expression of "X" and add them together.
Karsten
Hello,
thanks for your advice I got now the summation of these two fields.
But I have one little problem with formating this result.
Example: (in my dynamic result_field)
BirtMath.add(zwischensumme, vorrauszahlung) + " ?"
Everytime I get a result for example 1.79 - how can I fomat it to 1,79 ???
Can you help me ?
The Skript I use to get the global variables is:
row_Data = this.getRowData();
zwischensumme=row_Data.getExpressionValue("row[ZWSumme]");
reportContext.setPersistentGlobalVariable("zwischensummeKey",zwischensumme);
Is this correct ??
Thanks a lot!
Karsten
bhanley
Do you have this formatted as a "Currency" type numeric? If so the separator should be/can be localized.<br />
<br />
Also, you can choose to format the vlaue as a number, and choose "Custom" as the type. From here you can build out a mask to reflect anything you want. The following mask would give you what you need:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>¤###0.00</pre>
Karsten
I put in one field these function:
BirtMath.add(zwischensumme, vorrauszahlung)
and the I combine a stil (currency) to this field but nothing happens.
why not ???
Thanks a lot!
Karsten
Karsten
Thanks a lot!
Karsten
mwilliams
Karsten,
Are the two variables you're trying to use in the function your pGV's? If so, can you show all the code you use to get these values?
Also, when you say "nothing happens", do you mean you're getting nothing as an output at all? Or just that it's not changing to a currency format?
Karsten
Hello Michael,
I put an example to the Attached Files.
I put "61,79" to the global variable with this Script:
row_Data = this.getRowData();
zwischensumme=row_Data.getExpressionValue("row[ZWSumme]");
reportContext.setPersistentGlobalVariable("zwischensummeKey",zwischensumme);
I put "-60,00" to the global variable with this Script:
row_Data = this.getRowData();
vorrauszahlung=row_Data.getExpressionValue("row[rz_brutto]");
reportContext.setPersistentGlobalVariable("vorrauszahlungKey",vorrauszahlung);
And the result I get direct in the Expression of the field with this code:
BirtMath.add(zwischensumme, vorrauszahlung)
"nothing happens" means not changing to a currency format...
I hope that helps for explanation.
Regards,
Karsten
Karsten
Thanks a lot!
Karsten
mwilliams
Karsten,
What are you doing to set the number format? Are you using the formatNumber tab of the property editor?