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)
Sheet Name Issue
Emy
<p>Hi ,</p>
<p> </p>
<p> I want to provide a sheet name like 11.5A .But Birt does not support this.So,I have tried to give script on grouping & it does not work for null values.How do i achieve.</p>
<p> </p>
<p>Thanks in advance.</p>
<p> </p>
<p>Regards,</p>
<p>Emy</p>
Find more posts tagged with
Comments
JFreeman
<p>I'm not clear for your description exactly what you are wanting to do.</p>
<p>Are you referring to sheet names for excel output?</p>
<p>Can you elaborate on exactly what you are wanting to achieve?</p>
Emy
<p>Hi JFreemen,</p>
<p> </p>
<p> </p>
<p> Yes..I want to a sheet name like 11.5A..How to do.</p>
<p> </p>
<p>Regards,</p>
<p>Emy</p>
JFreeman
<p>What version of BIRT are you using?<br>
What excel emitter are you using?</p>
Emy
<p>Hi, </p>
<p> </p>
<p> I'm using Eclipse BIRT Designer Version 4.4.0. & XLSX</p>
<p> </p>
<p>Regards,</p>
<p>Emy</p>
JFreeman
<p>Sorry I forgot to ask this in my previous post, could you please elaborate on the issue you are facing with null values when using scripting on the grouping to set the sheet names?</p>
<p> </p>
<p>Are you trying to pass a null value as the sheet name?</p>
<p>Where does the null value come into play?</p>
Emy
<p>Hi,</p>
<p> </p>
<p> </p>
<p> I have attached a sample report which is grouped by customer_number also it has one parameter as customer_number.when we are giving value for parameter,sheet name came as we expected..Otherwise, it shows "sheet 0" as sheet name for null value of parameter..but i want 11.2A as the sheet name for null value of parameter.</p>
<p> </p>
<p>Not able to set sheet name as 11.2A for whole table in general.</p>
<p> </p>
<p>Thanks.</p>
<p> </p>
<p>Regards,</p>
<p>Emy</p>
JFreeman
<p>The reason you are seeing this behavior has to do with attempting to set the name in the grouping on the table. This will work fine when data is passed to the table but when the query returns no data to the table I do not believe the grouping and it's table of contents is being built which is why the script you are using it not taking effect.</p>
<p> </p>
<p>Instead, you can use this.name in the onCreate of the table to specify the value for when no data is passed to the table.</p>
<p> </p>
<p>Take a look at the attached modified version of your example. I have added this line to the onCreate of the table:</p>
<pre class="_prettyXprint _lang-js">
this.name="11.2A";
</pre>
<p>I have also removed the else clause from your previously existing if statement as it is no longer necessary. Using this approach, if there is data, the scripting in the grouping will override the table name set in on create but when there is no data the name specified in onCreate is what will appear for the sheet name.</p>
Emy
<p>Hi JFreeman,</p>
<p> </p>
<p> Thanks .It works well.
</p>
<p> </p>
<p>Regards,</p>
<p>Emy</p>
JFreeman
<p>You're welcome.</p>
<p>Let us know if you have any additional questions.</p>