Hello, when I generate reports in JasperServer I have too many records for Excel to handle. Is it possible to split report in two files in that case?
Add a parameter to limit the records generated. Then run the report for each range of records using the parameter.
How can I do so?:>
For example, if you have a text field in the data, add a parameter for the report that selects all rows with the text field between two values. For example, run the report for values between "A" and "N", and then run the report again for values between "N" and "ZZZZZ". You might want to upper case the field as well to avoid case-sensitivity.
But do u mean doing so in sql query? Or is it possible somewhere during xml file creation?
You can add it in the SQL query using a parameter variable. https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-u...
Which excel export are you using xls or xlsx. You should not be getting the error when using xlsx, if you want to remove confusion for user to remove the xls export option, this can be done specific jasperserver property file.
If your user is limited to xls, then you have a problem as this limitation is due to old xls version.
You could try mutiple sheets with data, but not sure if you will reach same issues as xls limitaiton might be memory size and not sheet size per memory.
If mutiple sheet do not work, then what kevin suggested might be best. Write report in such away that you do a row limit count that will only generate report with amount of rows xls can handle and notify user that limited has been reach due to xls memory limitations. Then user need to generate sec report with new set of parameters.
If data for same parameter set is more than amount of rows xls can handle, then do also as kevin suggested. Add limit to you sql and add row limit logic as input control as well so user can select how many rows and from which rows onwards or between given row number. All sql have these function and you could just parameterize the row number limits.
If your using jasper java api , then you can code the logic easily. Call report, keep row count, export report, take row count, pass to new report generated, export report, update row count etc.
If report is not dependent on user selection, but more a regular report that is generated on a periodic timeframe with parameter staying constistant, you could user mutiple schedule job with row count as parameter set.
You have some options, you just need to change the business logic begin how to use report based on xls limitation.
I have such a big report that is too big for even csv. Thats why i need to split it in few smaller.