Data source value for data source reportData was null

hi i'm using struts 2 and jasperreports my problem is
it generate a pdf file with labels but no data in it..
and when i try to look at the logs of my sun application server
it says Data source value for datasource reportData was null.
reportData is an ArrayList of Personnel object.
here is my code..
public class EIS_HR_004_JASPER extends eisSupport {
    private String reportId;
    private String dateStart = null;
    private String dateEnd = null;
    private String pdfFile;
    private final static String _REPORT_FOLDER = "EIS_HR_003";
    private Report thisReport;
    private String dateRange;
    private ArrayList<Personnel> reportData;
    public String execute(ActionMapping mapping,ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {       
        ReportBean reportBean = new ReportBean();
        setThisReport(reportBean.getReport(getReportId()));         
        reportData=new ArrayList<Personnel>();
        Personnel p1=new Personnel();
        p1.setSurname("Dela Cruz");
        p1.setFirstname("Juan");
        p1.setExamcode("CSC111");
        p1.setExamdate("January 1,2003");
        Personnel p2=new Personnel();
        p2.setSurname("Cruz");
        p2.setFirstname("Miguel");
        p2.setExamcode("CSC222");
        p2.setExamdate("December 2,2003");
        reportData.add(p1);
        reportData.add(p2);
     try {
          JasperCompileManager.compileReportToFile(
                    "apps/reports/templates/hr004.jrxml",
                    "apps/reports/templates/hr004.jasper");
     } catch (Exception e) {
          e.printStackTrace();
          return ERROR;
         return SUCCESS;
    public ArrayList<Personnel> getReportData() {
       // setReportData();
        return reportData;
    here is part of my struts.xml
<action name="EIS-HR-004_JASPER" class="eis.report.EIS_HR_004_JASPER">
            <result name="error">/apps/reports/ReportNotFound.jsp</result>
            <result name="success" type="jasper">
                <param name="location">apps/reports/templates/hr004.jasper</param>
                <param name="dataSource">reportData</param>
                <param name="format">PDF</param>
            </result>
        </action> i dont know why it doesnt retrieved the data from the ArrayList?
please help me..Thanks in advance.

Hi,
Looking at the code, it seems you are compiling a JRXML and that is all.
Instead, you should fill it with data and then export the result to PDF.
No wonder you don't see any result.
You need to learn more about how JasperReports work. For a start, I can tell you that you could compile JRXML files as part of the application build process using an Ant task, and not dynamically, like you did. But no matter how you compile the report template, you actually need to fill it with data, using the JasperFillManager and then export it to PDF using the JasperExportManager.
You can see all this in our samples in the /demo/samples folder that is part of our project distribution package. There is even a sample Web application in the /demo/samples/webapp folder.
I hope this helps.
Teodor

Similar Messages

  • Default value for date

    Hi experts,
    I want to set default value for dates..
    My screen has : date_from & date_to.
    date_to : will be current date(today's date) if Eg: 27.08.2007 (here i used NOW())
    then date_from must be 01.06.2007 (3 months logic)
    similarly : if date_to is 01.01.2007
    then date_from must be 01.11.2006
    kindly help...
    Thanks a lot!!!
    Regards,
    Bijal

    Hi Bijal
    (DGET(NOW(),'D'))-1) returns number which is 0 incase of 01.08.2007, so DADD(NOW(),-0,'D') is again ideally same day 01.08.2007 .
    So, DADD(DADD(NOW(),-0,'D'),-2,'M') should give you 01.06.2007.
    <b> IT WORKS!!! -
    I have tested it now.</b>
    Please check and revert.
    The IF formula which sent actually returns String, so use DVAL(IF(DGET(NOW(),'D')!=1,DADD(DADD(NOW(),-((DGET(NOW(),'D'))-1),'D'),-2,'M'),DADD(NOW(),-2,'M')))
    Message was edited by:
            Navneet Giria

  • ORA-01841 Error when value for date col is NULL in .dat (using SQL Loader)

    Hello Gurus,
    I have some data in .dat file which needs to be loaded into oracle table. I am using SQL * Loader to do the job. Although "NULLIF col_name =BLANKS" works for character datatype, but when value for date col is NULL then I get ORA-01841 error. I have to make NULL for all rows withour value for date column
    Early reply will be highly appreciated
    Farooq

    Hi,
    May be this problem is not with the NULLIF. The value for the date column is not in proper date format.
    create table:
    create table kk (empno number, ename varchar2(20), deptno number, hiredate date)
    Control file:
    LOAD DATA
    INFILE 'd:\kk\empdata.dat'
    insert into TABLE kk ( empno position (1:2) integer external,
    ename position(4:5) char NULLIF ename=BLANKS,
    deptno position (7:8) integer external NULLIF deptno=BLANKS,
    hiredate position (10:20) date NULLIF hiredate=BLANKS)
    data file:
    10 KK 01-jan-2005
    20 10
    SELECT * FROM KK;
    EMPNO ENAME DEPTNO HIREDATE
    10 KK 01-JAN-05
    20 10
    Verify the data file.
    Hope it will help

  • How to defined data carrier valued for Linux?

    Hi,
    I am Defining Data Carrier. But I don't understand "Data carrier type" value. Is this PC value data carrier type  for window? So If I want to define value data carrier for Linux. How to defined data carrier valued for Linux?
    Please advise,
    Duypm

    Hi Nikita,
    Refer the below mentioned links for your requirement.
    http://forums.sdn.sap.com/thread.jspa?threadID=412923
    http://forums.sdn.sap.com/thread.jspa?threadID=1639500
    Both have good guidelines on coding as well as configuration part.
    Regards,
    Deepak Kori

  • ADF BC: calling SDO : Value for parameter 'findCriteria' cannot be null

    We have created a service interface from an application module. That service interface contains views that have view criteria. We have included those criteria in our services.
    From my consuming application, i added a data control from webservices by providing the WSDL of the service interface. So far so good...
    When i drop the result of a function that is bound to the view criteria to my page, i have to enter four parameters:
    fincCriteria of the Object type
    areaCode of the String type, this is a parameter we added in the view criteria using a bind variable.
    languageCode of the String type, also a custom parameter of the view criteria
    findControl of the Object type
    In my bindings i can provide the value of areaCode and languaeCode but i don't have a clue what to do with findCriteria and findControl. I left them empty and then i get followign message from the server:
    <SOAPProvider><setParameters> Value for parameter 'findCriteria' cannot be null
    <SOAPProvider><setParameters> Value for parameter 'findControl' cannot be null
    <WebServiceConnectionMessages><debugExecuteFailure> Failed to execute a SAAJ interaction.

    Found some documentation on how to use the service interface from business components and as it appears you can create entity objects based upon the wsdl from the service interface.
    Does it mean that i can only use the service interface that way and that when i have for example a dot net application, it can not use that service interface?

  • Neen help with date range searches for Table Sources

    Hi all,
    I need help, please. I am trying to satisfy a Level 1 client requirement for the ability to search for records in crawled table sources by a date and/or date range. I have performed the following steps, and did not get accurate results from Advanced searching for date. Please help me understand what I am doing wrong, and/or if there is a way to define a date search attribute without creating a LOV for a date column. (My tables have 500,00 rows.)
    I am using SES 10.1.8.3 on Windows 32.
    My Oracle 10g Spatial Table is called REPORTS and this table has the following columns:
    TRACKNUM Varchar2
    TITLE Varchar2
    SUMMARY CLOB
    SYMBOLCODE Varchar2
    Timestamp Date
    OBSDATE Date
    GEOM SDO_GEOMETRY
    I set up the REPORTS table source in SES, using TRACKNUM as the Primary Key (unique and not null), and SUMMARY as the CONTENT Column. In the Table Column Mappings I defined TITLE as String and TITLE.
    Under Global Settings > Search Attributes I defined a new Search Attribute (type Date) called DATE OCCURRED (DD-MON-YY).
    Went back to REPORTS source previously defined and added a new Table Column Mapping - mapping OBSDATE to the newly defined DATE OCCURRED (DD-MON-YY) search attribute.
    I then modified the Schedule for the REPORTS source Crawler Policy to “Process All Documents”.
    Schedule crawls and indexes entire REPORTS table.
    In SES Advanced Search page, I enter my search keyword, select Specific Source Group as REPORTS, select All Match, and used the pick list to select the DATE OCCURRED (DD-MON-YY) Attribute Name, operator of Greater than equal, and entered the Value 01-JAN-07. Then the second attribute name of DATE_OCCURRED (DD-MON-YY), less than equals, 10-JAN-07.
    Search results gave me 38,000 documents, and the first 25 I looked at had dates NOT within the 01-JAN-07 / 10-JAN-07 range. (e.g. OBSDATE= 24-MAR-07, 22-SEP-), 02-FEB-08, etc.)
    And, none of the results I opened had ANY dates within the SUMMARY CLOB…in case that’s what was being found in the search.
    Can someone help me figure out how to allow my client to search for specific dated records in a db table using a single column for the date? This is a major requirement and they are anxiously awaiting my solution.
    Thanks, in advance….

    raford,
    Thanks very much for your reply. However, from what I've read in the SES Admin Document is that (I think) the date format DD/MM/YYYY pertains only to searches on "file system" sources (e.g. Word, Excel, Powerpoint, PDF, etc.). We have 3 file system sources among our 25 total sources. The remaining 22 sources are all TABLE or DATABASE sources. The DBA here has done a great job getting the data standardized using the typical/default Oracle DATE type format in our TABLE sources (DD-MON-YY). Our tables have anywhere from 1500 rows to 2 million rows.
    I tested your theory that the dates we are entering are being changed to Strings behind the scenes and on the Advanced Page, searched for results using OBSDATE equals 01/02/2007 in an attempt to find data that I know for certain to be in the mapped OBSDATE table column as 01-FEB-07. My result set contained data that had an OBSDATE of 03-MAR-07 and none containing 01-FEB-07.
    Here is the big issue...in order for my client to fulfill his primary mission, one of the top 5 requirements is that he/she be able to find specific table rows that are contain a specific date or range of dates.
    thanks very much!

  • Need help with date range searches for Table Sources in SES

    Hi all,
    I need help, please. I am trying to satisfy a Level 1 client requirement for the ability to search for records in crawled table sources by a date and/or date range. I have performed the following steps, and did not get accurate results from Advanced searching for date. Please help me understand what I am doing wrong, and/or if there is a way to define a date search attribute without creating a LOV for a date column. (My tables have 500,00 rows.)
    I am using SES 10.1.8.3 on Windows 32.
    My Oracle 10g Spatial Table is called REPORTS and this table has the following columns:
    TRACKNUM Varchar2
    TITLE Varchar2
    SUMMARY CLOB
    SYMBOLCODE Varchar2
    Timestamp Date
    OBSDATE Date
    GEOM SDO_GEOMETRY
    I set up the REPORTS table source in SES, using TRACKNUM as the Primary Key (unique and not null), and SUMMARY as the CONTENT Column. In the Table Column Mappings I defined TITLE as String and TITLE.
    Under Global Settings > Search Attributes I defined a new Search Attribute (type Date) called DATE OCCURRED (DD-MON-YY).
    Went back to REPORTS source previously defined and added a new Table Column Mapping - mapping OBSDATE to the newly defined DATE OCCURRED (DD-MON-YY) search attribute.
    I then modified the Schedule for the REPORTS source Crawler Policy to “Process All Documents”.
    Schedule crawls and indexes entire REPORTS table.
    In SES Advanced Search page, I enter my search keyword, select Specific Source Group as REPORTS, select All Match, and used the pick list to select the DATE OCCURRED (DD-MON-YY) Attribute Name, operator of Greater than equal, and entered the Value 01-JAN-07. Then the second attribute name of DATE_OCCURRED (DD-MON-YY), less than equals, 10-JAN-07.
    Search results gave me 38,000 documents, and the first 25 I looked at had dates NOT within the 01-JAN-07 / 10-JAN-07 range. (e.g. OBSDATE= 10-MAR-07, 22-SEP-07, 02-FEB-08, etc.)
    And, none of the results I opened had ANY dates within the SUMMARY CLOB…in case that’s what was being found in the search.
    Can someone help me figure out how to allow my client to search for specific dated records in a db table using a single column for the date? This is a major requirement and they are anxiously awaiting my solution.
    Thanks very much, in advance….

    raford,
    Thanks very much for your reply. However, from what I've read in the SES Admin Document is that (I think) the date format DD/MM/YYYY pertains only to searches on "file system" sources (e.g. Word, Excel, Powerpoint, PDF, etc.). We have 3 file system sources among our 25 total sources. The remaining 22 sources are all TABLE or DATABASE sources. The DBA here has done a great job getting the data standardized using the typical/default Oracle DATE type format in our TABLE sources (DD-MON-YY). Our tables have anywhere from 1500 rows to 2 million rows.
    I tested your theory that the dates we are entering are being changed to Strings behind the scenes and on the Advanced Page, searched for results using OBSDATE equals 01/02/2007 in an attempt to find data that I know for certain to be in the mapped OBSDATE table column as 01-FEB-07. My result set contained data that had an OBSDATE of 03-MAR-07 and none containing 01-FEB-07.
    Here is the big issue...in order for my client to fulfill his primary mission, one of the top 5 requirements is that he/she be able to find specific table rows that are contain a specific date or range of dates.
    thanks very much!

  • Dynamic source value for uix frame

    Hi all,
    I have UIX page with two frames, left is for navigation (includes tree) and right one is for content.
    <page xmlns="http://xmlns.oracle.com/uix/controller"
          xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
          xmlns:data="http://xmlns.oracle.com/uix/ui"
          xmlns:http="http://www.w3.org/TR/REC-html40">
      <content>
        <frameBorderLayout xmlns="http://xmlns.oracle.com/uix/ui">
          <left>
            <frame source="Tree.uix" name="tree" width="30%"/>
          </left>
          <center>
            <frame name="contents" data:source="${sessionScope.startPage}"/>
          </center>
        </frameBorderLayout>
      </content>
    </page>I'm trying to use ${sessionScope.startPage} to get source value, but it doesn't work. I am sure that there's such a parameter in http session and I can't understand why this happens.
    Could anyone please say if it's possible to use dynamic source for frame?
    Did anyone meet such problems?
    Is there any other way to set the source value?
    thanx in advance
    Renat

    Hi again,
    So far I've found such a solution:
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:http="http://www.w3.org/TR/REC-html40">
    <content>
    <frameBorderLayout xmlns="http://xmlns.oracle.com/uix/ui">
    <top>
    <frame source="Top.uix" name="top" height="10%"/>
    </top>
    <left>
    <frame source="Tree.uix" name="tree" width="30%"/>
    </left>
    <center>
    <frame name="contents" source="startPage.uix"/>
    </center>
    <bottom>
    <frame source="Bottom.uix" name="bottom" height="10%"/>
    </bottom>
    </frameBorderLayout>
    </content>
    </page>where startPage.uix is:
    <?xml version="1.0" encoding="windows-1251"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    </provider>
    <contents>
    <document>
    <metaContainer>
    <head title=""/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <pageLayout title="">
    <contents>
    </contents>
    <pageHeader>
    <globalHeader/>
    </pageHeader>
    </pageLayout>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <event name="*">
    <method class="myPack.PageUtils.RedirectAction" method="redirect2anotherPage"/>
    </event>
    </handlers>
    </page>and redirect2anotherPage is:
    public static EventResult redirect2anotherPage (BajaContext context, Page page,
    PageEvent event) throws Throwable {
    HttpSession hs = context.getServletRequest().getSession();
    Page otherPage = new Page((String) hs.getAttribute("startPage"));
    return new EventResult(RedirectUtils.getRedirectPage(context,
    otherPage));
    }This seems to be working, but I am not sure if this is the correct solution (lonely solution).
    Is there a way to use only UIX EL syntax?
    Any ideas about this?
    Renat

  • How to raise a exception if the incoming value for a source field is empty

    Dear all,
    I have a scenario where the source and target structures are as follows :
    The output for the above transformation logic is
    The occurrence for field id in source and target is 1:1   Even if i don't provide the input value for id field,
    system is not throwing any runtime exception.But if the field tag id is missing in incoming payload, then
    system throws exception.
    1) *** How can i raise a exception it the value for field id is empty
    2) As the target structure occurrence for field id is 1:1  why system doesn't throw exception for null value
    Regards
    Koti Reddy

    1) *** How can i raise a exception it the value for field id is empty
    You need to impliment the check  to throw the error
    2) As the target structure occurrence for field id is 1:1  why system doesn't throw exception for null value
    You are sending a blank value " " and the same is being passed. if you remove the tag from source xml it'll throw the error
    Message was edited by: Hareesh Gampa

  • Default values for data types

    what are default values for all the data types that exist  in abap
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    For CHAR data type default is SPACE
    for INTEGER,PACK and FLOAT types it is ZERO '0'
    for NUMERIC also so many Zeros
    for Time(TIMS) it is 6 zeros and Date(DATS) it is 8 zeros
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • Passing a value for date parameter from Oracle Forms to BIP

    Hi
    I have created a report with the following SQL query:
    select
    d_tables.d_seq,
    to_date(d_tables.d_created) creation_date,
    d_tables.d_created_by created_by,
    d_tables.d_pk,
    d_tables.table_name,
    d_tables.comments
    from
    d_tables, d_applications
    where
    d_tables.d_ppk = d_applications.d_pk
    and to_date(d_tables.d_created) >= nvl(:P_CRE_DATE_FROM, to_date(d_tables.d_created))
    and to_date(d_tables.d_created) <= nvl(:P_CRE_DATE_TO, to_date(d_tables.d_created))
    The parameters P_CRE_DATE_FROM and P_CRE_DATE_TO have been set up as date in BI Publisher with format dd-MMM-yyyy
    The report works fine when launched in BI Publisher.
    I want to call this report from Oracle Forms and I'm trying to pass the values for both the parameters. However, the report does not generate output based on values passed.
    Does it have to do with datatype? Does anyone know a solution for this?
    Kind regards,
    Aparna

    Thanks for your suggestion. I am already referring to the whitepaper and have integrated Forms with BI Publisher. The parameter passing is working fine for a varchar2 type of parameter. However, for a date type, there seems to be some problem.

  • How to use the same variable value for data entry and the planning sequence

    Hi,
    the scenario is the following:
    Using the WAD template a user enters cost center plan data. The cost center is selected by the chosen value for the variable "V1".
    Afterwards he shall push a button which starts a planning sequence (including saving the data and further functions). This planning sequence uses a filter that also contains the variable "V1".
    What or where has it to be defined that the planning sequence uses automatically the same value for the variable "V1" as selected for the data entry?

    You have to define in the planning function. The planning sequence is only a sequence and it read the planning functions underneath it.
    Ravi Thothadri

  • Set default value for date/time to previous month

    Hi All
    I have two date/time parameters in my report and I want to set the default value for both the parameters
    For start date parameter I want the first date of previous month and for end date parameter I want the last date of previous month.
    Can someone please point me to the right direction
    Thanks
    Rone

    Hi Rone,
    These links can be helpful for you:
    http://www.bidn.com/blogs/hardikabhavsar/bidn-blog/1639/default-date-parameters-in-ssrs
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/584a98ae-bb75-4740-9198-e6be3c1aec12/
    Regards,
    Manoj
    *Happy to help
    http://experiencingmsbi.blogspot.com/

  • How to make default values for date range?

    Dear Colleagues,
    My customer is asking for a default value for a date range prompt.
    The FromDate should contain the 1st of current month, the ToDate should contain current date.
    Does anyone have any idea how I can meet this demand?
    Regards Silje

    Hi Federico,
    Thank you for the answer, we are back to the challenge after summer vacations!
    I have created a variable in the universe: SELECT current date  as TODAY FROM SYSIBM.SYSDUMMY1. I Called it TODAY.
    Then I created a prompt in the query based on Date. In Prompt Properties I tagged for "Set Default Values" and I typed in TODAY.
    When I try to run the query I get the error message:  The date for the query filter based on 'Date' is invalid (WIS10704).
    What is wrong? What do I have to do differently?
    My goal is to have a default for Date that gives me today..
    Regards Silje

  • Getting header data (condition values) for shipment

    For the shipment VI03, the user wants the header Condition values(KWERT) corresponding to condition values(KSCHL).
    Some of the condition type having values in item level but these condition types are not maintained in header level, so they want for these condition types values should be Zero.
    As I am taking condition values for PRICING function module, it will display at sub-item level values depending on condition values.
    Please let me know is there any functiona module or table exist where header data is directly mainatined(Condition values & Condition type).
    Thanks & Best Regards,
    Mahesh

    First find the related salesorder using:
    VBFA
    VBAK-VBELN = VBFA-VBELV
    LIKP-VBELN = VBFA-VBELN
    VBFA-VBTYP_N = 'J'.
    or
    LIPS
    VBAK-VBELN = LIPS-VGBEL
    After that, with the order, get condition number in VBAK and then search KONV.
    VBAK-KNUMV -> KONV-KNUMV.
    Regards.
    Valter Oliveira.

Maybe you are looking for

  • Hide footer in List View web part

    I've created a custom content type for a custom list (News stories.) I can add the custom list to my page as a list view web part and display only the latest article, but it also displays "1-1" at the bottom of the web part. I'm able to cycle through

  • Not able to post depreciation in the new co code

    Hi I am trying to post the Depreciation using AFAB into a newly created Co Code for the first time. But the system throws the below error asking me to post to the last month of the previous year. You can only post in new year after closing the previo

  • White Screen of Death :(

    I am wondering if someone might help me. I have a late 2012 Mac Mini and when booting the Mac with just the mouse, keyboard, display and power all I get is the Mac chime and then a white screen. Nothing else on the screen and no matter what combinati

  • How to configure a printer in solaris 2.6 ?

    Hi, I have a Sun Sparc 5 station running solaris 2.6. Can anyone tell me How to Install an HP LaserJet 4050 N (that uses Network Interface ) with this station? ans thanks a lot.

  • LR3 and printer color is off.

    I have a  Epson CX7800 printer and when I try to print out my picture, the color is off.  My image looks great, but when I try to print, the color's are not the same.  I've gone to my printer settings and set them to no color management and set the d