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

burferd

Members
  • Posts

    87
  • 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

Posts posted by burferd

  1. I hve built a report using the iReport 4.5.0 plugin for NetBeans.

    The report displays fine when I use the Preview, but I am having problems getting the report to display in my application.

    I have used the code below to display reports before and it gives a note to the browser to save or open the report, but for this one, it does not seem to work. 

    Any suggestions as to what I am doing wrong?

    Java code to create/display a PDF file.

         public boolean createSafetySummaryRpt()
        {
            System.out.println("<ReportSessionBean.createSafetySummaryRpt> doPdf = "+doPdf+", doExcel = "+doExcel);
            JasperPrint jp = null;
            try
            {
                Map parameters = new HashMap();
                String rptFile = rptPath+"SafetySummaryRpt.jasper";
                jp = JasperFillManager.fillReport( rptFile, parameters, sb1.getDbConnection() );
                if( doPdf )doPdfReport( jp, "SafetySummary");
                if( doExcel )doExcelReport( jp, "SafetySummary" );
            }
            catch( Exception e )
            {
                e.printStackTrace();
                System.out.println( "<ReportSessionBean.createUserRpt> Error: "+ e.toString());
                sb1.setMessage( "Error creating report.");
                return false;
            }
            return true;
        }

        public void doPdfReport( JasperPrint reportout, String filename )
        {
            byte[] pdf =null;

            try {
              pdf = JasperExportManager.exportReportToPdf(reportout);
            }
            catch (JRException ex3) {
                System.out.println("Couldn't create PDF: "+ex3);
            }

            FacesContext faces = javax.faces.context.FacesContext.getCurrentInstance();
            HttpServletResponse response =(HttpServletResponse)faces.getExternalContext().getResponse();

            System.out.println("<ReportSessionBean.doPdfReport> " );
            response.setContentType("application/pdf");
            response.setContentLength(pdf.length);
            response.setHeader("Content-disposition","attachment; filename=\""+filename+".pdf\"");
            ServletOutputStream out;
            try{
                out = response.getOutputStream();
                out.write(pdf);
                System.out.println("<ReportSessionBean.doPdfReport> after out.write " );
            }catch (Exception qw){
                System.out.println("Could not output file:"+qw);
            }

            faces.responseComplete();
        }

     

    Here is the report I am tryong to use.:

    <?xml version="1.0" encoding="UTF-8"?>
    <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="SafetySummaryRpt" language="groovy" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
     <property name="ireport.zoom" value="1.0"/>
     <property name="ireport.x" value="0"/>
     <property name="ireport.y" value="0"/>
     <queryString language="SQL">
      <![CDATA[sELECT
         tbSafetySummary."dtLoadTime" AS tbSafetySummary_dtLoadTime,
         tbSafetySummary."vcDeviceName" AS tbSafetySummary_vcDeviceName,
         tbSafetySummary."dcHardBraking" AS tbSafetySummary_dcHardBraking,
         tbSafetySummary."dcRapidStarts" AS tbSafetySummary_dcRapidStarts,
         tbSafetySummary."dcSpeeding" AS tbSafetySummary_dcSpeeding,
         tbSafetySummary."iNightDrivingMins" AS tbSafetySummary_iNightDrivingMins,
         tbSafetySummary."iIdlingMins" AS tbSafetySummary_iIdlingMins,
         tbSafetySummary."iAvgMPG" AS tbSafetySummary_iAvgMPG,
         tbSafetySummary."iGPSLocks" AS tbSafetySummary_iGPSLocks,
         tbSafetySummary."dcTotalTravelTime" AS tbSafetySummary_dcTotalTravelTime,
         tbSafetySummary."iTotalTravelMiles" AS tbSafetySummary_iTotalTravelMiles,
         tbSafetySummary."iOverallScore" AS tbSafetySummary_iOverallScore,
         tbSafetySummary."iSafetySummaryId" AS tbSafetySummary_iSafetySummaryId
    FROM
         "dbo"."tbSafetySummary" tbSafetySummary]]>
     </queryString>
     <field name="tbSafetySummary_dtLoadTime" class="java.sql.Timestamp"/>
     <field name="tbSafetySummary_vcDeviceName" class="java.lang.String"/>
     <field name="tbSafetySummary_dcHardBraking" class="java.math.BigDecimal"/>
     <field name="tbSafetySummary_dcRapidStarts" class="java.math.BigDecimal"/>
     <field name="tbSafetySummary_dcSpeeding" class="java.math.BigDecimal"/>
     <field name="tbSafetySummary_iNightDrivingMins" class="java.lang.Integer"/>
     <field name="tbSafetySummary_iIdlingMins" class="java.lang.Integer"/>
     <field name="tbSafetySummary_iAvgMPG" class="java.lang.Integer"/>
     <field name="tbSafetySummary_iGPSLocks" class="java.lang.Integer"/>
     <field name="tbSafetySummary_dcTotalTravelTime" class="java.math.BigDecimal"/>
     <field name="tbSafetySummary_iTotalTravelMiles" class="java.lang.Integer"/>
     <field name="tbSafetySummary_iOverallScore" class="java.lang.Integer"/>
     <field name="tbSafetySummary_iSafetySummaryId" class="java.lang.Integer"/>
     <background>
      <band splitType="Stretch"/>
     </background>
     <title>
      <band height="25" splitType="Stretch">
       <staticText>
        <reportElement x="231" y="0" width="286" height="23"/>
        <textElement textAlignment="Center">
         <font size="16" isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[safety Summary Report]]></text>
       </staticText>
      </band>
     </title>
     <pageHeader>
      <band splitType="Stretch"/>
     </pageHeader>
     <columnHeader>
      <band height="27" splitType="Stretch">
       <staticText>
        <reportElement x="0" y="0" width="195" height="26"/>
        <textElement>
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[Device Name]]></text>
       </staticText>
       <staticText>
        <reportElement x="195" y="0" width="60" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isItalic="false" isUnderline="true"/>
        </textElement>
        <text><![CDATA[Hard Braking]]></text>
       </staticText>
       <staticText>
        <reportElement x="260" y="0" width="55" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[Rapid Starts]]></text>
       </staticText>
       <staticText>
        <reportElement x="315" y="0" width="60" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[speeding]]></text>
       </staticText>
       <staticText>
        <reportElement x="375" y="0" width="70" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[Night Driving Minutes]]></text>
       </staticText>
       <staticText>
        <reportElement x="445" y="0" width="60" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[idling Minutes]]></text>
       </staticText>
       <staticText>
        <reportElement x="505" y="0" width="60" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[Average MPG]]></text>
       </staticText>
       <staticText>
        <reportElement x="565" y="0" width="60" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[GPS Locks]]></text>
       </staticText>
       <staticText>
        <reportElement x="625" y="0" width="65" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[Total Travel Time]]></text>
       </staticText>
       <staticText>
        <reportElement x="690" y="0" width="62" height="26"/>
        <textElement textAlignment="Right" verticalAlignment="Middle">
         <font isBold="true" isUnderline="true"/>
        </textElement>
        <text><![CDATA[Total Travel Miles]]></text>
       </staticText>
      </band>
     </columnHeader>
     <detail>
      <band height="16" splitType="Stretch">
       <textField>
        <reportElement x="0" y="0" width="195" height="15"/>
        <textElement/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_vcDeviceName}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="195" y="0" width="60" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_dcHardBraking}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="255" y="1" width="60" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_dcHardBraking}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="315" y="0" width="60" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_dcSpeeding}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="375" y="0" width="70" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_iNightDrivingMins}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="445" y="1" width="60" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_iIdlingMins}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="505" y="0" width="60" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_iAvgMPG}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="565" y="0" width="60" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_iGPSLocks}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="625" y="0" width="65" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_dcTotalTravelTime}]]></textFieldExpression>
       </textField>
       <textField>
        <reportElement x="690" y="1" width="62" height="15"/>
        <textElement textAlignment="Right"/>
        <textFieldExpression><![CDATA[$F{tbSafetySummary_iTotalTravelMiles}]]></textFieldExpression>
       </textField>
      </band>
     </detail>
     <columnFooter>
      <band height="45" splitType="Stretch"/>
     </columnFooter>
     <pageFooter>
      <band height="54" splitType="Stretch"/>
     </pageFooter>
     <summary>
      <band height="42" splitType="Stretch"/>
     </summary>
    </jasperReport>
     

  2. Thanks for the feedback.

    With the Netbeans module, is there any way to have it reference my source code package, or do I still need to create a jar file for that package?

    I have two packages that need to be accessed - one with the database references and the other with the bean wrappers that access the database references.  Would I  be able to add more than one jar file in the classpath?

    One other option that I have seen is to use a Hibernate data source.  I am using hibernate, but have not figured out how to use that as a datasource.  Any suggestion on how I can make that connection in the Netbeans plugin?  Netbeans has the all the hibernate info.  Can iReport link in to that?

  3. I am pretty new to iReports, but I need to create several reports using Javabeans as the datasource.

    I found this reference:

    http://knol.google.com/k/jasper-reports-working-with-beans-and-sub-report

    In this, the author mentions that he created a jar file of the classes and placed that jar file in the "lib" directory. After doing that, he was able to access the bean properties from within iReport.  This is where he lost me.

    Can anyone fill me in on details of how I might access the classes of a NetBeans project in iReport 4.5.0 (or something similar).

    I have both the stand-alone version and the NetBeans plugin, but have not been able to figure out how to access the bean properties in the iReport framework.

    Thanks.

  4. I am programming in Java.

    To create the connection, I opened the "Services" window by clicking on the "Window" option in the iReport main menu bar and selecting "Services".  This displayed the "Services" window on the left side of iReport.  In the "Services" window, I expanded the "Database" tree by clicking on the "Database" icon.  In this tree, I did a Left click on the "Drivers" icon and selected the "New Driver" option from the popup menu.  That displayed a "New JDBC Driver" dialog box.  In that box, I clicked the "Add" button and navigated to where my SQL Server driver jar file is located.  I selected that driver and clicked the "OK" button.  That added the driver I just selected to the list of Drivers in the Services window.  I then left clicked on the "Database" icon in the Services Window and selected the "New Connection" option.  This brought up the "New Connection" dialog.  I entered the Username, Password, and JDBC URL that is used in the application.  I clicked OK, and iReport attempted to make the connection, but never could.

    I did these same steps for my Oracle driver and it worked just fine.

    I know the SQLServer driver, username, password, and JDBC URL are correct, because I can make the database connection in NetBeans and in my application.

    I want the connection in order to create a Jasper Report that I can call from my Java web application using the data in the database for information on the report. 

  5. In the Services window, I added the driver in the Databases -> Drivers section.

    Does that not add the library to the classpath?

    If not, then how do I add it?

    I did this to add an Oracle driver and that allowed me to make a connection in iReport, but not the SQL Server driver.

    I'm not familiar with the jtds-1.2.5.jar file you mention.  I wold prefer to use the same drivers that I use for my application, however.

  6. I just downloaded the latest version of Jasper Reports and iReport and am attempting to create a new database connection to my SQL Server database.

    I am using this driver:  sqljdbc4.jar  and added the driver to the Databases->Drivers section in the Services window.

    I then attempted to create a new database connection using the connection information that works in my application.  In the New Connection dialog, I tried both the Field Entry and Direct URL Entry methods.  In both cases, when I fill out the connection information and push OK, the dialog greys out with only the Cancel and Help buttons active. 

    I suspect it is attempting to create the connection, but apparently never does.

    The database is active and I can connect to it with both my application and the SWL Server Management Studio using the information I entered for the connection in iReport.

    Is there a problem with creating SQL Server database connections in iReport 4.5.0?

    Any suggestions on how I can create the database connection?

    Should I back off to an older version of iReport?

    Thanks

  7. I am attempting to run the 4.0.1 demo report "TableReport.jrxml" from http://jasperreports.sourceforge.net/sample.reference/table/index.html

    When attempting to execute JasperCompileManager.compileReport() I get the following exceptiion:

    Parse Error at line 9 column 66: Document root element "jasperReport", must match DOCTYPE root "null".

    I'm using the TableReport.jrxml file that is in the demo example - attached below.

    I have modified the compile step to match my application - the code for that is included below.  I think it is correct, since I can make it work with simple jrxml files from an older iReport test.

    I believe it is a problem with the syntax in the first <jasperReport> definition, but I do not know what the proper syntax should be.

    Can anyone point me to a table example that will work?

    I am using JR 4.0.2 libraries.

    Thanks.

     

    Code:
        public boolean createAccountInfoRpt()    {        JasperPrint jp = null;        JasperReport rptFile = null;        try        {            Map parameters = new HashMap();	    parameters.put("TableDataSource", new JREmptyDataSource(50));            rptFile = JasperCompileManager.compileReport("C:/Reports/Greenville/Source/TableReport.jrxml");            System.out.println( "<SessionBean1.createAccountInfoRpt> Compiled Jasper Report "+rptFile );            jp = JasperFillManager.fillReport( rptFile, parameters, new JREmptyDataSource() );            if( doPdf )doPdfReport( jp, "AccountInformation");            if( doExcel )doExcelReport( jp, "AccountInformation" );        }        catch( Exception e )        {            e.printStackTrace();            System.out.println( "<SessionBean1.createAccountInfoRpt> Error: "+ e.toString());//            setMessage( "Error creating report.");            return false;        }        return true;    }
  8. Still having problems - when I add a text field and parameter, I still the the following classCastException:

    java.lang.ClassCastException: cannot assign instance of net.sf.jasperreports.engine.base.JRBaseStaticText to field net.sf.jasperreports.engine.base.JRBaseLineBox.boxContainer of type net.sf.jasperreports.engine.JRBoxContainer in instance of net.sf.jasperreports.engine.base.JRBaseLineBox

    Can anyone tell me what I need to do in order to get a jasper report to work?

    I'm using the following lbraries:

    • commons-beanutils.1.8.0.jar
    • commons-collections-2.1.1.jar
    • commons-digester-1.7.jar
    • commons-logging-1.0.4.jar
    • groovy-all.1.7.5.jar
    • poi-3.6.jar
    • jasperreports-3.7.6.jar (i used jasperreports-4.0.2.jar when testing 4.0.2).

    I'm working on Windows (same result on XP and Windows 7-64 bit), using NetBeans 6.9.1 and 7.0,   Glassfish 3.0 and 3.2.

    Is there any kind of permission I need to set for the server?

    I'm sure there has to be someone out there who has been able to make this work.

    I'm really at a loss to figure this out.

    Any help is appreciated.

    Thanks.

  9. I can also use a report build with iReport 3.7.6 and I do not get this error, but I also do not get bold fonts for some reason.

    Am I the only one who has a problem running a report created with iReport 4.0.2 in a java application linked to the jasperreport-4.0.2.jar file?

    Something is not right here.

  10. I created a report using an old version of iReport (1.3.2) and was able to get past this error for a test report that used parameters.

    Apparently, the problem is because the test report was created using iReport 4.0.2.

    I don't understand this, unless I am missing a library somewhere.

    Any clues?

    Thanks.

  11. I am working on a report that I built using iReport 4.0.2.

    It looks like I am taking a step backwards.  I thought I had a report working with static text, but apparently not.  I created a report that is just a blank page and that works fine.  I added a single static text field and I get an exception when attempting to do execute JasperFillManager.fillReport().

    It looks like it is trying to cast a JRBaseStaticText field to another type.

    Can anyone shed some light on what is happening and how I can get rid of this error?

    I have attached the code I am using, thje jrxml file, and the pdf outpur from iReport to show what I was trying to create.

    Thanks

     

    Code:
    Code:
        public void createTestRpt()    {        JasperPrint jp=null;        JasperReport jr = null;        try        {            Map parameters = new HashMap();            String rptFile = "C:/Reports/Greenville/Source/report3.jasper";            jp = JasperFillManager.fillReport( rptFile, parameters, new JREmptyDataSource() );            if( doPdf )doPdfReport( jp, "TestReport");            if( doExcel )doExcelReport( jp, "TestReport" );        }        catch( Exception e )        {            e.printStackTrace();            System.out.println( "<SessionBean1.createTestRpt> Error: "+ e.toString());        }    }

    Post Edited by burferd at 06/24/2011 21:05
  12. I am trying to generate a PDF and Excel version of the same report.

    I am able to generate the PDF version, but get the error shown in the code section when I try to do the Excel version.

    It appears that it can't find something i the poi library:    org.apache.poi.hssf.usermodel.HSSFWorkbook.getCreationHelper()

    I thought I had all the proper libraries loaded, but maybe I am missing something.  Here are the libraries I have loaded:

    commons-beanutils-1.8.0.jar

    commons-collections-2.1.1.jar

    commons-digester-1.7.jar

    commons-logging-1.0.4.jar

    jasperreports-4.0.1.jar

    groovy-all-1.7.5.jar

    iText-2.1.7.jar

    poi-3.6.jar

    Could anyone tell me what I am missing that caused the error?

    Thanks.

     PS. I found a post on this problem using JR4.0.0.   They said that using POI-3.6 solved the problem. however, I have POI-3.6 in my library list and still get the error.  Here is the post:  http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=84285

     

    Code:


    Post Edited by burferd at 06/23/2011 17:44
  13. I installed iReport 4.0.2 on my Windows 7 machine and when I attempt to start the application I get an exception (see the code section for details).

    I atttempted to open a new report and got another exception (see below).

    Does this actually run on Windows 7 (64-bit)?

    Thanks.

    Code:
    Exception when starting iReport:java.lang.NullPointerException	at java.awt.Dimension.<init>(Unknown Source)	at javax.swing.plaf.basic.BasicProgressBarUI.getPreferredSize(Unknown Source)	at javax.swing.JComponent.getPreferredSize(Unknown Source)	at org.netbeans.modules.progress.ui.NbProgressBar.getPreferredSize(NbProgressBar.java:90)	at org.netbeans.modules.progress.ui.StatusLineComponent.<init>(StatusLineComponent.java:137)	at org.netbeans.modules.progress.ui.ProviderImpl.getDefaultWorker(ProviderImpl.java:59)	at org.netbeans.progress.module.Controller.getProgressUIWorker(Controller.java:128)	at org.netbeans.progress.module.Controller.run(Controller.java:332)	at org.netbeans.progress.module.Controller.actionPerformed(Controller.java:357)	at javax.swing.Timer.fireActionPerformed(Unknown Source)[catch] at javax.swing.Timer$DoPostEvent.run(Unknown Source)	at java.awt.event.InvocationEvent.dispatch(Unknown Source)	at java.awt.EventQueue.dispatchEvent(Unknown Source)	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)	at java.awt.EventDispatchThread.run(Unknown Source)==================================================================Exception when attempting to open a new report:java.lang.NullPointerException	at org.netbeans.core.multiview.TabsComponent.setModel(TabsComponent.java:141)	at org.netbeans.core.multiview.MultiViewPeer.setMultiViewDescriptions(MultiViewPeer.java:118)	at org.netbeans.core.multiview.MultiViewCloneableTopComponent.setMultiViewDescriptions(MultiViewCloneableTopComponent.java:94)	at org.netbeans.core.spi.multiview.MultiViewFactory.createCloneableMultiView(MultiViewFactory.java:129)	at com.jaspersoft.ireport.designer.JrxmlEditorSupport.createPane(JrxmlEditorSupport.java:117)	at org.openide.text.CloneableEditorSupport.createCloneableTopComponent(CloneableEditorSupport.java:1158)	at org.openide.windows.CloneableOpenSupport.openCloneableTopComponent(CloneableOpenSupport.java:197)	at org.openide.windows.CloneableOpenSupport$1.run(CloneableOpenSupport.java:98)	at org.openide.util.Mutex.doEvent(Mutex.java:1335)	at org.openide.util.Mutex.writeAccess(Mutex.java:452)	at org.openide.windows.CloneableOpenSupport.open(CloneableOpenSupport.java:95)	at org.openide.text.CloneableEditorSupport.open(CloneableEditorSupport.java:437)	at com.jaspersoft.ireport.designer.standalone.menu.OpenFileAction.open(OpenFileAction.java:162)	at com.jaspersoft.ireport.designer.standalone.menu.OpenFileAction.performAction(OpenFileAction.java:133)	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118)	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)	at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114)	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)	at javax.swing.AbstractButton.doClick(Unknown Source)	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)	at java.awt.Component.processMouseEvent(Unknown Source)	at javax.swing.JComponent.processMouseEvent(Unknown Source)	at java.awt.Component.processEvent(Unknown Source)	at java.awt.Container.processEvent(Unknown Source)	at java.awt.Component.dispatchEventImpl(Unknown Source)	at java.awt.Container.dispatchEventImpl(Unknown Source)	at java.awt.Component.dispatchEvent(Unknown Source)	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)	at java.awt.Container.dispatchEventImpl(Unknown Source)	at java.awt.Window.dispatchEventImpl(Unknown Source)[catch] at java.awt.Component.dispatchEvent(Unknown Source)	at java.awt.EventQueue.dispatchEvent(Unknown Source)	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)	at java.awt.EventDispatchThread.run(Unknown Source)
  14. Using NetBeans 6.9.1, iReport 4.0.2, Windows 7

    I installed the iReport plugin on NetBeans 6.9.1 and tried to create a report.

    I ran into two that I do not know how to resolve.

    1) When creating the report, the palette area was missing.  I was able to access the report elements through the palette manager, but I could not figure out how to keep the palette visible.  I would get a blank palette that I could right click on to get the manager.  This worked OK,  until I did somethng and the blank palate was no longer displayed.  How can I get the palate to display and stay visible?

    2) I saved the report and exited NetBeans.  Later, I reopened NetBeans and I could see the iReport Welcome WIndow, but under the "Recent Reports" section, there were no reports displayed.How can I re-open the report to work on it again?

    Can anyone explain how to resolve these two issues, or should I just use the desktop version rather than the plugin version?

    Thanks.

    As an aside, I also noticed that some lines did not display properly, in that on the preview and pdf report I would get fields that warapped when the text was much smaller than the allocated static text field.  I have no clue why this happeneds.  Has anyone else experienced this behavior?

     



    Post Edited by burferd at 06/22/2011 18:37



    Post Edited by burferd at 06/22/2011 19:32
  15. I downloaded iReport 4.0.2 and installed it, but when I attempt to run it, I get an exception

    java.lang.NullPointerException
     at java.awt.Dimension.<init>(Unknown Source)
     at javax.swing.plaf.basic.BasicProgressBarUI.getPreferredSize(Unknown Source)
     at javax.swing.JComponent.getPreferredSize(Unknown Source)
     at org.netbeans.modules.progress.ui.NbProgressBar.getPreferredSize(NbProgressBar.java:90)
     at org.netbeans.modules.progress.ui.StatusLineComponent.<init>(StatusLineComponent.java:137)
     at org.netbeans.modules.progress.ui.ProviderImpl.getDefaultWorker(ProviderImpl.java:59)
     at org.netbeans.progress.module.Controller.getProgressUIWorker(Controller.java:128)
     at org.netbeans.progress.module.Controller.run(Controller.java:332)
     at org.netbeans.progress.module.Controller.actionPerformed(Controller.java:357)
     at javax.swing.Timer.fireActionPerformed(Unknown Source)
    [catch] at javax.swing.Timer$DoPostEvent.run(Unknown Source)
     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
     

    The aplication is a small rectangle in the upper left corner.  I can open it and select a New report.  I go through the 'wizard' to create a new report and when I select the option to go to the designer, I get another exception:

    java.lang.NullPointerException
     at org.netbeans.core.multiview.TabsComponent.setModel(TabsComponent.java:141)
     at org.netbeans.core.multiview.MultiViewPeer.setMultiViewDescriptions(MultiViewPeer.java:118)
     at org.netbeans.core.multiview.MultiViewCloneableTopComponent.setMultiViewDescriptions(MultiViewCloneableTopComponent.java:94)
     at org.netbeans.core.spi.multiview.MultiViewFactory.createCloneableMultiView(MultiViewFactory.java:129)
     at com.jaspersoft.ireport.designer.JrxmlEditorSupport.createPane(JrxmlEditorSupport.java:117)
     at org.openide.text.CloneableEditorSupport.createCloneableTopComponent(CloneableEditorSupport.java:1158)
     at org.openide.windows.CloneableOpenSupport.openCloneableTopComponent(CloneableOpenSupport.java:197)
     at org.openide.windows.CloneableOpenSupport$1.run(CloneableOpenSupport.java:98)
     at org.openide.util.Mutex.doEvent(Mutex.java:1335)
     at org.openide.util.Mutex.writeAccess(Mutex.java:452)
     at org.openide.windows.CloneableOpenSupport.open(CloneableOpenSupport.java:95)
     at org.openide.text.CloneableEditorSupport.open(CloneableEditorSupport.java:437)
     at com.jaspersoft.ireport.designer.wizards.NewJrxmlWizardIterator$2.run(NewJrxmlWizardIterator.java:238)
     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.Dialog$1.run(Unknown Source)
     at java.awt.Dialog.show(Unknown Source)
     at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:867)
     at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:901)
     at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:889)
     at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:109)
     at org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
     at org.openide.util.Mutex.readAccess(Mutex.java:268)
     at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:874)
     at java.awt.Component.show(Unknown Source)
     at java.awt.Component.setVisible(Unknown Source)
     at com.jaspersoft.ireport.designer.templates.TemplatesFrame.runTemplateWizard(TemplatesFrame.java:465)
     at com.jaspersoft.ireport.designer.templates.ReportTemplateItemAction.performAction(ReportTemplateItemAction.java:50)
     at com.jaspersoft.ireport.designer.templates.TemplatesFrame.jButtonOpenTemplateActionPerformed(TemplatesFrame.java:320)
     at com.jaspersoft.ireport.designer.templates.TemplatesFrame.access$600(TemplatesFrame.java:55)
     at com.jaspersoft.ireport.designer.templates.TemplatesFrame$9.actionPerformed(TemplatesFrame.java:236)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at javax.swing.JComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.Dialog$1.run(Unknown Source)
     at java.awt.Dialog.show(Unknown Source)
     at java.awt.Component.show(Unknown Source)
     at java.awt.Component.setVisible(Unknown Source)
     at com.jaspersoft.ireport.designer.templates.TemplatesFrame.setVisible(TemplatesFrame.java:577)
     at com.jaspersoft.ireport.designer.standalone.menu.NewReportAction.performAction(NewReportAction.java:200)
     at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118)
     at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)
     at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
     at javax.swing.AbstractButton.doClick(Unknown Source)
     at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
     at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at javax.swing.JComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
    [catch] at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
     

    And the program does not bring up a designer, just the empty main window with the menu bar on top.

    I tried the netbeans plugin but can't figrue out how to get into the designer there either.

    Any suggestions for a tutorial or other example on how to get started?

    Thanks

     

  16. The problem was that in the bowels of NetBeans, the older Jasper Reports libraries were being referenced.

    This, apparently caused some confusion.   It looks like there is a change between the Jasper Reports libraries - not backward compatible.

    I was not able to resolve this by changing libraries in the NetBeans IDE library manager, but had to ferret it out in the internal setup files for NetBeans.

    Not sure exactly how I found it, but if you do a project search for the old library name, you might find a reference that you can delete.

×
×
  • Create New...