Jump to content

Combining datasets


Recommended Posts

By: jniemann42 - jniemann42

Combining datasets

2006-05-18 11:51

I'm trying to combine two datasources in one report and am having trouble doing it. Basically what I do is get the SQL to run a report against an Oracle database and get my data (which I put into a JRDataSource). Then I get an array of "keys" and pull the query from the subreport, and insert those keys into the query, then run the query and get another JRDataSource. I then pass that into the main report as a parameter, then to the subreport as a datasource parameter.

 

My problem is that my main report iterates for one row, and during that iteration the subreport dumps all of its data (I only want one row), then the main report continues iterating until it is done. Is there any way to make this work? I can post more detail if it's needed (I don't know how well I explained what's going on).

 

The picture below may explain, d is normal data column and s is the sub column. Below is what happens:

 

d s d d

 

x x x x

x

x

x

x x x

x x x

x x x

 

This is what I want to happen:

 

d s d d

 

x x x x

x x x x

x x x x

x x x x

 

Thanks in advance for any help

 

 

 

 

 

By: jniemann42 - jniemann42

RE: Combining datasets

2006-05-18 11:54

Addendum...whitespace trimming messed this up...here is what it looks like now:

 

d s d d

 

x x x x

- x - -

- x - -

- x - -

x - x x

x x x

x x x

 

This is what I want to happen:

 

d s d d

 

x x x x

x x x x

x x x x

x x x x

 

x == data, - == white space

 

 

 

 

By: jniemann42 - jniemann42

RE: Combining datasets

2006-05-18 11:55

Addendum...whitespace trimming messed this up...here is what it looks like now:

 

d s d d

 

x x x x

- x - -

- x - -

- x - -

x - x x

 

This is what I want to happen:

 

d s d d

 

x x x x

x x x x

x x x x

x x x x

 

x == data, - == white space

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