Jump to content
Changes to the Jaspersoft community edition download ×

Print when expression and changes in query


rajuchacha007

Recommended Posts

Experts,

I am generating a report using a query in following way.

ID        Step Name     Run Time       Status                   Error Message

3045   ABC                 00:00:01         SUCCESS            null (i am keeping blank in actual report. This is just to understanding.)

3046   PQR                00:00:02          SUCCESS           null

3047   XYZ                 00:00:02           FAIL                      error in initialization

3048   DEF                00:00:03           FAIL                      error in file copying

3049   IJK                  00:00:03          SUCCESS            null.

 

I wish to display in following way.

ID        Step Name     Run Time       Status                  Error Message

3045   ABC                 00:00:01         SUCCESS            N/A

3046   PQR                00:00:02          SUCCESS           N/A

3047   XYZ                 00:00:02           FAIL                      error in initialization

3048   DEF                00:00:03           FAIL                      error in file copying

3049   IJK                  00:00:03          SUCCESS            N/A

 

Do I need to change my query for this or shall i write expression/code in print when expression? in simple way, the logic is

the logic should be: if STATUS = 'SUCCESS' then ERROR = 'n/a' ELSE ERROR = error_message.

What do i need to do? my query is,

 

select file.ID,file.stepName,file.RunTime,file.Status,file.Erro_code from file.

Thank you in advance.

Best regards.

 



Post Edited by rajuchacha007 at 08/04/2010 07:46
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...