Jump to content
We've recently updated our Privacy Statement, available here ×

CharleyDC5

Members
  • Posts

    43
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by CharleyDC5

  1. Hi folks, I am experiencing a problem using multiple detail bands feature. The problem is that what I generate the preview, none of the detail bands are splitting. The report is like 3 pages long in reality, but appears as one page. If I print the report, the printer will print only one portion of the report. I need to adjust the font size in order to see the entire report, resulting in a almost unreadable report because of the smaller font size. Some detail bands have subreports. All detail bands (including the master and the subreports) are set to "Stretch" regarding the "Split Type" property. I have also tried "Immediate" but it doesn't solve the problem. The only workaround I've found is to add some manual page breaks here and there in order to make it really break in the PDF. Othersize, I'm always getting one huge page. My master report needs to be LEGAL US format. Any idea? Thank you Charles iReport 4.1.1
  2. Code:<subreport isUsingCache="true"> <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="206" width="572" height="38" isRemoveLineWhenBlank="true"/> <subreportParameter name="intActionTypeId"> <subreportParameterExpression><![CDATA[2]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="strHeader"> <subreportParameterExpression><![CDATA[( $P{strLangue}.equals("fr") ? "AUTRES" : "OTHERS" )]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="strLangue"> <subreportParameterExpression><![CDATA[$P{strLangue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="intVisiteBordId"> <subreportParameterExpression><![CDATA[$P{intVisiteBordId}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "visiteBordPrint_Action.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="true"> <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="156" width="572" height="38" isRemoveLineWhenBlank="true"/> <subreportParameter name="intActionTypeId"> <subreportParameterExpression><![CDATA[1]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="strHeader"> <subreportParameterExpression><![CDATA[( $P{strLangue}.equals("fr") ? "ARRIVÉE" : "DÉPART" )]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="strLangue"> <subreportParameterExpression><![CDATA[$P{strLangue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="intVisiteBordId"> <subreportParameterExpression><![CDATA[$P{intVisiteBordId}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "visiteBordPrint_Action.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="true"> <reportElement positionType="Float" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="257" width="572" height="38" isRemoveLineWhenBlank="true"/> <subreportParameter name="intActionTypeId"> <subreportParameterExpression><![CDATA[3]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="strHeader"> <subreportParameterExpression><![CDATA[( $P{strLangue}.equals("fr") ? "DÉPART" : "DEPARTURE" )]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="strLangue"> <subreportParameterExpression><![CDATA[$P{strLangue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="intVisiteBordId"> <subreportParameterExpression><![CDATA[$P{intVisiteBordId}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "visiteBordPrint_Action.jasper"]]></subreportExpression> </subreport>
  3. After review, the problem comes from the third subreport. If I remove it, the report generates in a second or so. I don't understand why it acts like that as this is the same subreport that is called three times with a different parameter. I have also tested the subreport alone and it works perfectly. See new post for the XML code.
  4. Hi folks I have a quite simple report with three subreports in it. When I click the Preview button, it takes FOREVER. The task never ends. I can see the loading animation at the bottom right of the screen saying "Generating report". All reports (JRXML) compiles without any problem. The problem is not my PostgreSQL, it is really iReport that has problem loading the preview. Any idea? Is there any kind of log where I could find additional information regarding that problem? I am using iReport 4.1.1 Thank you Charles
  5. Hi there, Is the a shortcut in iReport that would send an expression to lower case (in XML mode), just like in Word or any kind of text program? I got a ton of reports to modify because of the migration to PostgreSQL (that use lower case for fields expression). Thank you!
  6. Hi folks, I am having a quite strange problem.. My Web application offers three output format for a specific report : PDF, Excel (JRXlsExporter) and RTF(JRRtfExporter). My report has a crosstab in it with 4 row groups and 1 column group. When attempting to export to XLS using the JRXlsExporter, all text fields of the third row group shows as blank. If I export to PDF or RTF, the text fields ARE there. I compared the text field configuration with the other column groups and they are all the same. Any idea? Thanks Charles
  7. Hi folks, I would like to add some specific non-group information in a crosstab but can't find a way to meet my requirements. The first attachment (basic.jpg) shows the basic crosstab created by iReport, based on the following settings : Row group (blue cells): $F{fileNumber} Column group (yellow cells): $F{service Type} Data (gray cells): $F{fileId} (function is SUM) The second attachment (before.jpg) shows what I see when trying to display the information I want using measure, variable or fields. It just always return null. Finally, the third one (expected.jpg) represents what I would like to see. Any idea? Thank you Charles Post Edited by CharleyDC5 at 02/24/2011 17:40
  8. Hi guys, Is it possible to hide the border of labels and legends in iReport without having to create a custom chart theme? If not, I just can't find a way to hide the borders using the chart theme editor. I know this is feasable as the aegean built in theme has no borders. Thanks Charles
  9. Just found the solution myself. I had to play with the Label Format by entering the following {0] ({2}) expression in order to have the following result : Second (45%) Thanks Charles
  10. Hi folks, Is it possible to show the percentages in a pie chart? If yes, how? Thank you Charles
  11. Good morning guys, I would like to know if it is possible to change the rowset orientation in a dataset? By default, the detail band data is printed like that : - Row #1 - Row #2 - Row #3 - Row #4 - Row #5 etc... I would like to change the orientation so the detail band would print like this : - Row #1 Row #2 Row #3 Row #4 Row #5 Is it possible? Any thoughts or advice? Thanks Charles
  12. Thanks for the info! Is it possible to have a Collection inside the CustomBean? How would Jasperreports/iReport deal with it for grouping? For instance : public class AbsenceCustomBean { private String date; private String phonenumber; private String description; private Collection updates; public AbsenceCustomBean(String date, String phonenumber, String description, Collection updates) { date= date; phonenumber = phonenumber; description = description; updates = updates; } Every instance of the AbsenceCustomBean may have 1 or more updates (1-N relationship). So, I would like to print something similar to that : 2010-10-12 888.999.3333 Off sick Updated by USR111 Updated by USR333 Updated by USR222 Updated by USR111 2010-10-13 777.333.2222 Business travel to Toronto Updated by USR999 Updated by USR048 Updated by USR982 etc.. etc.. Other questions : - Did you create the fields manually in iReport or you added the application's JAR file into the iReport classpath? - Would it be possible to use full Java object code in the JRXML report? I mean, instead of creating a manual factory class that represents a row in my report, can I write some pure Java just like in Eclipse? I.E. : Absence.getUpdates().getStrUpdaterLoginName() in order to print USR999. Thank you very much for help Charles
  13. Hi folks, I am actually using IBM DB2 UDFs (User Defined Functions) as a datasource for all my reports. I use iReport as my report designer and JasperReports as my report engine. I would like to stop having to mess with DB2 UDFs for my reporting needs. Reports are getting launched from a J2EE web application. I am looking for a way to pass a Collection of objects to my report so I could re-use some of my listing methods that feeds the Web application itself. For example, I have a Cars Management screen that allows the user to list, add, update, delete and view cars. In the list screen, the user can list the cars by using a filter (let's say : Brand). So, I can list all Honda car by selecting Honda as my Brand filter. All the results are printed dynamically in the web application (DB2 to EJB to Struts to JSP/HTML). Now, let's say I have a button in that list screen that allows the user to generate a PDF report (better presentation). Here is my problem. Right now, the report is getting launched without a problem, but I have to use a UDF in order to get a resultset for my report. I would really like to use the same method that I used in the Cars list screen as it is the same content. Attached is how I actually generate my reports. Can I pass my Collection of Cars value objects to my report? Here is what I use : - Persistence framework : EJB 2.0 - MVC (Model View Controller) framework: Struts 1.2.9 - Report designer : iReport 3.7.1 - Report engine : JasperReports 3.7.1 - Application server : jBoss 4.0.4GA - DBMS (Database Management System) : IBM DB2 UDB 9.5 Workgroup Edition Thank you VERY much for help. Charles Code:public ActionForward showCarsRpt(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ParseException, SQLException { ServletContext context = servlet.getServletConfig().getServletContext(); CarRptFilterForm carRptFilterForm = (CarRptFilterForm) form; reportFile = new File(context.getRealPath("/reports/car/cars.jasper")); if (!reportFile.exists()) { throw new JRRuntimeException("File car.jasper not found. The report design must be compiled first."); } Map parameters = new HashMap(); parameters.put("ReportTitle", "Car Report"); parameters.put("BaseDir", reportFile.getParent() + "\\"); parameters.put("REPORT_LOCALE", request.getSession().getAttribute("org.apache.struts.action.LOCALE")); parameters.put("strLang", getLocale(request).getLanguage()); parameters.put("intBrandId", Integer.valueOf(carRptFilterForm.getStrCentreCoutId())); Connection con = null; try { InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:/myDataSource"); con = ds.getConnection(); con.setReadOnly(true); } catch (Exception e) { e.printStackTrace(); } try { ReportTools.exportReportToPDF(reportFile, parameters, con, response); } catch (JRException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } finally { con.close(); } return null; }public static void exportReportToPDF(File reportFile, Map parameters, Connection con, HttpServletResponse response) throws JRException, SQLException { File destFile = new File(JasperRunManager.runReportToPdfFile(reportFile.getPath(), parameters, con)); con.close(); response.setContentType("application/pdf"); response.setHeader("Content-Disposition", "attachment; filename=\"" + destFile.getName() + "\";)"); java.io.FileInputStream fileInputStream = null; try { fileInputStream = new java.io.FileInputStream(destFile.getPath()); } catch (FileNotFoundException e) { e.printStackTrace(); } try { ServletOutputStream outputStream; int i; outputStream = response.getOutputStream(); while ((i = fileInputStream.read()) != -1) { outputStream.write(i); } outputStream.flush(); fileInputStream.close(); outputStream.close(); } catch (IOException e) { } }
  14. Well, I think that problem has been fixed in the next few versions of iReport.
  15. Hi folks, Does anyone here knows how I could change the positionning of my labels? I would like to have every label written on a single line, without any text wrapping. Attached is an example showing my pie chart along with the expected result. Thank you Charles
  16. Hi folks, I just started working with charts in iReport, and I would like to create a new chart theme that would represent the branding of our company. Is it possible to create a new theme? I would like to modify the eye.candy.sixties theme in order to put a background image in it. I found the following information in the iReport project wiki : Chart Theme editor - Customize your chart look and feel, set the colors, fonts, background, orientation and much more trought the integrated chart theme editor. The link is broken, unfortunately. Thank you very much for help. Charles
  17. SOYHU, This option is already checked in my ireport configuration :( As I said, I have this problem with only one report. I understand why... I will try to create a new jrxml file and then copy the XML code into it. JSquire, You mean iReport classpath or application classpath? Thanks for help!
  18. Yes I understand that. My iReport reports are bundled in a Java J2EE web application, so I can't use a physical path. Otherwise, my web app will search for the folder "C:\\honda\\hatc_boss_rep\\Real\\" (for example), which is not existing on my jboss production environment. Every other report works like a charm. I'm just facing that problem with one report...
  19. Hi folks, I just installed the new version of iReport (3.5.3) and tried the new automatic subreports compilation feature. I always get the following message: "Unable to locate the subreport with expression: "$P{BaseDir} + "mysubreport.jasper"". Things I have tried : 1. <subreportExpression class="java.lang.String"><![CDATA[$P{BaseDir} + "mysubreport.jasper"]]></subreportExpression> 2. <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "mysubreport.jasper"]]></subreportExpression> 3. <subreportExpression class="java.lang.String"><![CDATA["mysubreport.jasper"]]></subreportExpression> Important notes : My report and subreports are located in the same package/directory. For instance : Master report file : C:\eclipse\workspace\MYPROJECT\web\reports\myreport\test.jrxml Subreport file : C:\eclipse\workspace\MYPROJECT\web\reports\myreport\mysubreport.jrxml BaseDir and SUBREPORT_DIR parameters are set to ""Any idea? Thank you very much for help Charles
  20. Hi folks, I just want to share a concern we have about iReport and the JasperReports engine. We have about 20 Web applications deployed on a jBoss application server, and we use iReport as our report designer. Each time JasperForge releases a new version of iReport, we update to the new version. Almost each time a new version of iReport is released, the jasperreports JAR is changing. My question is : Is jasperreports.jar retro-compatible so I don't need to recompile all reports in all projects? Can I only overwrite the jar file on the application server without having to recompile one report at a time. Thank you very much Charles
  21. Hey Giulio, Indeed, the massive compiler was more than useful! Thank you for your support Charles
  22. Okay! I guess you coded a custom version in order to compile jrxml files? You can PM me if you are interested in sharing your good practice. I often have to compile a massive amount of reports. This kind of tool is going to accelerate my work big time.. Best regards Charles
  23. Does anyone here knows how to compile multiple reports at the same time? Thank you very much. Charles
×
×
  • Create New...