Daniel Wondyifraw
Daniel Wondyifraw

Reputation: 7713

Birt Report and How to display record on Excel using one sheet?

I use a birt in my grails application. Currently exporting to excel works, but if let say:

it will:

I wanted to know how I can import them in one single sheet to:

I have Googled it. I can't come up with a clear solution to my IDEAS.


I use the following Code in my Birt:

def IRenderOption options = null
case ReportTypeEnum.XML:
    //TODO:
    options = new RenderOption(outputFormat: "xml")
    break

The emitter I use is :

options = new EXCELRenderOption(outputFormat: "xls")
optiions.setEmitterID("uk.co.spudsoft.birt.emitters.excel.XlsEmitter") 
println "Report:"+ options.isEnableMultipleSheet() 

Does anybody have any idea? Example : sAMPLE rEPORT ON EXCEL

Upvotes: 3

Views: 10915

Answers (4)

user2070364
user2070364

Reputation: 88

This worked for me

  1. Select the entire table
  2. Go to Properties
  3. Select Page Break
  4. Set the Page Break Interval to 0

Done.

Upvotes: 0

user2791560
user2791560

Reputation: 57

Click on the data set. Open Property Editor for the same data set. Go to Page Break option and give Page break interval to maximum number. I tried and 2147483647 was the maximum number BIRT designer takes.

Set options as below.

Before = Avoid,
Inside = Avoid,
After  = Always,
Master Page = None.

Tick the Repeat Header if you want the header to be available when data overflows to next sheet in excel after 2147483647 rows.

Attaching the screenshot for reference.

Click to open screenshot

Upvotes: 1

JLB85
JLB85

Reputation: 17

I have been looking for the answer to that question for months, and finally found it by myself: there is no need to write code, just consider this:

The XLSX export makes as much sheets as there are root items in the TOC or in the first groupment of a table. if only one item, you will get only one sheet.

  • in your design, create an empty group in your main table, with the following specifications:
  • name: Root
  • group on: null (enter just these 4 letter in the field)
  • table of content: 'Customer list' (any text you may want) no problem if you have other groups, just place this one before the others (cut/paste)

Then you will get a TOC (table of content) with as first level, your group just containing the text you have defined.

This way, you also can keep the html view or pdf export with original pages, which is useful when you work with TOC for instance. Imagine having a 100 000 items population, you can create 3 groups: - one null group with TOC text like 'Population' - the second one containing just the first letter of name (you should get 26 items) - the last one containing people names

then, you will have to manage only 100000/26=3846 items per sub group.

And for those who do want excel sheets, remember : the first group item count equals the excel sheet count....

Upvotes: 2

Daniel Wondyifraw
Daniel Wondyifraw

Reputation: 7713

The solution was ain't to modify some code or to change emitters but ,simple as shown below The real challenge could be setting this property on run time , by detecting the report Types,because you might not apply all paging stuff to all your pages ...

enter image description here

Thank you, Bini . Refer this web Blog which has all the correct answers. http://www.biny08.blogspot.com/2013/06/spudsoft-excel-emitter-single-sheet.html#more

Make Page Break Interval = 0 ( for unlimited ) or your custome Value

and set Repeat Header to false

Done! you will see all your record in one sheet . Awsome :) !

Upvotes: 4

Related Questions