Re: [jasperreports-questions] [NEWBIE] Large report and print directly
I had a similar problem - I had some reports where user could choose whether he wants to group rows (by 1 or 2 fields fields that are part of a result set row) or not. In case grouping is enabled, headers have to be displayed for each group (with sums and other calculations), and in detail section, the column that displays the field (that has been choosen as grouping criteria) must not be displayed, and its space must be used by other columns in the row. I solved this by having mutliple text fields for the same field in detail section, but only 1 was displayed, using printWhenExpression. The printWhenExpression condition was dependent on how many fields were marked as 'group fields' - required grouping. Example detail section: A, B1, B2, C are text fields. _ |__A_|_B1__|___C__| (detail row needs to look like this when no groupingis selected) _ |___B2|C__|(detail row needs to look like this when grouping by field A is selected (information about field A displayed at group A header)) Text fields A + B1 share the same detail section space as B2 (they are over each other) B1.printWhenExpression is something like new Boolean(!$P{groupByAEnabled}.booleanValue()) B2.printWhenExpression is something like new Boolean($P{groupByAEnabled}.booleanValue()) I'd say that this is a good solution for cases where you have a relatively small, fixed set of textfields and choices.Its main advantage is that it allows you to edit the whole reports with a graphic tool, and avoid jrxml generation at runtime. > The another problem I have is that I have to print 2 check side by side > like this : > > || || > > So I think of modifying the report just before printing it. I n m y base > I will have all field twince for the second check like this : > > name > name2 > addresse > addresse2 > value > value2 > etc... > > So before printing I multiply by 2 the width and I duplicate each zone. > > :) > > -- Why? Because YES! - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
Re: [jasperreports-questions] [NEWBIE] Large report and print directly
So I want to print checks for supermarkets. So I use jasper for printing recipient and value (in euro), and another thread would print the CMC7 (in france we have a CMC7 at the bottom of check). So a supermarcket can order million of those check (in french 'chèque cadeau'). The another problem I have is that I have to print 2 check side by side like this : || || So I think of modifying the report just before printing it. I n m y base I will have all field twince for the second check like this : name name2 addresse addresse2 value value2 etc... So before printing I multiply by 2 the width and I duplicate each zone. :) Le lundi 11 septembre 2006 à 09:54 +0200, Borut Hadžialić a écrit : > If I don't ask this my curiosity will drive me nuts for the rest of the day.. > ;p > > What kind of report does have 1 million pages? > > Also, could you please report if you succeed printing it. It would be > a nice information about jasperreports capabilities. > > On 9/11/06, yves pielusenet <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm new to jasperreport. I have to generate a very big print job (1 000 > > 000 pages). can jasper deals with it ? is there a good way to do this ? > > > > I want to print this report without display it on the screen. Is it > > possible ? > > > > thank you :) > > > > -- > > yves piel > - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
Re: [jasperreports-questions] [NEWBIE] Large report and print directly
thank you :) why do you suggest me to create my own datasource ? I want to use derby data base (from jakarta project), I think it is a good data source :) Le lundi 11 septembre 2006 à 12:50 +0530, Pushkar a écrit : > Hi, > > I believe you should look at JRFileVirtualizer Class. This will allow > Jasper to load data into memory in chunks(similar to virtual memory > concept of OS), thus avoiding the Java OutOfMemoryError. > > > Yes, you can print a jasper report without displaying it. > > Following is a sample code snippet which should be of some help to > you. > > > //The File Virtualizer location should be configurable. > JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, > "tempLocation"); > parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); > JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, > parameters, dataSource); > JasperPrintManager.printPage(jasperPrint, 0, false); > > > I would also suggest you to look for writing your own custom data > source class and using it. > > > Regards, > Pushkar > > > > On Sep 11, 2006, at 12:23 PM, yves pielusenet wrote: > > > Hello, > > I'm new to jasperreport. I have to generate a very big print job (1 > > 000 > > 000 pages). can jasper deals with it ? is there a good way to do > > this ? > > > > > > I want to print this report without display it on the screen. Is it > > possible ? > > > > > > thank you :) > > > > > > -- > > yves piel > > > > > > > > > > - > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your > > job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > ___ > > jasperreports-questions mailing list > > jasperreports-questions@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jasperreports-questions > > > > - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
Re: [jasperreports-questions] [NEWBIE] Large report and print directly
If I don't ask this my curiosity will drive me nuts for the rest of the day.. ;p What kind of report does have 1 million pages? Also, could you please report if you succeed printing it. It would be a nice information about jasperreports capabilities. On 9/11/06, yves pielusenet <[EMAIL PROTECTED]> wrote: > Hello, > I'm new to jasperreport. I have to generate a very big print job (1 000 > 000 pages). can jasper deals with it ? is there a good way to do this ? > > I want to print this report without display it on the screen. Is it > possible ? > > thank you :) > > -- > yves piel -- Why? Because YES! - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
Re: [jasperreports-questions] [NEWBIE] Large report and print directly
Hi, I believe you should look at JRFileVirtualizer Class. This will allow Jasper to load data into memory in chunks(similar to virtual memory concept of OS), thus avoiding the Java OutOfMemoryError.Yes, you can print a jasper report without displaying it. Following is a sample code snippet which should be of some help to you. //The File Virtualizer location should be configurable. JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "tempLocation"); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource); JasperPrintManager.printPage(jasperPrint, 0, false);I would also suggest you to look for writing your own custom data source class and using it.Regards,PushkarOn Sep 11, 2006, at 12:23 PM, yves pielusenet wrote:Hello,I'm new to jasperreport. I have to generate a very big print job (1 00 pages). can jasper deals with it ? is there a good way to do this ?I want to print this report without display it on the screen. Is itpossible ?thank you :)-- yves piel-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___jasperreports-questions mailing listjasperreports-questions@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/jasperreports-questions - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions