SQL Loader Null Value for Date

Dear buddies,
This is how my date column is in my control file.
dtEdu timestamp(6) with local time zone "YYYY-MM-DD HH24:MI:SS"  "nvl (to_date (:dtEdu, 'YYYY-MM-DD HH24:MI:SS'), to_date ('1982-03-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS'))",  The problem is some of the columns in dtEdu has NULL values and I couldn't load them.
So, trying to replace it with something else.
Could someone help me?
Thanks a lot.
Nith

>
The problem is some of the columns in dtEdu has NULL values and I couldn't load them.
>
I don't know how your so called "NULL" values look like, but if the null data is actually made up of blanks, try adding LTRIM() around :dtEdu.

Similar Messages

  • SQL Loader: Null value in column

    Have a tab delimited file, in UNIX
    Some of the inbetween columns have null values
    The records are failing to load with null column values.
    I tried:
    col10 nullif col10 ="(null)"
    My control file is:
    load data
    infile 'abc.txt'
    into table XX_data
    fields terminated by X'09' optionally enclosed by '"'
    TRAILING NULLCOLS
    ( col1,
    col2 nullif col2 ="(null)",
    col3)

    Sample data is tab delimited file. For some reason, it has problem reading the second date (+time) column in the same record when there are null values in preceding columns. It says:
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Col1     Col2     Col3     Col4     Col5     Col6     Col7     Col8     Col9     Col10     Col11     Col12
    2000-01-03 10:38:05.733000000          XX AA Change     0     DOG     CAT     R     2000-01-03 10:38:05.733000000     GIRAFFE          MONKEY     COW

  • Check for null value for Date Field

    Hello everyone,
    I have a database that consist of date field and also a bean that will able to access the db.
    here are my example:-
    private int setDate(int date) {
    this.date = date;
    private void getDate {
    return date;
    later, I entered a date value and wanna check whether the date is on the database or not. SO, do you all have any idea?

    Perhaps before passing your date off to a primitive int, you could pass it to an [Integer] object. Then check to see if that object is null;
    Integer d = new Integer(int value);
    if (d == null) {
    }

  • How do I set a NULL value for the parameter field

    Hi
    I've another question. I'm going to set single values for parameter fields.
    // e.g. set today for StartDate parameter field
    fc.setCurrentValue("", "StartDate", new Date());
    It should be possible to set a NULL value for date parameter fields.
    fc.setCurrentValue("", "StartDate", (Date)null);
    But this do not work. How do I set a NULL value correctly?
    Thank you in advance.
    Best regards,
    Thomas

    First question - is it a stored procedure parameter?
    You can't set a regular parameter field value to a null value.
    There was an issue with old version of the JRC, where it was allowing null to go through, but had unexpected behavior at times.
    Sincerely,
    Ted Ueda

  • 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 can I get null values for the later weeks

    Hi All,
    When I execute this code I get the records till current week.
    How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
    Thanks,
    Vikram
    DECLARE
       v_query VARCHAR2(4000);
       TYPE ref_cursor IS REF CURSOR;
       v_refcur ref_cursor;
       v_sum NUMBER;
       v_id NUMBER;
       v_name VARCHAR2(1000);
       v_weeknum NUMBER;
       v_pernum NUMBER;
       v_numOfWeeks NUMBER := 5;
    BEGIN
    v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                              FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
                          FROM s_postn) postn_tbl
                          WHERE lvl_6_id = 5767
                          AND fiscal_year = 2008
                          AND b.week_num < 4
                          AND b.period_num = 3
                          AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
                          GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                          ORDER BY  postn_tbl.postn_name, b.week_num';
    OPEN v_refcur FOR v_query;
    LOOP
       FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
       EXIT WHEN v_refcur%notfound;
       dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
    END LOOP;
    END;
    This is the output when I execute this code.
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W2 COMM CNTRL TAM 216 12561.4
    P3W3 COMM CNTRL TAM 216 2027.1
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    This is the output I'd like to get
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W4 COMM CNTRL ISAM 213
    P3W5 COMM CNTRL ISAM 213
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W4 COMM CNTRL ISAM 273
    P3W5 COMM CNTRL ISAM 273
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W4 COMM CNTRL TAM 213
    P3W5 COMM CNTRL TAM 213
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W4 COMM CNTRL TAM 273
    P3W5 COMM CNTRL TAM 273
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    P3W4 Damon Walters
    P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PM

    Sure, in a Single SQL ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>-- Start Of Test Data --
    satyaki>with week_tab
      2  as
      3    (
      4      select 1 period_num, 1 week_num, 10 bkg1 from dual
      5      union all
      6      select 1, 2, 40 from dual
      7      union all
      8      select 1, 3, 30 from dual
      9      union all
    10      select 1, 2, 20 from dual
    11      union all
    12      select 1, 1, 10 from dual
    13      union all
    14      select 1, 1, 20 from dual
    15      union all
    16      select 1, 3, 10 from dual
    17      union all
    18      select 2, 1, 15 from dual
    19      union all
    20      select 2, 2, 20 from dual
    21      union all
    22      select 2, 3, 10 from dual
    23      union all
    24      select 2, 1, 15 from dual
    25      union all
    26      select 2, 2, 30 from dual
    27      union all
    28      select 2, 3, 20 from dual
    29    )
    30  -- End Of Test Data --
    31  select period_num,
    32         week_num,
    33         (
    34            select sum(week_tab.bkg1)
    35            from week_tab
    36            where period_num = m.period_num
    37            and   week_num   = m.week_num
    38            group by week_num, period_num
    39         ) sum_bkg1
    40  from (
    41        select dum.week_num,
    42              wk.period_num
    43        from (
    44                select 1 week_num from dual
    45                union all
    46                select 2 from dual
    47                union all
    48                select 3 from dual
    49                union all
    50                select 4 from dual
    51                union all
    52                select 5 from dual
    53              ) dum ,
    54              (
    55                select distinct period_num
    56                from week_tab
    57          ) wk
    58      ) m;
    PERIOD_NUM   WEEK_NUM   SUM_BKG1
             1          1         40
             1          2         60
             1          3         40
             1          4
             1          5
             2          1         30
             2          2         50
             2          3         30
             2          4
             2          5
    10 rows selected.
    Elapsed: 00:00:00.48
    satyaki>Regards.
    Satyaki De.

  • The output of sql loader displays '?' for the chinese character

    I'm run the sql loader to import the data. The following is the ctl script:
    LOAD DATA
    CHARACTERSET ZHS16CGB231280
    APPEND
    INTO TABLE xxabc_gti_feedback
    when (5:6) ='~~' and (8:9)='~~'
    FIELDS TERMINATED BY "~~"
    TRAILING NULLCOLS
    absoluted
    ,exist_lists
    ,invoice_type
    ,invoice_category_code
    ,invoice_number
    ,line_count
    ,invoice_date DATE "YYYYMMDD"
    ,invoice_month
    ,trx_number
    ,amount_without_tax
    ,tax_rate
    ,tax_amount
    ,gti_feedback_id "xxban_gti_feedback_s.nextval"
    ,creation_date sysdate
    ,last_update_date sysdate
    EBS version: R12(12.0.4)
    The characterset of database is UTF-8
    The file characterset is GB2312
    The following is the example of data file.
    SJJK0201~~已开发票传出
    39~~20110413~~20110413
    //发票1
    0~~0~~0~~325676740~~11085979~~3~~20110413~~04~~~~3336.71~~0.17~~567.24~~珠海XX机电设备有限公司~~440407897878~~珠海市香洲区XXX 0756-3666666~~建行前山支行777777~~XX电子(苏州)有限公司~~32170078678890~~苏州工业园区 6267565~~中国银行园区支行25456672~~1653\n31263\n67126~~XXX~~XXX~~XXX
    0~~aaa~~P83782~~个~~2~~6854.70~~0.17~~1165.30~~4010~~1~~1601
    1~~bbb~~~~~~~~-4065.00~~0.17~~-691.05~~~~1~~1601
    0~~ccc~~P80792~~个~~4~~547.01~~0.17~~92.99~~160~~1~~1601
    I create a sql*loader concurrent program to load the data. the data can be loaded into the table successfully(The chinese customer name is correct). Only for the aborted lines, it will be listed in the outtput of the concurrent request, but out of my expect, the chinese characters in the output are displayed as '?'.
    How to solve the issue? Thanks.
    Edited by: 852938 on 2011-4-17 下午10:41

    like the following:
    SJJK0201~~??????????
    39~~20110413~~20110413
    //???1
    0~~aaa~~P83782~~??~~2~~6854.70~~0.17~~1165.30~~4010~~1~~1601
    1~~bbb~~~~~~~~-4065.00~~0.17~~-691.05~~~~1~~1601
    0~~ccc~~P80792~~??~~4~~547.01~~0.17~~92.99~~160~~1~~1601
    You can find that any chinese characters are became '?'. The loaded line(Line 4th) is not listed in the output.
    Thanks for your quick answer! :)

  • Pro*C & SQLDA with NULL value for predicate column

    Hi: I am using a C program to update a table via a dynamic sql (method 4) and SQLDA. In the update statement predicate, I have place holders (as in TBLCOL=:C000). One of the columns in the predicate contains null values, so I set L[n] = 0, V[n] = pData (which pData[0] = '\0'), *(I[n]) = -1, and T[n] = 5 (for text). I cannot find the row that I know is there.
    I cannot change my statement to contain TBLCOL IS NULL, since I don't know ahead of time if I'm looking for rows with null values for this column. The Pro*C manual says that by setting the appropriate *(I[n]) = -1, it indicates to Oracle to simulate the "IS NULL" clause, and update the appropriate rows. In my case, I receive 1403 as SQLCODE when I use TBLCOL=:C000 vs TBLCOL IS NULL. What am I doing wrong? Thank you for your help.

    You should include these columns as well;
    ChangeType (see mxi_changetype)
    ValOwner (repository)
    UserID ("jobid=<>", usermskey, GUI (mmc), DG (dyngrp), reconcile)
    IdAudit  (This is the event task (add and del member for assignments)
    ParentAuditId (AuditID of parent which last updated the attribute, not consistent)
    ChangedBy (Holds the MSKEY of the user which last changed the attribute)
    ExpiryTime
    to make sure you get a fuller picture of the audit record.
    Your selection does not cover all events and descriptions
    br,
    Chris

  • Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc

    Hi,
    Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc.
    Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?
    12.1.4 / 11g db
    Appreciate your inputs.
    Thanks,
    K

    Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc. It should work.
    Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, What is the issue you have with R12?
    an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?What was Oracle feedback? Did they say it is certified and can be used?
    Thanks,
    Hussein

  • 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

  • Sql loader error in offline data load

    Hi,
    I have done an offline schema creation using existing tablespace.
    I am trying to do an offline data load using sql loader.The CTL and DAT file are generated by the work bench.
    This is my CTL file code generated by workbench.
    load data
    infile 'Import.dat' "str '<EORD>'"
    into table IMPORT
    fields terminated by '<EOFD>'
    trailing nullcols
    When I am running the ctl file with DAT file in sql loader I am getting the following error
    SQL*Loader-350: Syntax error at line 4.
    Expecting single char, found "<EOFD>".
    fields terminated by '<EOFD>'
    ^
    My Sql Loader version is Release 8.0.6.3.0
    Please help if anyone has came across this issue.
    Thanks in advance.
    Regards
    Saravanan.B

    Saravanan,
    Its a long time since I have seen 8 sql loader. Check the doc. Is it resrticted to a single character delimter??
    Barry

  • Validations: Null value for LOVs

    See http://htmldb.oracle.com/pls/otn/f?p=24317:239
    I have a "Item is not null" validation on that LOV item. The item has "Display null value" set to Yes and a LOV of STATIC2:1,2,3
    If I leave the Null return value for the item to blank, the engine defaults it to %null% and the validation "knows" that this is really the same as a null value and so it kicks in (good).
    But if I change the Null return value to something like %, the validation doesn't complain, it thinks that this is a not-null value.
    Why the inconsistency? Does this mean that we are expected to use the default value of the Null return value i.e. leave it blank and let the engine put in %null%?
    Comments? Thanks

    Vikas - The declarative not null validation types recognize "actual" null or %null% as null values. This equivalence holds in numerous other situtations during page processing. Why does %null% get special treatment? A convention was chosen and that's it. And it works for almost everybody in almost all situations. In other words, it's useful, if not perfect. If you want a different value, you can specify one in the LOV (as you described). Then you can recognize and convert these values to null or %null% in an after-submit computation so that validations and other mechanisms work normally. (Perhaps it would help if the Builder created such a computation for items having LOVs with specified null values.) One use case for using a specified null return value might be where you want to distinguish a POSTed "actual" null value from the selected "null" value for which you have specified a null return value. Then you can tell if the value was selected from the LOV or whether it got a null value from the item's cache or source methods.
    Scott

  • CFQUERY results return a null value for a varchar(MAX) field in SQL

    I'm using ColdFusion 9 and SQL Server 2008.
    One the fields in a table is defined as a varchar(MAX). Other fields in the table are ints, varchar(8000) varchar(256), etc.
    When doing a query for records in the table and displaying the results using the cfdump tag, I see values in all fields in a row EXCEPT for the data in the varchar(MAX) field. The varchar(MAX) field shows a null value.  Yet, I can verify through the SQL interface or through Microsoft Access querying the database that the varchar(MAX) fields have data.
    How can I retrieve data from this field type?
    Thanks in advance for your help.

    I'm wrong. I AM getting query results, but not what I expect. I had maxrows set as a variable in my original query, so when it returned 5 rows, the first row always showed as [empty string]. I've tried numerous queries now (where UID >100, where UID >200, where UID> 300, etc.) When I use <CFDUMP> to return the query, the first records always shows empty strings.
    Here's an example of some records retrieved from this simple query:
    <CFQUERY NAME="BuildBack" DATASOURCE="STORBASE">
    SELECT *
    FROM CallUnit
    WHERE CCU_ID>172
    </CFQUERY>
    Any ideas?
    173
    P
    tuse
    322
    340
    174
    E
    323
    340
    175
    P
    tuses.
    324
    341
    176
    E
    325
    341
    177
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_MetaData.Priority = SupC
    326
    342
    178
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_MetaData.Priority = SupCa
    327
    343
    179
    E
    328
    344
    180
    E
    329
    345
    181
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_MetaData.Priority = SupCall_
    330
    346
    182
    P
    331
    347
    183
    E
    332
    348
    184
    P
    333
    349
    185
    P
    tuses.SCStat_ID)
    334
    350
    186
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_MetaData.Priority = SupCall_Prior
    335
    352
    187
    E
    336
    353
    188
    P
    337
    354
    189
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_MetaData.Priority = SupCall_Priorities.SCPriority_ID) LEFT JOIN SupCall_CommTypes ON SupCall_MetaData.CommunicationType = SupCall_CommTypes.SCComm_ID) INNER JOIN SupCall_CallStages ON SupCall_
    338
    355
    190
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_MetaData.Priority = SupCall_Priorities.SCPriority_ID) LEFT JOIN SupCall_CommTypes ON SupCall_MetaData.CommunicationType = SupCall_CommTypes.SCComm_ID) INNER JOIN SupCall_CallStages ON SupCall_M
    339
    356
    191
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_
    340
    357
    192
    P
    tuses.SCStat_ID) á àh\  (9~ Hbb l_Products ON SupCall_MetaData.Product = SupCall_Products.SCPL_ID) LEFT JOIN SupCall_Priorities ON SupCall_MetaData.Priority = SupCall_Priorities.SCPriority_ID) LEFT JOIN SupCall_CommTypes ON SupCall_MetaData.CommunicationType = SupCall_CommTypes.SCComm_ID) INNER JOIN SupCall_CallSta
    341
    358
    193
    P
    tuses.SCStat_ID) á àh\

  • Grouping to display null values for all the missing dates

    Hi SAP,
    I am trying to display '0.00' value for all the missing dates in my crystal reports as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14       0.00
    20-Jan-14     80.00
    However, my crystal report is showing as follows:
    17-Jan-14     40.00
    18-Jan-14       0.00
    19-Jan-14
    20-Jan-14     80.00
    The missing dates with no data are group together and my '0.00' value is not. Kindly advise me the solution. The formula is shown as per attached.
    Thank you.
    Regards.

    Hi,
    Thanks for your reply.
    Fyi, I am using a formula field in crystal report to display "0.00" for days in between as follows:
    whileprintingrecords;
    if Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy') = "" then "" else "0.00"
    There is another formula field in crystal report to display the missing dates in between as follows:
    whileprintingrecords;
    Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy')
    Below is my report custom functions:
    Function Days_Between (datefield as datetime, nextdatefield as datetime, format as string)
    ' This function is only used to display what data is missing within a specified date range...output type is text
    dim thisdate as date
    dim nextdate as date
    dim output as string 'output is the text display
    dim daysbetween as number
    dim looptimes as number
    looptimes = 0
    daysbetween = 0
    output = ""
    thisdate = datevalue(datefield) + 1
    nextdate = datevalue(nextdatefield)
    if nextdate - thisdate > 1 then daysbetween = nextdate - thisdate else daysbetween = 1
    do
    if nextdate - thisdate > 1 _
    then output = output + totext(thisdate, format) + chr(10) _
    else _
    if nextdate - thisdate > 0 _
    then output = output + totext(thisdate, format)
    looptimes = looptimes + 1
    thisdate = thisdate + 1
    loop until looptimes = daysbetween
        Days_Between = output
    End Function
    The issue arise when when there is more than one missing dates in between but the null values ("0.00") displayed is only for the first missing dates and not for all the missing dates.
    Regards,
    Ting Wei 

  • 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

Maybe you are looking for

  • Offline Interactive Form Upload for creating Business Transaction

    Hi All, I am using CRM Web Request for creating Business Transaction through Offline Interactive Adobe Form. For that i have done PDF upload coding and then converting the PDF form to XML format. Now the XML format of form is converted to string from

  • LiveCycle Form used on an iPad/Distribution Issues. PLEASE HELP!

    I am a young designer with a complicated problem. I have virtually no experience building interactive forms and I have a client that wants to do the following: -Take a form and fill out some of it on a pc -Then send it to an iPad, use the app SignMyi

  • LSMW for transaction FBE1

    Hi all, Can anyone help?  I need to create Payment Advices (txn FBE1) from an Excel Spreadsheet.  I cannot see any relevant object in LSMW to do this with, and so would like to create my own BDC program that I can hook into LSMW to make it easy to us

  • I-tunes for windows, playlists only play one song

    I've got a bunch of playlists and for some of them they work fine. But for some when I double click to play a song, it only plays that song. It never advances to the next song. Thanks for the help, Peter

  • Purchase Order  IDoc

    Hin all, can any body help me in IDOCs where can i find the standard  Purchase order  IDOC plase help me thanks