I am trying to generate a PDF using a JRXML file while passing values in jasperParameter and then fetching it in JRXML. The issue is explained below:
List<Integer> values = myService.methodName();
This returns a size greater than 1000. I further go ahead to print a PDF for which I use a JasperReports.
I store values inside a bean named MyBean
and pass it to generate a PDF.
generator.generatePDF(response, myBean);
My PDF generation code looks as follows:
Connection connection = setUpDataSource();
HashMap<String, Object> jasperParameter = setUpJasperParameter(pdfBean);
ByteArrayOutputStream reportOutputStream = export2PdfStream(jasperFilePath, connection, jasperParameter);
Here in setUpJasperParameter
method we put those list of Integer values greater than 1000 inside jasperParameter
hashmap.
Later on, when i go to print my Jasper Report using
JasperPrint jprint = (JasperPrint) JasperFillManager.fillReport(jasperFilePath, jasperParameter, conn);
This is actually caused because of my demo.jrxml which has queryString inside which I am fetching multiple rows from a view.
SELECT ROW A, ROW B , ROW C,...ROW Z FROM MYVIEW WHERE $X{IN, valuesToDisplay ,values}
In above query, it gives me an error saying Ora 01795 maximum number of expressions in a list is 1000.
Is there any work around in which this can be handled on the Java end
or on the JRXML where the List<Integer> values
can be handled if the
size is approximately around 4500?