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)
Add data from 2 crosstabs
jpvde
I have 1 cross tab Revenues and 1 cross tab exp.
both of them give me a total (TotRev from CT1 and TotExp from CT2)
How can I outside those crosstabs make the difference beetween Rev and Exp and put it in a third part of this reporting?
Thank you all
jpvde
Find more posts tagged with
Comments
mwilliams
Hi jpvde,
Sorry for the delay. We usually don't expect posts like this in the general discussion forum. I'm moving your post to the designing BIRT reports forum.
The answer to your question is to use persistentGlobalVariables to store the totals of each of your crosstabs and then recall those varaibles in your third section of your report to sum them. Hope this helps. Let me know if you have any questions.
jpvde
hi mwilliams,
well i'had hollidays too ....
I know how to put fixed things as "reportContext.setPersistentGlobalVariable("testglobal", "test global string");" for example
but
I just want to know how I can store the value of a datasetrow in the variable
thank you
mwilliams
jpvde,
You can set a PGV in your dataSet's onFetch script if you want to grab a dataSet value. If it's a string, you'd be able to set the PGV like:
reportContext.setPersistentGlobalVariable("pgvName", row["fieldName"]);
If you're setting it from a total in a crosstab, you'd grab the value of the element you want in its onCreate script and store it to the PGV in a similar fashion.
Let me know if you need help!
jpvde
Well,
I'm sorry I can't do it
how ridiculous i feel now :wub:
may be it's because I'm not English speaking.
So the best way is, I hope so, to give you a short sample of the report (based on the classic model)
the goal is off courses to fill [GSum] with S10100+S10200
thank you already
Best regards
jpvde
mwilliams
jpvde,
Take a look at the changes to the attached. You'll find script for each value you want to grab and then script in a dynamic textbox to display the computed value.
Hope this helps.
jpvde
Well, thanks a lot
mwilliams
Not a problem! Let us know whenever you have questions!