Jump to content

BIRT Developer Center Download


Photo
- - - - -

Excel Output tab names from Group value in table


  • Please log in to reply
7 replies to this topic

#1 Nancy Stanger

Nancy Stanger

    Member

  • Members
  • PipPip
  • 12 posts

Posted 02 January 2014 - 07:19 AM

Hi and Happy New Year,

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.

 

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.

 

The attached file has the sample output.

 

Thank you for your help with this.

 

Attached Files



#2 mblock

mblock

    Expert Member

  • BIRT Experts
  • 1888 posts

Posted 02 January 2014 - 07:37 AM

Check put this DevShare:

 

http://developer.act...export-to-excel


Regards,

Mica J. Block

Principal Analytics Architect

OpenText Corporation


#3 Nancy Stanger

Nancy Stanger

    Member

  • Members
  • PipPip
  • 12 posts

Posted 02 January 2014 - 08:24 AM

Thanks, Mica.  I checked out the link provided. 

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.

 

In the onPageBreak event for the table with the group I entered the following code:

reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, this.getValue() );  This did not work.

 

I then tried putting the group name  (GroupValidationID) in the getValue().  Looks like this:

reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL,  this.getValue(GroupValidationID) );  This did not work.

 

I believe that the tab names that are being generated are using the report title with a single digit counter. 



#4 mblock

mblock

    Expert Member

  • BIRT Experts
  • 1888 posts

Posted 02 January 2014 - 01:33 PM

Does the example in the DevShare work for you?


Regards,

Mica J. Block

Principal Analytics Architect

OpenText Corporation


#5 Nancy Stanger

Nancy Stanger

    Member

  • Members
  • PipPip
  • 12 posts

Posted 03 January 2014 - 07:40 AM

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. 

 

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. 

 

Thank you very much for your help.

 

Nancy



#6 mblock

mblock

    Expert Member

  • BIRT Experts
  • 1888 posts

Posted 03 January 2014 - 07:46 AM

Your very welcome


Regards,

Mica J. Block

Principal Analytics Architect

OpenText Corporation


#7 Radhamh

Radhamh

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 17 March 2017 - 01:08 AM

Hi,
I m using [/size]Eclipse BIRT Designer Version 4.5.0.v201506092134 Build for BIRT report design,

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..

can anyone please help me out.

Thanks in advance

radha.mh@greytip.com



#8 notescarmenr

notescarmenr

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 16 May 2017 - 11:43 AM

Hi

Radhaselect table then page break and then in after select always