Giter Site home page Giter Site logo

Comments (6)

hvonbargen avatar hvonbargen commented on July 20, 2024

I don't know, but if it doesn't work with BIRT now, one should have a look at the newer sources of the emitter in my fork hvbtup/BIRT.
And regarding the question in the bug, the 40 (rows) is the default page break for lists and/or tables, so it is correct if the emitter creates a new sheet every 40 records. Unfortunately the maximum value was 9999, maybe this is still the case.
The emitter options can usually be set as user properties, but probably also in other easy. Unfortunately yaytay's bitbucket repository, which also contained documentation, is no longer available.
I'm pretty sure that any emitter option can be set in the URL query, but I don't use it myself, so I don't know exactly this works. Anyway, did you try the exact spelling SINGLE_SHEET=true?

from birt.

speckyspooky avatar speckyspooky commented on July 20, 2024

Hello SteveSchafer, there is an option to set this behavior on report level.

If you add on the root element the user property "ExcelEmitter.SingleSheet" (Boolean) and set the value to "true" then you avoid multi-page sheets.
But you have to handle the repeat of header if it is active due to usage on PDF-site.

The spudsoft-Emitter has further additional options which can be set on report root tag based on user properties like "ExcelEmitter.RemoveBlankRows" or "ExcelEmitter.DisableGrouping".

from birt.

SteveSchafer-Innovent avatar SteveSchafer-Innovent commented on July 20, 2024

I confirmed that speckyspooky's suggestion works. Unfortunately, having to modify all their reports isn't a very good option for my client. I'd still like to implement something at the viewer level. I suspect one sheet per page is undesirable for most people, especially ones that tend to have large reports. Being able to set the default value in viewer.properties would be great.

from birt.

speckyspooky avatar speckyspooky commented on July 20, 2024

I'm back with new details. By default there isn't a way to configure the xlsx-Emitter-behavior based on the viewer.properties.
To do this the java-component of the viewer (according property-handling) must be rewritten.

Therefore I used another way to solve your requirement.
You can change the viewer-export dialog directly:
C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\birt\webcontent\birt\ajax\ui\dialo\BirtExportReportDialog.js

In this JS-File is a function definition " __exportAction : function( ) { ... }" and there I added the following sequence to manipulate the URL-call at the moment of export:

__exportAction : function( ) { ...

		// Delete page, pagerange and parameterpage settings in url if existed
		action = birtUtility.deleteURLParameter( action, Constants.PARAM_PAGE );
		action = birtUtility.deleteURLParameter( action, Constants.PARAM_PAGERANGE );
		action = birtUtility.deleteURLParameter( action, Constants.PARAM_PARAMETERPAGE );
		action = birtUtility.deleteURLParameter( action, Constants.PARAM_EMITTER_ID );

		if( format == "xlsx" ) {
			action = action + "&__ExcelEmitter.SingleSheet=true";
		}

...
}

In my test cases I got only Single-Sheet files with change. Be carefull with this change you haven't directly an Option to get Multi-Sheets. The option on report level won't be work like overwrite, the url settings have higher priority.

from birt.

SteveSchafer-Innovent avatar SteveSchafer-Innovent commented on July 20, 2024

@speckyspooky thanks very much for this solution. I'm going to try this in 4.8 since that's what my client is using at the moment.

Update: It works. Also the URL parameter works when going directly to xlsx. Due to my dyslexia (which is really lazy reading on my part) I had the parameter name wrong. So this solves the problem for me, and, as far as I'm concerned, it's no longer important to be able to set the default value in viewer.properties. However being able to set render option default values without having to modify the code would still be a valuable feature so I'll leave this issue active.

from birt.

speckyspooky avatar speckyspooky commented on July 20, 2024

The enhancement is included in PR #1483

from birt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.