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)
Data Element vs Dynamic text
Avdhesh
Hello,
I'm new to Birt in struggling in creating the design. I've two questions:
1. I've defined following variable on onFetch() method of dataset.
table1_row = row["EDTREF"];
When I try to access table1_row inside Grid using Data Element, value of table1_row is always shown blank; however once I use Dynamic text (inside Grid) correct value is shown. I would like to use Data Element.
2. I'm using nested grid to use different datasets. How can I put value from data element (inside grid) to data element of outside grid. I tried to use global variable on onCreate event but was not successful.
Thanks for your help.
Avdhesh
Find more posts tagged with
Comments
mwilliams
Avdhesh,
For #1, is your grid bound to your dataSet? If not, try doing that.
For #2, can you explain a little more about what you're trying to do? Explain your scenario so I know more about what to suggest.
Thanks.
Avdhesh
Hello Michael,
Thanks for your reply.
1. I think my issue was nested grid. It seems outer grid is created before nested grid. I was setting global variable in nested grid and trying to use in outer grid.
2. My issue is I've summary section which represents total of various elements calculated later in report. Is it possible to populate summary total (prsented first in report) with the values calculated later in detail and do total in summary. Could I keep the values in variable and do total of summary at randering time?
Thanks,
Avdhesh
mwilliams
Avdhesh,
Have you tried storing the variable in the onCreate and displaying it up above in the onRender in a dynamic textbox?
Avdhesh
Hello Michael,
Thanks for your reply.
I've created attached scripting. Once Report is created in two phases 1. Run and 2. Render total is calculated correctly; however, in Report Designer preview (I belive use Run&Render) I get NAN. How to fix this issue so I see correct calc at preview time as well.
Thanks,
Avdhesh
OnRender()
totalRetirement = parseFloat(reportContext.getPersistentGlobalVariable("PersTotalSsnAndRetirementBenefits"));
totalAnnualandEd = parseFloat(reportContext.getPersistentGlobalVariable("PersAnnualSalaryAndEductionTotal"));
this.setDisplayValue(totalRetirement + totalAnnualandEd);
onCreate()
reportContext.setPersistentGlobalVariable("PersAnnualSalaryAndEductionTotal",this.getValue());
onCreate()
reportContext.setPersistentGlobalVariable("PersTotalSsnAndRetirementBenefits", this.getValue());
mwilliams
Avdesh,
I don't know if there's going to be a way to get it to work as you want with the RunAndRender task for preview. Is there a need for this to work in preview mode?
Avdhesh
Hello Michael,
Thanks for your reply.
I can live with this in design mode; however, it will be nuisance as I need to go verify output at build server.
Though, I'm curious to know is this behavior by design? It seems with RunAndRender both Run and Render occurs sequentially due to this my global variable is displaying before calculating?
Thanks,
Avdhesh
mwilliams
Yes, the RunAndRender task is exactly that, the two tasks run simultaneously where as the separate tasks run in series.