Jump to content
JasperReports Library 7.0 is now available ×

hussainian

Recommended Posts

Hi!
I'm in a situation where I need some database fields which are not possible to get in the main query.

I throught that the datasets will solve my problem. But i just read that a dataset can only be used in a chart or a crosstab. Is it so? What is the alternative?

My problem is like

I have a report showing some columns (col1, col2) from a table and company name (companyName) from another table.

My query is

select A.col1, A.col2, B.companyName from TableA A, TableB B where ........

The problem is that in a scenario, where there are no rows returned from tableA, companyName field in the report is also null. I want that whether there are rows returned from a tableA or not, my company name must be displayed.

I guess I made my problem clear. Please give some suggestions.

Thanks & Best Regards.

AsadULLAH.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 4 weeks later...

hussainian
Wrote:

My query is

select A.col1, A.col2, B.companyName from TableA A, TableB B where ........

The problem is that in a scenario, where there are no rows returned from tableA, companyName field in the report is also null. I want that whether there are rows returned from a tableA or not, my company name must be displayed.

Wouldn't an outer join work?

Regards,

Lucian

Link to comment
Share on other sites

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...