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)
Setting name for different sheets in excel report
ashish13
Hi,
I have to set name for different sheets in excel report. How can i configure the same using designer. I am using native excel emitter to generate report in multiple sheet, but not able to set the name for different sheet. Help me on the same.
Thanks,
Ashish
Find more posts tagged with
Comments
Yaytay
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="98126" data-time="1332411547" data-date="22 March 2012 - 03:19 AM"><p>
Hi,<br />
<br />
I have to set name for different sheets in excel report. How can i configure the same using designer. I am using native excel emitter to generate report in multiple sheet, but not able to set the name for different sheet. Help me on the same.<br />
<br />
Thanks, <br />
Ashish<br /></p></blockquote>
From a quick look at the code I think he's picking the sheet name up from the report title, and there doesn't seem to be any way to set it per sheet.<br />
<br />
There doesn't seem to be much consistency on how to name sheets from the various Excel emitters. Tribix uses a RenderOption with an expression language; SpudSoft uses table/grid names (or List TOC); and Ramesh seems to use the report title.
ashish13
Hi Yaytay,
I am able to change the name of first sheet by using below command:
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, "TEST" );
but for the other sheets, the names are coming like Report1, Report2 etc. Is there any way to modify these also.
Thanks,
Ashish
Yaytay
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="98143" data-time="1332423660" data-date="22 March 2012 - 06:41 AM"><p>
I am able to change the name of first sheet by using below command:<br />
<br />
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, "TEST" );<br />
<br />
but for the other sheets, the names are coming like Report1, Report2 etc. Is there any way to modify these also.<br /></p></blockquote>
Where did you put that script? Have you tried putting it in the onPageStart event?
ashish13
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="98145" data-time="1332424321" data-date="22 March 2012 - 06:52 AM"><p>
Where did you put that script? Have you tried putting it in the onPageStart event?<br /></p></blockquote>
<br />
<br />
I have added the script into initialize section<br />
<br />
Thanks,<br />
Ashish
Yaytay
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="98181" data-time="1332482531" data-date="22 March 2012 - 11:02 PM"><p>
I have added the script into initialize section<br />
<br />
Thanks,<br />
Ashish<br /></p></blockquote>
I've just posted a response to your other thread that includes an example that sets the name of each sheet.<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/topic/24991-api-for-birt-report/#entry98185'>http://www.birt-exchange.org/org/forum/index.php/topic/24991-api-for-birt-report/#entry98185</a><br
/>
<br />
It took quite a bit of experimenting with different event handlers to get it right. One issues is that the value set in an onPageBreak affects the next sheet, so I needed to use two event handles in order to get the name set for the first sheet too.