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

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.

  • What are correct steps of integrating and using jasper report with ADF 11g?

    Hi,
    I am using JDev 11.1.1.2.0 with ADF 11g.
    I want to use jasperreports 3.7.0 along with ADF 11g to build reports in PDF on a button event. This is the first time I will be attempting it so before starting up I went through forum to get exact and clear steps on the jars and integration points of jasper with adf. There is exhaustive list but still it does not have the needed clarity.
    Can anyone help in listing down the jars and integration steps? and also want to know if there are any points in particular that I need to be aware of while running i along with ADF faces.
    Pls note the ver. of jasper and adf mentioned above.
    Thanks in advance.
    Edited by: user8925296 on May 14, 2010 4:06 PM

    Hi,
    Basically, you need to:
    - have all the jars in ViewProject/WEB-INF/lib, and include them to the project (Project properties -> Libraries and Classpath) - last time I did this was with version 3.1.3 and the necessary jars were jasperreports-3.1.3.jar, jcommon-1.0.0.jar and iText-2.1.4.jar (plus poi<+whatever is the latest version+>.jar if you want to generate .XLS reports)
    - call the code for generating reports from your backing bean (button's actionListener)
    - flush the report to the client (directly to HTTPResponse or by using af:fileDownloadListener)
    Those are the general steps, without going into the coding.
    Pedja

  • Crystal Reports and salesforce integration question

    I have a question about Crystal Reports connectivity to salesforce.  We are running Crystal Reports version 14.0.4.738 RTM.  When you create a new report and use the Database Expert, you can select www.salesforce.com as the data source.  I would like to know if the built-in connection to salesforce is secure.  Is our data secure in transit from salesforce to Crystal?  Is my password passed in clear text?  That kind of thing...
    Thanks!
    Message was edited by: Ludek Uher

    Pete,
    As any SAP product Crystal Reports is going through users data security check before any new release. It includes any bult-in connection that comes as a part of product installation. Unfortunately I do not have any document for a reference, but your user password is not exposed in CR connectivity.
    I think I should mention that prior to Crystal reports 2013 (version 14.1....) we used our own java based driver, but starting from CR 2013 we are outsourcing the driver to a third party and it is ODBC driver. It means the SFDC driver will automatically change if you decide to update your CR 2011.
        Hope it helps,
    Vitaly

  • 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

  • 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

  • Crystal report and SAP system question

    Hi,
    I try to report off the SAP system using crystal reports without installation of the BOE server. But with very few knowledge of the SAP system, I am not clear of how and what to do. The following is what I have done:
    1. From the client machine, I open the crystal report 2008
    2. click "SAP" button and then click "Create New Report from a Query"
    3. Select the system and enter the login user name/ password information
    4. A dialog "Select Query for your Crystal Report" displayed.
        But under "Favorites", no entry found
        Under "Roles", no entry found
        Under infoAreas,  there is a "Technical content" on top level and "Exchange Rate Type" is under it. I select this exchange rate type in the report, but it is an empty table.
    If I use the same user name/ password to  log on the SAPGUI, I am able to see lots of data.
    Does anyone know what are the appropriate configuration steps to make the tables/views in the SAP system visible in the crystal reports? Could you please give me the details? Any help is appreciated.
    Thanks,
    Vicky

    Hi,
    are you trying to report on top of a BW query (mentioned in step 1 and 2) or you trying to create a report on top of tables (mentioned further down).
    Ingo

  • Report and Page Rendering question

    Hi,
    I have a report page that I've added a new region for entering search criteria. Everything is working fine, except one small thing. When the page loads for the first time, it still returns all rows just as it did before I added the criteria region. How can I change the report so no rows are returned during the pages initial rendering, but only when the criteria is submitted?
    Best Regards,
    Brian Peasey

    The easiest thing would be to put a condition on the report region to only display when PX_SEARCH is not null.

  • Jasper report in Jdev adf

    dear all,
    i'm now trying to integrate jasper report in ADF..
    and i'm try to code this code at bean..but its error..
    public void runOracleReport(ActionEvent actionEvent) {
    JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(PopulateBean.createBeanCollection());
    Map parameters = new HashMap();
    parameters.put("branchval", getBranchId());
    try
    InputStream input = new FileInputStream(new File("C:\\Users\\user\\.ireport\\4.7.0\\config\\Templates\\Report\\GenerateOfferLetter.jrxml"));
    OutputStream os = new FileOutputStream(new File("C:\\Users\\user\\Desktop\\ICEMS\\Report\\offerLetter.pdf"));
    JasperDesign jasperDesign = JRXmlLoader.load(input);
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
    JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
    JasperExportManager.exportReportToPdfStream(jasperPrint, os);
    JasperViewer.viewReport(jasperPrint, false);
    catch (JRException e) {e.printStackTrace();}
    catch (Exception e) {e.printStackTrace();}
    is it any connection code that i have to write..
    Thank you

    thank you very2 much..it helps me al lot..
    2 questions taht i confused:
    1: Is it query at adf must be same at query jasper?
    2: Is it this code is valid code when i want to call more than parameters:
    Map parameters = new HashMap();
    parameters.put("branchval", getBranchId());
    parameters.put("degreeVal", getDegreeId());
    parameters.put("intakeVal", getIntakeId());
    parameters.put("typeOfferVal", getTypeOfferId());
    parameters.put("jasperParamenterName", "ParameterValue"); Used if you want to pass a parameter to a jasper report
    JasperPrint print = JasperFillManager.fillReport(report, parameters, conn);
    Thank you

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

  • GENERATING ORACLE REPORT IN ADF

    Hi,
    i need to generate offer letter for student.
    an admin will need to generate offer letter of student bases on their intakeId, branchId, degId, and typeofferletter.
    currently im doing this in adf form. from here how to transfer the information in adf form into offer letter template and print it in pdf?

    Hi,
    actually there are two questions in one:
    1: How to call an Oracle Reports from ADF?
    Answer is to use the Oracle Reports URL to request a report. The data submitted by an ADF form could be passed as URL parameters or - if sensitive information is involved - saved in a temporary table for reports to look it up. Have a look at for an option to download the PDF by referenring the Reports URL http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12419/tagdoc/af_fileDownloadActionListener.html
    2: How to generate PDF from ADF
    Jasper Reports, BI Publisher or POI are the options people use for reporting in ADF. Jasper Reports and BI Publisher allow the creation of PDF documents based on form content submitted from ADF
    Frank

Maybe you are looking for

  • New iTunes Library erases iPhone?

    I cabled my iPhone 4 to a different computer (MBP in products below).  I had been using a Windows XP box to manually manage (not sync) music/vids/tones to my phone.  When I connected to the "new" computer, I checked, "Manually manage music and videos

  • Error: SAPSQL_INVALID_FIELDNAME

    Hi , I have an issue with an ABAP load program that uploads a spreadsheet and calls a function module to update prices via IDoc. This program is a generic load program to maintain SD and MM pricing. The issue is that the user is getting a short dump

  • C7280 wont print, why?

    I have a c7280 all in one printer that i have had for many years and have never had a problem, but that changed today and i can't figure out what is wrong.  I am hooked up to my wireless router network and can print from my PC and my laptop, and agai

  • SQl server to Oracle -- Replicat error command disallowed by current ..

    I am trying to set replication b/w sql serve *& oracle.. Source -- SQL server 2005 SP4. Target - Oracle 11.2.0.3 - using ASM ..single instance.. The error log is .... 2012-02-10 17:33:47 ERROR OGG-00664 Oracle GoldenGate Delivery for Oracle, rcatd1.p

  • Open Directory, Active Directory, Both????

    Good morning from Paris, My company will migrate its Macintosh to Mac OSX 10.5 and I'm wondering what's best for Authentification and SSO. I did investigate a bit and finally choosed to add an Open Directory among our existing Active Directory. In or