Jasper report and image

Hi,
I use jasper report with an XML datasource. I have an image in the xml stream encode as a string with a class name Base64.
I want to display the image in my report but I dont know how to do this. Does someone know something about this ?
Help, please.
Thanks.
Guillaume.

use iReport to edit you reports
and insert images..
ireport link .
http://ireport.sourceforge.net/
it's simple to add new images

Similar Messages

  • Problem in debuging jasper reports and ADF

    Hi
    I am using JDeveloper 11.1.2.2.0. Inside I created Fusion Web Application ADF, and on the index page created Go button. Now I created Servlet with doGet methode and conncected it to Go button. It is working OK.
    Now I want to run simple jasper report from servlet. Jasper report is based on empty dataset. Here is servlet code:
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ServletOutputStream servletOutputStream =response.getOutputStream();
    InputStream reportStream = getServletConfig().getServletContext()
    .getResourceAsStream("C:/Users/myDomain/Desktop/Reporting/ReportPDFPrazan.jasper");
    try
    JasperRunManager.runReportToPdfStream(reportStream,servletOutputStream,null, new JREmptyDataSource());
    response.setContentType(CONTENT_TYPE);
    servletOutputStream.flush();
    servletOutputStream.close();
    catch (JRException e)
    // display stack trace in the browser
    StringWriter stringWriter = new StringWriter();
    PrintWriter printWriter = new PrintWriter(stringWriter);
    e.printStackTrace(printWriter);
    response.setContentType("text/plain");
    response.getOutputStream().print(stringWriter.toString());
    When I hit Go button here what I get:
    java.lang.NullPointerException
         at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2265)
         at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2278)
         at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
         at java.io.ObjectInputStream.(ObjectInputStream.java:279)
         at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.(ContextClassLoaderObjectInputStream.java:53)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:214)
         at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:632)
         at net.sf.jasperreports.engine.JasperRunManager.runToPdfStream(JasperRunManager.java:428)
         at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:849)
         at view.com.lanaco.servlets.PrviServlet.doGet(PrviServlet.java:35)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    and so on(I can put whole stack if necery)
    I also imported this libraries inside ViewControl project:
         Jasperreports-4.7.1.jar
         Commons-beanutils-1.8.0.jar
         Commons-collections-2.1.1.jar
         Commons-digester-2.1.jar
         Commons-logging-1.1.1.jar
         IText-2.1.7.jar
         Groovy-all-1.7.5.jar
         Poi-3.7-20101029.jar
    Can someone help me with debuging. Please
    Edited by: MarcusO on 2012.10.23 05:18

    I found solution. It should be used like this:
    InputStream reportStream = new FileInputStream(new File("C:/Users/myDomain/Desktop/Reporting/ReportPDFPrazan.jasper"));
    So problem was in input stream. It works fine now.

  • Crsytal Report and Images

    I seem to have problem with images and Crystal reports. I am displaying multiple images in a report. I want to display 2 images per page. Now the images could be of multiple sizes and hence I dynamically reduce them to the maximum size available on the page.
    When I try and print the images the images if they are bigger than the pages size I have tried to re size them keeping the DPI same so that they appear on the page but by default Crsytal reports converst the images into 96 DPI Images.
    I am not sure if it does or is there any setting because of which it does. Since I wan them to retain the DPI I would not want them to change the DPI.
    Is anyone aware of how crystal report handles images or any information on the DPI of Images in Crystal reports

    Hi, Ashwin;
    Are you seeing this issue at runtime, or is it in the Crystal Reports Designer?
    A couple of articles relating to runtime:
    [Images|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303330333633343334%7D.do]
    [Resolution|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313333333533303336%7D.do]
    Regards,
    Jonathan

  • How to generate jasper report and how to integrate jasper report in ADF11g

    Hi All,
    I want to generate jasper report in ADF11g Jdeveloper.and how to integrate jasper report in adf11g.give any link and simple example of jasper report with adf11g.then please help me and send example.
    Thanks&Regards
    Anup

    Ha, that's incredibly useful :-) Of course every response can be simplified to: http://lmgtfy.com/?q=let+me+google+that+for+you
    CM.

  • Jasper reports and bpel?

    Is it possible (somehow) to generate pdf document using jasper reports (or any other framework for that matter) from bpel process?
    Can anybody guide me to any tutorial or something that adresses this kind of "problem"?
    I'm quite a newbie in Oracle BPEL and SOA. Maybe there is already some mechanism for doing this?
    Thanks in advance :)

    I want to generate pdf file based on xml based result from bpel process and save that file to a file system.
    Creating web service for that purpose is, in my opinion, quite elegant solution. I'll go with that for now since I know web service and jasper reports technologies.

  • Jasper reports and web sphere

    how can i plugin the jasper reports into IBM websphere 5
    please help

    how can i plugin the jasper reports into IBM websphere 5
    please help

  • Long running threads (Jasper Reports) and AM-Pooling

    Hi,
    we are developing quite large application with ADF an BC. We have quite a lot of reports generated through Jasper that take quite long time to complete. The result is a PDF document that user gets on the UI so he can download it over download link. Reports that take over an hour to finish are never completed and returned to the user on UI. I think the problem is in AM-Polling because we are using default AM-Polling settings:
    <AM-Pooling jbo.ampool.maxinactiveage="600000" jbo.ampool.monitorsleepinterval="600000" jbo.ampool.timetolive="3600000"/>
    The AM is destroyed or returned to pool before reports finishes. How to properly configure those settings that even long running threads will do there jobs to the end.
    We also modified web.xml as follows:
      <session-config>
        <session-timeout>300</session-timeout>
      </session-config>
    Any help appreciated.
    Regards, Tadej

    Your problem is not related to ADF ApplicationModules. AMs are returned to the pool no earlier than the end of request, so for sure they are not destroyed by the framework while the report is running. The AM timeout settings you are referring to are applicable only to idle AMs in the pool but not to AMs that have been checked out and used by some active request.
    If you are using MS Internet Explorer, then most probably your problem is related to the IE's ReceiveTimeout setting, which defines a timeout for receiving a response from the server. I have had such problems with long running requests (involving DB processing running for more than 1 hour) and solved my problem by increasing this timeout. By default this timeout is as follows:
    IE4 - 5 minutes
    IE5, 6, 7, 8 - 60 minutes
    I cannot find what the default value is for IE9 and IE10, but some people claim it is only 10 seconds, although this information does not sound reasonable and reliable! Anyway, the real value is hardly greater than 60 minutes.
    You should increase the ReceiveTimeout registry value to an appropriate value (greater than the time necessary for your report to complete). Follow the instructions of MS Support here:
    Internet Explorer error &quot;connection timed out&quot; when server does not respond
    I have searched Internet for similar timeout settings for Google Chrome and Mozilla Firefox, but I have not found anything, so I instructed my customers (who execute long-running DB processing) to configure and use IE for these requests.
    Dimitar

  • Apex 4.0 interactive reports and images

    To the community,
    I haven't had a chance to do a decent search before bed, but I was wondering if anyone had links to good examples on OTN, someone's blog, apex.oracle.com etc, but I thought I'd put the question out there overnight.
    I have a table that contains my blob/mimetype/filename information, and I'd like to create a sample interactive report that displays the image in the blob in all three formats - standard interactive report, using the icon view, and using the detail view.
    Note I'm not referring to images that may be in the repository or file system - but within in a table.
    For whatever reasons I was losing the battle this afternoon, I was just wondering if anyone knew of good concise examples, such as this for using images in form & classic report pages.
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    Cheers,
    Scott

    I have finally replicated the solution, with the help of the following thread
    Confusion with get_blob_file_src
    found when searching "broken image" as one of the keywords.
    Such a horrible and non-intuitive solution to get images displayed in an interactive report!
    Hopefully the Apex team can work on improving this in future releases...
    Scott

  • Jasper Reports and ADF: JRDataSource question

    Hi all,
    I am stuck with a problem creating a dynamic report with jasper. I want to use data from a VO or binding, not via a select in my report. Here is were i am at right now:
    BindingContainer bc = this.getBindings();
    DCIteratorBinding iterBinding = (DCIteratorBinding) bc.get("VO1Iterator");
    RowSetIterator iter = iterBinding.getRowSetIterator();
    Row[] matrix = new Row[iter.getRangeSize()];
    int i=0;
    while(iter.hasNext())
    matrix[i] = iter.next();
    //output to my msg facet:
    fc.addMessage(null, new FacesMessage("Hour FROM: " + matrix.getAttribute("HourFrom") + " TO: " + matrix[i].getAttribute("HourTo") + " FACTOR: " + matrix[i].getAttribute("Factor")));
    i++;
    iter.closeRowSetIterator();
    JRDataSource myDS = new JRBeanArrayDataSource(matrix);
    In my report i am using $F{HourFrom} to access my values, but i keep getting:
    Jasper Error:Error retrieving field value from bean : HourFrom
    I'm using Jdev 10.1.3 with oracle 10g .
    I understand that i'm not accessing the JRDataSource correctly. Hopefully someone can point me in the right direction.
    Regards,
    Arnaud

    Hi all,
    I am stuck with a problem creating a dynamic report with jasper. I want to use data from a VO or binding, not via a select in my report. Here is were i am at right now:
    BindingContainer bc = this.getBindings();
    DCIteratorBinding iterBinding = (DCIteratorBinding) bc.get("VO1Iterator");
    RowSetIterator iter = iterBinding.getRowSetIterator();
    Row[] matrix = new Row[iter.getRangeSize()];
    int i=0;
    while(iter.hasNext())
    matrix[i] = iter.next();
    //output to my msg facet:
    fc.addMessage(null, new FacesMessage("Hour FROM: " + matrix.getAttribute("HourFrom") + " TO: " + matrix[i].getAttribute("HourTo") + " FACTOR: " + matrix[i].getAttribute("Factor")));
    i++;
    iter.closeRowSetIterator();
    JRDataSource myDS = new JRBeanArrayDataSource(matrix);
    In my report i am using $F{HourFrom} to access my values, but i keep getting:
    Jasper Error:Error retrieving field value from bean : HourFrom
    I'm using Jdev 10.1.3 with oracle 10g .
    I understand that i'm not accessing the JRDataSource correctly. Hopefully someone can point me in the right direction.
    Regards,
    Arnaud

  • Integrate jsf, jboss and jasper reports

    Hi there!
    I've a problem with integration jboss with jasper reports and jsf. Which jasper classes do I have to place on a server and what jboss files do I need to configure? How can I run jasper report from the jsf page? Any information on this subject will be very usefull.
    Thanx for help in advance.
    Adam

    Unless I have totally misunderstood your question, I think you have posted this question in the wrong forum. This forum is dedicated to developer questions about JSR 208 (Java Business Integration), a specification from the JCP that describes a service-oriented integration architecture. In this realm, integration means getting separate applications and messaging systems to interoperate, when they were never designed to do so. Your question sounds like you want to install particular technologies into jboss; this is a very different use of the term "integration".

  • Apex and Jasper Report Integration

    Hi all,
    If someone was interested to try another way for pdf generation from an apex application can try our Report Chunker based on Jasper Report and now avaiable to download on :
    [http://sourceforge.net/projects/reportchunker/]
    The latest release includes an APEX DEMO APPLICATION.
    Any feedback will be welcome.
    Edited by: NeOGeO on 23-set-2008 1.28

    A few points here.
    Documentation:
    You need to state what permissions are required.
    eg create table, create sequence, create trigger, read/write directory.
    You should also mention the authentication method you use.
    Fortunately I could figure that out myself.
    Now bearing in mind I am your typical target audience, I have no knowledge of Jasper reports, and very little knowledge of java and xml. So I'm now stuck as I don't know what to use for the xml layout or how to write my report.
    At least provide an example xml layout, a example report and a link to where the reports cab be obtained.
    If we need to have anything on the system before we start (eg jasper reports) then this should also be stated (including minimum required version)
    Thats it. Unfortunately I can't go any further until I know more.

  • Issue when opening pdf using Jasper Report in WLS 9.2

    hi
              I am new to jasper reports and I am using them in Java Page Flow in bea workshop 9.2 Jasper Report 2.0.4
              Created .jasper using iReport
              In one of my action methods
              ServletOutputStream servletOutputStream = getResponse().getOutputStream();
              InputStream reportStream = getServlet().getServletConfig().getServletContext().getResourceAsStream("/classic.jasper");
              JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, new HashMap() ,connection);
              getResponse().setContentType("application/pdf");
              servletOutputStream.flush();
              servletOutputStream.close();
              connection.close();
              When I invoke this action method from another page on click of submit , the pdf file opens fine for the first time wiht all the data in the pdf ( first submit) , and then I closed the pdf and if I click on submit again, it fails to open the pdf with the error message ,
              There was an error opening this document . This file cannot be found.
              However if I keep any pdf / adobe open it is able to open the pdf for mulitple request (submits )
              if I close the pdf it is able to generate the pdf only for the first time and not the second time.
              Please help me resolve the issue, its urgent.
              thanx in advance
              Madhusudan
              HP

    Hi, I am having the same problem as your user when I try to open a pdf form in acrobat. I also have had a similar problem, still unresolved, described here: http://forums.adobe.com/message/5146964.
    I can't find any solutions. I even tried uninstalling Acrobat X pro and instead gong back to installing Acrobat 9. Same problems persist. Don't know what to do.

  • Help required: Cannot open pdf using Jasper Report in Weblogic workshop 9.2

    This message was accepted by the [email protected] mailing list. Hi ,
    I am new to jasper reports and I am using them in Java Page Flow in bea workshop 9.2
    In one of my action methods
    ServletOutputStream servletOutputStream = getResponse().getOutputStream();
    InputStream reportStream = getServlet().getServletConfig().getServletContext().getResourceAsStream("/classic.jasper");
    JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, new HashMap() ,connection);
    getResponse().setContentType("application/pdf");
    servletOutputStream.flush();
    servletOutputStream.close();
    connection.close();
    When I invoke this action method from another page on click of submit , the pdf file opens fine for the first time( first submit) , and then if I click on submit again, it fails to open the pdf with the error message ,
    There was an error opening this document . This file cannot be found.
    Please help me resolve the issue, its urgent.
    Thanx in advance

    Thanks for the reply David. The problem we're having is that when you are in Workshop, there is the option, under the "File" menu to "Refresh" (F5) You sometimes need to do this to refresh your workspace. I'm sorry, I'm not a developer, so I don't know the details behind what that actually does, other than it "refreshes the workspace" so we can pick up the changes made and checked into subversion.
    Without performing this step, you don't always build from the latest and greatest code.
    The problem we're facing is that it seems that you need to be in Workshop to perform this step. There is a scripted way to do the refresh, but it requires you to open Workshop and run the script. What we're trying to accomplish is a truly scripted solution. All the other steps in the build process can be performed without opening Workshop, but because we can't figure out a way to do this one piece, we cannot have an automated build process.
    - Brian

  • Date problem with jasper reports

    I need to pass the date values as a parameter to the jasper reports and process it in the report, how can achieve it please give me a brief explanation, i need the date value for processing a sql statement in the jasper report please help me a sample code
    from=first date value;
    to=second date value;
    //i need to pass the date  as the parameter how can i achieve it
          HashMap hm = new HashMap();
           hm.put("fromdate", from);
           hm.put("todate", to);
      JasperPrint jasperPrint;
                        jasperPrint = JasperFillManager.fillReport("W:/ReportWorks/Estimation Reports/Dailyreport ItemWise.jasper",hm, con);
                        JasperViewer.viewReport(jasperPrint,false); 

    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

  • Can we add different pages in the jasper report

    Dear friends,
    Can anyone help out ,how to add different pages in the jasper report and also can i increase or decrease the textfield size dynamically,
    Thanks in advance
    Urgent

    http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=showcat&catid=8

Maybe you are looking for