Jump to content
Changes to the Jaspersoft community edition download ×

ireport query problem


ktrinad

Recommended Posts

By: Sohan Kasula - skasula

ireport query problem

2003-03-31 09:16

I am trying to create a report with sub report using ireport-0.0.8 and I am using the following query

 

select to_number(null) sn_apd,

null PERMIT_TYPE,

upper (a.description) department,

upper (b.description) bureau,

upper (c.description) region_name,

upper (d.description) org_cd

from tims_generic_codes a, tims_generic_codes b, tims_generic_codes c, tims_generic_codes d

where a.identifier = 'DEPT_TITLE'

and b.identifier = 'BUREAU_TITLE'

and c.identifier = 'REGION_TITLE'

and d.identifier = 'REGION_CODE'

UNION

Select sn_apd ,

PERMIT_TYPE,

null department,

null bureau,

null region_name,

null org_cd

from e_apds

where sn_apd = $P{PSNAPD}

 

Query is not returning data for both the SQL's even though there is an UNION. It's returning data for only the second query. I know there is data returned by both the qureies tested the query in sqlplus. I am using "oracle.jdbc.driver.OracleDriver" driver. If I don't use a union statement and use only one query then I get the data for that query. Looks like UNION statement is not supported. I have to use a lot of complicated sql statements and am in the beginnings stages of using iReport.

Any help is appreciated.

 

thanks,

Sohan

 

 

 

 

 

 

By: Sohan Kasula - skasula

RE: ireport query problem

2003-03-31 11:44

The value shows for the fields of the second query if the evaluation time of the element property is set to "Report" or "Column" instead of default "Now".

Could anyone explain the behaviour?

 

thanks

 

 

 

 

By: Giulio Toffoli - gt78

RE: ireport query problem

2003-03-31 14:27

in theory there is not problems using UNION, but I don't have never tried a union.

 

A test (or workaround) could be fill a custom datasource and see what's happen passing this datasource to the report.

There is some custom datasource implementation examples in the forum. Try to search for it.

 

Giulio

Link to comment
Share on other sites

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