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)
Global variable not showing totals
Jennyoh
My report summarizes the costs for labor, tools and materials.
It needs to display the cost summary at the beginning.
At first,
I bind the labor cost to the totlaborcost in the laborTable,
the tool cost to the tottoolcost in the toolTable and
the material cost to the totmatcost.
Each of this cost is set to a global variable.
I get the total cost by summing the global variable
df = new Packages.java.text.DecimalFormat("$#,###.00");
reportContext.setPersistentGlobalVariable("gtotalcost",df.format(
parseFloat(reportContext.getPersistentGlobalVariable("glaborcost"))
+ parseFloat(reportContext.getPersistentGlobalVariable("gtoolcost"))
+ parseFloat(reportContext.getPersistentGlobalVariable("gmaterialcost"))
));
I ran in designer and the total cost displays values but
when I imported the report into maximo. The total cost does not display.
Is that something I am missing?
Find more posts tagged with
Comments
mwilliams
What output format are you using in the designer? What are you using in Maximo?
Jennyoh
I put a dynamic label in the report with the following expression
reportContext.getPersistentGlobalVariable("gtotalcost")
I am using Maximo version 7117. I am getting subtotals
from labtrans, tooltrans and matusetrans tables.
The report is running from the wotrack application.
Is there an order I need to follow so that the total will display?
mwilliams
Try setting the text of your dynamic text box in its onRender script. I'm assuming you're setting the PGV's in onCreate script. If you're doing this and using separate run and render tasks, it should work. I've not used Maximo, so it's hard for me to give a definitive answer. Let me know.
Jennyoh
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="84354" data-time="1319058383" data-date="19 October 2011 - 02:06 PM"><p>
Try setting the text of your dynamic text box in its onRender script. I'm assuming you're setting the PGV's in onCreate script. If you're doing this and using separate run and render tasks, it should work. I've not used Maximo, so it's hard for me to give a definitive answer. Let me know.<br /></p></blockquote>
Jennyoh
I was setting the PGV in the onRender script. After I changed the PGV setting to onCreate,
I was able to see the total. Thanks.
mwilliams
Ah, that'll do it! Glad it's working for you now! Let us know whenever you have questions!