0
votes

I created a Report using BIRT Report Design in Eclipse Java EE IDE(Juno Release). In that Report, For the single row it have multiple values for the corresponding one column(I used LISTAGG() oracle function to map that).

(i.e.) Result column have multiple values in the below database table output :

No    Name    Result     Mark 
-----------------------------------
1     John          X                  32
               XX
              XXX
2     Joe            X                   56

              XX
              XX

              XXX
3    Andrew                          34

             XXX
             XX

             XXXX

… It have both NULL and NOT NULL values in it.

"If the NULL values are in the middle means its showing the results properly in the Report"

Sample Result am getting in Report output for Joe (.pdf form)

No    Name    Result     Mark 
-----------------------------------
2     Joe            X                   56

              XX
              XX

              XXX

Here the problem is, “If First record has a NULL means it is not showing properly in the Report, instead of that NOT NULL value will print in the front and so on…”

Sample Result am getting in Report output for Andrew (.pdf form)

No    Name    Result     Mark 
-----------------------------------
3    Andrew      XXX            34
                 XX

                XXXX

But we have TWO NULL values present in the Front of Result column for Andrew (As you see sample oracle table output above)…

Is there any option to show blank in the first row(if it is a null) for the particular row in the birt report tool ?

Kindly Help me to Solve this issue… Thank you!

1
Kindly Help me to Solve this issue!!! Thanks and Regards, Sathish.Sathish

1 Answers

1
votes

While I did not try to understand exactly what your issue is, in general when null values in the data are causing problems with a BIRT report. Use one of these two solutions.

  1. Use the data base function to convert the NULL to something else. In SQL I use the command ISNULL

  2. Use a computed column in the BIRT 'Data Set' to create a new column, write whatever you need in JS. In the example below I need to make a decision on a date field that is sometimes null, in comparison to an input parameter.

    if (row["START_TIME"] == null){ "F" } else if (row["END_TIME"] == null){ "T" }else if (row["START_TIME"].getTime() >= params["WeekOf"].getTime() ){ "T" }else if(row["END_TIME"].getTime() <= params["WeekOf"].getTime() ){ "F" }else if(row["END_TIME"].getTime() >= params["WeekOf"].getTime() ){ "T" }else{ "F"}