Home
Analytics
Excel Output tab names from Group value in table
Nancy Stanger
<p>Hi and Happy New Year,</p><p>I have designed a number of simple BIRT reports but I need some help. I am using Eclipse Platform
Version 3.6.2. Our BIRT programs are executed on an iServer. I am exporting output to Excel in MS Office 2010.
I am trying to create a BIRT report that outputs a number of validation error data rows. Each data row has a validation ID and an entity ID as well as other data fields. There will be many distinct entity IDs for each validation ID. I would like to create a report that will export to Excel with a list of all entity IDs and other data fields for each validation ID with each validation ID on a different worksheet tab in the Excel file. When I
export this to Excel I want the label of the worksheet tab to be the value of the validation ID. I have provided a sample of what output might look like.</p><p> </p><p>I know that I can create a table called All Validations – first sample output and then I can create another table that will have a group by validation ID – sample output images 2 and 3 below – and I can set the page
breaks to break on the grouping. I would like to know how to set the validation ID (which is the group value) to be the label on the page that will export to Excel with this name (i.e validation ID) on the tab.</p><p> </p><p>The attached file has the sample output.</p><p> </p><p>Thank you for your help with this.</p><p>
</p>
Find more posts tagged with
Comments
micajblock
<p>Check put this DevShare:</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/devshare/_/designing-birt-reports/1451-naming-tabs-in-export-to-excel'>http://developer.actuate.com/community/devshare/_/designing-birt-reports/1451-naming-tabs-in-export-to-excel</a></p>
;
Nancy Stanger
<p>Thanks, Mica. I checked out the link provided. </p><p>I have been able to 'hard code' a page label and the output to Excel is as expected for the table that did not have a group. However I could not get the second set of code to create the required tab names in Excel for the table with the group.</p><p> </p><p>In the onPageBreak event for the table with the group I entered the following code:</p><p>reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, <strong class='bbc'>this</strong>.getValue() ); This did not work.</p><p> </p><p>I then tried putting the group name (GroupValidationID) in the getValue(). Looks like this:</p><p>reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, <strong class='bbc'>this</strong>.getValue(GroupValidationID) ); This did not work.</p><p> </p><p>I believe that the tab names that are being generated are using the report title with a single digit counter. </p>
micajblock
<p>Does the example in the DevShare work for you?</p>
Nancy Stanger
<p>Thanks, Mica. I tried the examples and they worked well. They allowed me to see where to put the code to name the Excel tab. </p><p> </p><p>I must put this code in the onPageBreak on the data field that has the required value, in my case on the field in the group header row. I had been trying to put this code in the onPageBreak on the table, so now I understand why this did not work. </p><p> </p><p>Thank you very much for your help.</p><p> </p><p>Nancy</p>
micajblock
<p>Your very welcome</p>
Radhamh
<p>Hi,<br><span style="color:#242729;"><span style="font-family:Arial;">I m using [/size]</span></span>Eclipse BIRT Designer Version 4.5.0.v201506092134 Build<span style="color:#242729;"><span style="font-family:Arial;"> for BIRT report design, </span></span></p>
<p><span style="color:#242729;"><span style="font-family:Arial;">I have multiple contracts and i have done grouping on contract in design so that it will group on contract details and give separate tables per group/per contract. In excel sheet i am getting all tables one next to other instead i want those in separate sheets per group. i.e, 1st contact in first sheet 2nd contract in 2nd sheet etc.. </span></span></p>
<p><span style="color:#242729;"><span style="font-family:Arial;">can anyone please help me out.</span></span></p>
<p><span style="color:#242729;"><span style="font-family:Arial;">Thanks in advance</span></span></p>
<p><span style="color:#242729;"><span style="font-family:Arial;">radha.mh@greytip.com</span></span></p>
notescarmenr
<p>Hi</p>
<p>Radhaselect table then page break and then in after select always</p>