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)
Get grouped table header as Chart Title
Rainer
Hi all,
in my report there´s a table grouped by one item. In Header column there is one chart per group item. In my charts I want to display a title depending on tables group item value. So my question is how can I access group header title or data binding of the table from chart?
Thanks in advance
Regards Rainer
Find more posts tagged with
Comments
mwilliams
Hi Rainer,
You might be able to pass the group header value in through a persistentGlobalVariable and then change the title in the beforeGeneration function of the chart script.
Hope this helps.
Rainer
Hi Michael,
I tried this before, but it seems that surrounding table is completely rendered before charts so I only get the title of the last group header. At report execution I don´t know how many header items are in report. So I am searching for a more generic solution.
Regards Rainer
mwilliams
Rainer,
Can you make a simple example similar to your setup with the sample database?
Rainer
Hi Michael,
in the attachment you find my testreport. Please see chart script function beforeGeneration where I try to access the surrounding Customer number.
Thanks for your help
Regards Rainer
mwilliams
Rainer,
The PGV seems to work for me. Check out the modifications I made to your sample report. Let me know if this is not working for you.
Rainer
Hi Michael, thanks for your help. Unfortenatly there is the same behaviour as I described. Only the last value is stored in the variable and is displayed as chart title.
Regards Rainer
mwilliams
Rainer,
You are correct. I was only checking that this worked in the preview, not in the web viewer. I'll see if I can find another solution.
mwilliams
It works as expected in PDF and straight HTML, just not in the web viewer. I'll let you know if I find a solution to this.
mwilliams
Rainer,<br />
<br />
It was an easy fix. Just set the PGV in the onRender of your group rather than the onCreate. See the devShare example.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/1205-dynamic-chart-title-based-on-outer-group/#description'>Dynamic
Chart Title Based on Outer Group - Tips & Tricks - BIRT Exchange</a><br />
<br />
Hope this helps.
Rainer
Michael,
this works perfectly, thank you very much for your help!!
Regards Rainer