Problem while incrementing a variable in Jasper Reports

Hi
I am using Jasper Reports for designing reports. These reports will be used by my Java application.
But there is problem while I am trying to increment a variable depending on some condition.
Requirement: I have to display information about all the residents in a hospital in a single report. Resident information will be fetched from the XML file. When a resident ID is found in the XML, then the variable(resno) shoud be incremented. I have set the initial value to 1.
Problem: Only for the first resident, resno is showing as 1. For all the remaining residents, its showing as 0 (zero).The variable 'resno' is not incrementing for each resident.
Even the ResidentID is not null. All the ResidentID's exists in the XML file.
Please find the code below.
<variable name="resno" class="java.lang.Integer" incrementType="Group" incrementGroup="residentbrk" calculation="Count">
<initialValueExpression><![CDATA[new Integer(1)]]></initialValueExpression>
</variable>
<group name="residentbrk" isStartNewPage="true">
<groupExpression><![CDATA[$F{ResidentID}]]></groupExpression>
<groupHeader>
<band height="16">
<textField hyperlinkType="None">
<reportElement positionType="Float" x="0" y="-1" width="96" height="17"/>
<textElement>
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$R{residentno}]]></textFieldExpression>
</textField>
<textField hyperlinkType="None">
<reportElement positionType="Float" x="96" y="-2" width="64" height="18"/>
<textElement/>
<textFieldExpression class="java.lang.Integer"><![CDATA[$V{resno}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
Could you please provide a solution for this.

Not clear at all. May be like this
declare
v_temp varchar2(100);
v_final number;
begin
--loop
v_temp:='sun';
v_temp:=translate(lower(v_temp), '1abcdefghijklmnopqrstuvwxyz', '1');
dbms_output.put_line('Temp:'||v_temp);
v_temp := v_temp || 'Mon5.1';
v_temp:=translate(lower(v_temp), '1abcdefghijklmnopqrstuvwxyz', '1');
dbms_output.put_line('Temp:'||v_temp);
v_temp:= v_temp || 'Tue';
v_temp:=translate(lower(v_temp), '1abcdefghijklmnopqrstuvwxyz', '1');
dbms_output.put_line('Temp:'||v_temp);
v_final:=to_number(v_temp);
dbms_output.put_line('v_final'||v_final);
--coalesce
--end loop;
end;
/

Similar Messages

  • Problem while exporting the data from a report to an excel file.

    Hi SAP guru's,
    I have a problem while exporting the data from a report to an excel file.
    The problem is that after exporting, the excel file seems to have some irrelevant characters....I am checking this using SOST transaction..
    Required text (Russian):
    Операции по счету                                    
    № документа     Тип документа     № учетной записи     Дата документа     Валюта     Сумма, вкл. НДС     Срок оплаты     Описание документа
    Current Text :
       ? 5 @ 0 F 8 8  ? >  A G 5 B C                                   
    !   4 > : C       "" 8 ?  4 > : C      !   C G 5 B = > 9  7 0 ? 8 A 8        0 B 0  4 > : C         0 ; N B 0      ! C <       ! @ > :  > ? ; 0 B K        ? 8 A 0 = 8 5  4 > : C
    Can you help me making configuration settings if any?
    Regards,
    Avinash Raju

    Hi Avinash
    To download  such characteres you need to adjust code page to be used during export. You can review SAP note 73606 to identify which code page is required for this language
    Best regards

  • Problem with a custom tag using Jasper Report

    Hi everybody, I'm deprived of hope,
    I wrote this code for a custom taglib to convert a .jasper file into a .pdf file:
    package com.tag;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.engine.export.*;
    import net.sf.jasperreports.engine.util.*;
    import net.sf.jasperreports.view.*;
    import java.sql.*;
    import org.apache.commons.logging.*;
    import java.io.*;
    import java.util.*;
    public class GeneratePDF extends TagSupport
    private String sourceFileName = "C:\\default.jasper";
    private String destinationFileName = "C:\\default.pdf";
    public void setSourceFileName(String sourceFileName)
    this.sourceFileName = sourceFileName;
    public void setDestinationFileName(String destinationFileName)
    this.destinationFileName = destinationFileName;
    public int doStartTag()
    return SKIP_BODY;
    public int doEndTag()
    try
    //Passaggio parametri da passare al jasper.
    Map parameters = new HashMap();
    parameters.put("param1", new Integer(1));
    //Preparazione del file da stampare (in questa fase si esegue la query e si inseriscono
    //i valori estratti dalla query)
    JasperPrint jasperPrint=JasperFillManager.fillReport(sourceFileName, parameters, getConnection());
    //Creazione del PDF
    JasperExportManager.exportReportToPdfFile(jasperPrint, destinationFileName);
    System.exit(0);
    catch(Exception e)
    { e.printStackTrace();}
    return EVAL_PAGE;
    /**Metodo per creare la connessione al DB*/
    private static Connection getConnection() throws ClassNotFoundException, SQLException {
    //Change these settings according to your local configuration
    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String connectString = "jdbc:odbc:gecoware";
    String user = "admin";
    String password = "password";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(connectString, user, password);
    return conn;
    No errors while compile but in execution I have this message:
    javax.servlet.ServletException: net/sf/jasperreports/engine/JasperFillManager
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:872)
    org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:114)
    org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:792)
    java.security.AccessController.doPrivileged(Native Method)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:790)
    org.apache.jsp.reportPDF_jsp._jspService(reportPDF_jsp.java:80)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    root cause
    java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JasperFillManager
    com.tag.GeneratePDF.doEndTag(GeneratePDF.java:49)
    org.apache.jsp.reportPDF_jsp._jspx_meth_JR_GeneratePDF_0(reportPDF_jsp.java:97)
    org.apache.jsp.reportPDF_jsp._jspService(reportPDF_jsp.java:68)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:141)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    Please HELP ME !!!!!!!!!
    Thank you in advance
    AleX

    Do you have the Jasper classes in /WEB-INF/lib?

  • Problem while incrementing the index

    Hi Friends,
    I am working on creating Credit memos and return orders through BDC. For the item level, I am incrementing the index in order to enter the MATNR, POSNR, KWMENG etc. I have seven lines open in my screen. So when I have an order greater than or equal to seven lines, the program is showing an error that that line does not exist in the screen. Please, let me know what is the solution for this.
    Thanks,
    Raj

    Srinivas,
    I am giving a new line from the very first line. It is working fine till the seventh line. But after the seventh line, the cursor is coming to the MATNR position and the proghram errors there. I am also attaching my code. If you can correct me from that, it would be helpful.
    idx = 01.
    LOOP AT ITABI WHERE IHREZ = ITABH-IHREZ.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                       '=POAN'.
        CONCATENATE 'VBAP-ABGRU(' IDX ')' into FNAM.
        perform bdc_field using 'BDC_CURSOR'
                                 FNAM.
        CONCATENATE 'RV45A-MABNR(' IDX ')' INTO FNAM.
        perform bdc_field       using fnam
                                        ITABI-MABNR.
        CONCATENATE 'VBAP-ZMENG(' IDX ')' INTO FNAM.
        perform bdc_field       using FNAM
                                         ITABI-ZMENG.
        CONCATENATE 'VBAP-POSNR(' IDX ')' INTO FNAM.
        perform bdc_field       using fnam
                                        ITABI-POSNR.
        concatenate 'VBAP-ABGRU(' IDX ')' INTO FNAM.
        perform bdc_field       using FNAM
                                       'Z2'.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                       '=PKO1'.
       CONCATENATE 'VBAP-POSNR(' IDX ')' into FNAM.
       perform bdc_field using 'BDC_CURSOR'
                                 FNAM.
        perform bdc_dynpro      using 'SAPMV45A' '5003'.
        perform bdc_field       using 'BDC_OKCODE'
                                         '/00'.
        perform bdc_field       using 'BDC_CURSOR'
                                       'KOMV-KSCHL(01)'.
       perform bdc_dynpro      using 'SAPMV45A' '5003'.
         perform bdc_field       using 'BDC_OKCODE'
                                         '=V69A_KOAN'.
         perform bdc_field       using 'BDC_CURSOR'
                                       'KOMV-KSCHL(01)'.
        perform bdc_dynpro      using 'SAPMV45A' '5003'.
        perform bdc_field       using 'BDC_OKCODE'
                                         '/00'.
        perform bdc_field       using 'BDC_CURSOR'
                                        'KOMV-KWERT(07)'.
        perform bdc_field       using 'KOMV-KSCHL(02)'
                                          'ZPR0'.
          perform bdc_field       using 'KOMV-KBETR(02)'
                                         ITABI-KBETR1.
          perform bdc_field       using 'KOMV-KSCHL(03)'
                                          'ZPRS'.
          perform bdc_field       using 'KOMV-KBETR(03)'
                                         ITABI-KBETR2.
          perform bdc_field       using 'KOMV-KSCHL(04)'
                                          'ZR1'.
          perform bdc_field       using 'KOMV-KWERT(04)'
                                         ITABI-KWERT1.
          perform bdc_field       using 'KOMV-KSCHL(05)'
                                          'ZLWR'.
          perform bdc_field       using 'KOMV-KWERT(05)'
                                         ITABI-KWERT2.
          perform bdc_field       using 'KOMV-KSCHL(06)'
                                          'ZLDL'.
          perform bdc_field       using 'KOMV-KWERT(06)'
                                         ITABI-KWERT3.
          perform bdc_field       using 'KOMV-KSCHL(07)'
                                          'ZLFB'.
          perform bdc_field       using 'KOMV-KWERT(07)'
                                         ITABI-KWERT4.
         perform bdc_field       using 'KOMV-KSCHL(08)'
                                         'ZLBD'.
         perform bdc_field       using 'KOMV-KWERT(08)'
                                        '0.00'.
         perform bdc_dynpro      using 'SAPMV45A' '5003'.
         perform bdc_field       using 'BDC_OKCODE'
                                         '=T\13'.
          perform bdc_dynpro      using 'SAPMV45A' '4003'.
          perform bdc_field       using 'BDC_OKCODE'
                                         '/EBACK'.
          perform bdc_field       using 'BDC_CURSOR'
                                         'VBAP-ZZRFAR'.
          perform bdc_field       using 'VBAP-ZZRWAR'
                                          ITABI-WCD.
          perform bdc_field       using 'VBAP-ZZRFAR'
                                         ITABI-FCD.
         idx = IDX + 1.
    ENDLOOP.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                        '=SICH'.
    Thanks,
    Raj

  • Error while passing ODI variable in JNDI Url for JMS Queue XML

    Hi,
    Facing a weird problem while passing ODI variable in JNDI Url for JMS Queue XML.
    Below is the JNDI Url configured under ODI Topology:
    JNDI Url: t3://<host_location>?d=#TEST.SCHEMA_FILE&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
    where,
    #TEST.SCHEMA_FILE --> ODI variable storing xsd name and location
    Issue Description:
    If we restart ODI server then for the first run of any ODI interface using JMS Queue XML, it is unable to get the value for ODI variable present in JNDI Url (d=#TEST.SCHEMA_FILE).
    It throws error message saying: No XSD found
    Temporary Resolution:
    As a temporary fix if we hard-code and pass the value in that ODI variable as shown below, it will successfully go through.
    eg: JNDI Url: t3://<host_location>?d=C:\XSD\test.xsd&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
    Reverting it back to variable later will have no issues and subsequent run will succeed.
    But again anytime later if server is restarted then first run will have this issue.
    Want to have permanent fix for it.
    Any one having idea on it please share. Appreciate your help!

    What ODI version are you using? It could be related to the bug in the older version as described in support note Doc ID 1290326.1

  • Jasper reports help urgent

    Hi,
    I am getting an error while putting the image into jasper reports. the error goes in the folowing way.
    java.io.FileNotFoundException: D:\Tomcat5\webapps\Test (Access is denied)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:272)
         at net.sf.jasperreports.engine.util.JRImageLoader.loadImageDataFromFile(JRImageLoader.java:88)
         at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:255)
         at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:449)
         at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:403)
         at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275)
         at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:279)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:220)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:750)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:647)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         at com.sss.excel.ReportServlet.doPost(ReportServlet.java:157)
         at com.sss.excel.ReportServlet.doGet(ReportServlet.java:140)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Unknown Source)
    Can anyone help me in this regard.The image is already placed in that specified directory.But its giving that error like access denied.
    And one more thing i have already executed another report with the same image in the same directory it is working well.
    please help me and i would gratefull to those who helps me.
    Thanking you in advance,

    Check this.
    http://help.sap.com/saphelp_bw33/helpdata/en/ed/d80c3c99d56448e10000000a114084/content.htm
    http://help.sap.com/saphelp_bw33/helpdata/en/f1/149b3979e90e1be10000000a114084/content.htm
    Also in your R/3 system go to Cost center accounting > Information system > and look at the reports you have. You will be able to create those reports.
    Jaya

  • Image Display Problem while exporting jasper report in EXCEL

    Hi
    I am using Jasper reports for my reporting work using java code.
    when i export my report in PDF then , report is ok and displaying Image properly.
    but when i export my report in EXCEL then , there is no image in my report, rest part is fine.
    Can anyone please help me in getting image in excel format also.
    thanks in advance
    Praveen

    I have not any problem in picture or logo.
    But I have an another problem.
    My Excel format produce multiple column,that is unefficient format.
    If you have not this problem please mail me at --- [email protected]

  • Problem in using Jasper Reports with JFrames

    Hi,
    I am using Jasper Reports in Swings.
    I could Generate Jasper Reports from JFrames with out any problem,
    but while closing the Report, the JFrame is also getting closed automatically.
    this should not happen for my application.
    So, how could i restrict the JFrame from exiting when Jasper Reports are closed.
    Thanx in advance.
    Reddy

    Create jasperviewer object as JasperViewer jasperViewer = new JasperViewer(jasperPrint, false);

  • Problem with Jasper Reports

    hi evrybody... i'm having a problem while using Jasper Reports. I'm trying to Export a jrxml file generated by JasperAssistant plug-in in eclipse. but all i'm having is an exception. the following is my code and the said exception:
    CODE:
    public class DataSourceApp
    private static final String TASK_HTML = "html";
    private static final String TASK_XLS = "xls";
    private static final String TASK_CSV = "csv";
    private static final String TASK_RUN = "run";
    public static void main(String[] args)
    String fileName = null;
    String taskName = null;
    taskName = "html";
    fileName = "path\\DataSourceReport.jasper";
    try
    long start = System.currentTimeMillis();
    if (TASK_HTML.equals(taskName))
    JasperPrint jPrint = new JasperPrint();
    HashMap parameters = new HashMap();
    Connection con = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:BOM_DSN","","");
    jPrint = JasperFillManager.fillReport("path\\DataSourceReport.jrxml", parameters, con);
    JasperExportManager.exportReportToHtmlFile(fileName);
    System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
    System.exit(0);
    catch (JRException e)
    e.printStackTrace();
    System.exit(1);
    catch (Exception e)
    e.printStackTrace();
    System.exit(1);
    EXCEPTION:
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    NESTED BY :
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    NESTED BY :
    net.sf.jasperreports.engine.JRException: Error loading object from file : C:\Eclipse\eclipse\workspace\test\BOM_Package\DataSourceReport.jrxml
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:89)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    Caused by: java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         ... 2 more
    hope you can help me asap.. thanks!
    --joms                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    HI All
    I am working on Jasper report Project and when i am filling the report through
    JasperFillManager.fillreport(String sourceFileName,Map parameters,Connection conn)
    I am getting following exception:(I have included common-collections 3.2.jar in my classpath)
    java.lang.NoClassDefFoundError: org/apache/commons/collections/ReferenceMap
         at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.<clinit>(JRAbstractJavaCompiler.java:58)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:489)
         at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:243)
         at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:411)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:418)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59)
         at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
    Please Suggest ;Thanks in advance

  • I am facing problems while openin an application in facebook and other places.when i go to the application,an error shows and firefox closes autmatically either i send error reports or dont.....plz help

    i am facing problems while openin an application in facebook and other places.when i go to the application,an error shows and firefox closes autmatically either i send error reports or dont.....plz help

    Notes:
    1) Please use the code tags when posting code or JNLP/HTML. It helps to retain indentation and avoids asterisks and plus sings being interpreted as formatting marks. To do that, select the code/JNLP etc. and click the CODE button seen on the Plain Text tab of the message posting form.
    2) That launch file is invalid. You might check it (and the project in general) using JaNeLA.
    3) The only place that SimpleSerial class could be, that the JRE would find, is in the root of aeon.jar. Is it actually there?

  • Problem while importing a Crystal Report in SAP Business One

    Hi Experts,
                        I am facing a problem while importing a Crystal Report in SAP Business One, it displaying an error  "No matching records found  'Queries' (OUQR) (ODBC -2028)  [Message 131-183]" , and there is no use of this table OUQR  in the Query.
    Kindly let  me know the solution.
    Regards
    Rahul Singh

    Hi Rhaul,
    i don't exactly know why this is a problem, but if your not on latest (881 p10) then upgrade and try again.
    Or as a workaround,
    try saveing from CR to SAP with the CR add-on. That usualy works better then the import.
    Regards,
    D

  • Hi Experts , I am currently facing problems while running restricted version copy .. The log says 0 location products copied and that the process has has timed out. the error message is /SAPAPO/MVM_INT_SVC_CO_VER_LCW reported exception in task DP00014, th

    Hi Experts , I am currently facing problems while running restricted version copy in sap apo .. The log says 0 location products copied and that the process has timed out. the error message is " /SAPAPO/MVM_INT_SVC_CO_VER_LCW reported exception in task DP00014 " , then ending in time limit exceeded. could anyone explain why this happens. please note even if the log says 0 location products copied , in reality they have have been partially copied.
    Regards
    Jerel

    Hi, thank you for your replies, I found out few things about my servlet, and its portability
    and i have few questions, although i marked this topic as answered i guess its ok to post
    I am using javax.servlet.context.tempdir to store my files in that servletcontext temporary directory. But i dont know how to give hyperlink
    of the modified files to the user for them to download the modified files.
    What i am using to get the tempdir i will paste
    File baseurl = (File)this.getServletContext().getAttribute("javax.servlet.context.tempdir");
    System.out.println(baseurl);
    baseurl = new File(baseurl.getAbsolutePath()+File.separator+"temp"+File.separator+"files");
    baseurl.mkdirs();so i am storing my files in that temp/files folder and the servlet processes them and modifies them, then how to present them as
    links to the user for download ?
    and as the servlet is multithreaded by nature, if my servlet gets 2 different requests with same file names, i guess one of them will be overwritten
    And i want to create unique directory for each request made to the servlet , so file names dont clash.
    one another thing is that i want my servlet to be executed by my <form action> only, I dont want the user to simply type url and trigger the servlet
    Reply A.S.A.P. please..
    Thanks and regards,
    Mihir Pandya

  • Problem while downloading a ALV report to excel

    Hi experts,
    I have an ALV report which took long time to extract records from various table. So while there is some restriction the report can be executed well in foreground. And the report can be extracted well to excel sheet. But while there is hudge records, i have to execute the report in backgroung. And then from spool i generally prefers to download the report to excel.
    There is a field UOM where it contains value ' " ' for some records. And also there may be possiblity that other fields can also contain the same.
    Now my problem is: while download to excel... When ever there is a value ' " ' from this point to the next value ' " '. It is treating as one record. and keep that in a same position in the excel sheet.
    But i want to keep all the values in there respective fields. Can you please how can i do that? Please give me some solution...
    regards,
    charles.

    If anybody have any solution please send me....

  • Problems with jasper report pdf exporting

    Hello,
    I coded a simple servlet to view a jasper report (created with iReport) after clicking on the right button in the jsp.
    Here is the problem:
    net.sf.jasperreports.engine.JRRuntimeException: Error evaluating expression :
         Source text : (java.awt.Image)it.businesslogic.ireport.chart.DefaultChartFactory.drawChart(new String[]{"chartName=Pie3D","depthFactor=0.2","titlePosition=1","width=245","plotBackground=[255,255,255]","serie1=SERIE_CONTA_RISPOSTE","serie0=SERIE_RISPOSTA","foregroundAlpha=0.33","tooltips=false","chartBackground=[255,255,255]","subtitle=","title=","legend=true","quality=2","height=168","antialias=true"}, (it.businesslogic.ireport.IReportScriptlet)$P{REPORT_SCRIPTLET})
         net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:604)
         net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:343)
         net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:311)
         net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:275)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1302)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
         net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:730)
         net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:632)
         net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
         net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
         net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:203)
         customer_care.servlet.Reporting.getReport(Reporting.java:74)
         customer_care.servlet.Reporting.processRequest(Reporting.java:50)
         customer_care.servlet.Reporting.doGet(Reporting.java:89)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Here is the code:
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            byte[] byte_array = null;
            try{
                File reportFile = new File(this.getServletConfig().getServletContext().getRealPath("/reports/torte_call_center_agenzie.jasper"));
                if (!reportFile.exists()) throw new JRRuntimeException("File jasper non trovato");
                String nomeFile = reportFile.getPath();
                Map parameters = new HashMap();
                parameters.put("codice_questionario", "2");   //just for testing
                ConnettitiAlDB c = new ConnettitiAlDB();
                Connection conn = c.Connettiti(Conf.db_principale);
                byte_array = JasperRunManager.runReportToPdf(fullpath_filename, parameters, connessione);
                conn.close();
            catch(JRException e){
                e.printStackTrace();
            catch(SQLException e) {
                e.printStackTrace();
            response.setContentType("application/pdf");
         response.setContentLength(byte_array.length);
         ServletOutputStream ouputStream = response.getOutputStream();
         ouputStream.write(byte_array, 0, byte_array.length);
         ouputStream.flush();
         ouputStream.close();
         }Any suggestion? That would be vital to me!
    Thanks in advance

    catching the JRRuntimeException and printing its stacktrace i saw that the jfree chart lib was missing.
    i put it in my libraries but now i got this error:
    java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfContentByte.transform(Ljava/awt/geom/AffineTransform;)V
         net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1468)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:484)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:448)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:413)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:250)
         net.sf.jasperreports.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:188)
         net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:205)
         customer_care.servlet.Reporting.getReport(Reporting.java:77)
         customer_care.servlet.Reporting.processRequest(Reporting.java:50)
         customer_care.servlet.Reporting.doGet(Reporting.java:92)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    com.lowagie.text.pdf.PdfContentByte.transform is inside the iText library.
    I had an old version so I updated it but nothing changed.
    Any suggestion?
    Thanks

  • Problem while passing parameter from report to report.

    Hi
    I'm using forms and reports 10g, hava a problem while passing the parameter from reports to report.
    i'm using srw.set_hyperlink to call report from report.
    i have created a key value in the cgicmd.dat file called
    faccre802005-2006: report=faccre80 destype=cache desformat=pdf userid=<userid/passwd@cs> server=<servername>
    Now in the format trigger i'm using this key value
    function BTN_DEBITFormatTrigger return boolean is
    temp varchar2(5000);
    IP_ADDRESS VARCHAR2(50);
    SERVER_NAME VARCHAR2(10);
    L_ACCT_CODE VARCHAR2(14);
    begin
    SELECT MAST_INT_DESC,MAST_USER_PGM_ID INTO IP_ADDRESS,SERVER_NAME FROM MAST_INT_INFO WHERE MAST_INT_ID='VISHWA';
    temp := IP_ADDRESS||'?faccre80'||:P_FIN_YEAR||'+server='||server_name;
    temp :=temp ||'+'||'P_PREVIOUS_CODE='''||:ACCT_CODE||''''||'+'||'P_COMPANY_CODE='''||:P_COMPANY_CODE||'''';
    temp :=temp ||'+'|| 'P_FROM_DATE='''||TO_CHAR(:P_FROM_DATE,'DD-MON-RRRR')||''''||'+'|| 'P_TO_DATE='''||TO_CHAR(:P_TO_DATE,'DD-MON-RRRR')||''''||'+'||'P_TRUST_CODE='''|| :P_TRUST_CODE||'''';
    temp :=temp ||'+'|| 'P_UNIT_CODE='''||:P_UNIT_CODE||''''||'+'||' P_FIN_YEAR='''||:P_FIN_YEAR||'''';
    temp :=temp ||'+'|| 'P_LEVEL='''||:P_LEVEL||''''||'+'||'P_HEADER='''||replace(:P_HEADER,' ','%20')||''''||'+'||'P_FORMAT='''||:P_FORMAT||'''';
    SRW.Set_Hyperlink(temp);
    END;
    return (TRUE);
    end;
    Report is coming but not the expected result because parmaeters are not coming from first report to second report.
    If i dont use cgicmd file userid and password are displyed in the URL.
    Pl tell me how to pass parameter from one report to another.
    thanks and regards

    Hi
    I got the solution.
    I forgot to add %* at end of the KEY value.

Maybe you are looking for

  • FSR IN EXCEL SHEET

    Hi everybody is there a method where we can prepare an FSR in excel sheet in short and sweet way so that the ABAP consultant can understand it more clearly?

  • Why is up next adding songs twice when I use the keyboard shortcut? (windows)

    I only encounter this using the mini-player as far as I know, at least; because the keyboard shortcut doesn't even work on the full sized player. augh.

  • Mac Box Set necessary to upgrade Tiger?

    I have a MacBook Pro running on Tiger 10.4.11. My system won't allow basic updates (Safari, iTunes, Firefox, etc) until I upgrade the system. I wasn't aware of this before. Now I'm behind 3 upgrades, making things tougher(?) I guess the route to go i

  • Installing Plug-ins LR 2

    I have not been able to successfully install plug-ins. I have tried four different plug-ins from the plug-in web site. In each case the file downloads and extracts successfully but when I use the add button on the plug-in manager screen I get the fol

  • Liquid spill, over a year later computer works... how long will it last?

    My boyfriend spilled Mt. Dew on my first gen Macbook a little over a year ago. We took it to PeachMac and they said it would be around $500 to repair the logic board. Since the computer would still come on I decided to look around for any other possi