By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

Crystal Reports - Multiple datsets as the datasource

P: n/a
I am using Crystal Enterprise V9. I have a report that needs to have
multiple datasets as the datasource(s) on a single subreport (some
common lookup data I need to join to is stored in a seperate dataset).
The report is working fine with a single dataset as a datasource, but I
cannot seem to find any examples of multiple datasets as a datasource.
Is this possible?

ReportDocument.SetDatasource() seems to only take a single dataset, and
I cannot figure out how to add more at runtime.

Thanks,
Lee

Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Lee,

I don't think it's possible to report off two different datasets. In first
place, you design it against only one XSD schema, right? And then is the
fact that SetDataSource() takes only one parameter.

¿Can't you copy the needed tables from the 2nd dataset to the first?

Regards - Octavio

<le**********@hotmail.com> escribió en el mensaje
news:11*********************@o13g2000cwo.googlegro ups.com...
I am using Crystal Enterprise V9. I have a report that needs to have
multiple datasets as the datasource(s) on a single subreport (some
common lookup data I need to join to is stored in a seperate dataset).
The report is working fine with a single dataset as a datasource, but I
cannot seem to find any examples of multiple datasets as a datasource.
Is this possible?

ReportDocument.SetDatasource() seems to only take a single dataset, and
I cannot figure out how to add more at runtime.

Thanks,
Lee

Nov 17 '05 #2

P: n/a
Octavio-
I guess that's where I was getting confused. I have multiple
typed-datasets in my project, and crystal was more than happy to let me
use multiple typed-datasets at design time, but a run-time when it came
time to actually give the report datasources for those multiple
datasets, I couldn't figure out how to do it.

I think what I'll end up doing is making one huge dataset that combines
the schemas of all my seperate datasets and use that "super" dataset as
the datasource for my report. I was hoping to avoid this, however,
because it is extra code, extra datasets, and causes me to have data in
memory twice while creating the report...

Thanks for your help,
Lee

Nov 17 '05 #3

P: n/a
Lee,
... and crystal was more than happy to let me use multiple typed-datasets
at design time...
Now I see what you mean! Indeed, Crystal happily allows you to join data
from different data sets...
I remember Crystal always allowed (since version 6 or even before, if memory
doesn't betray me) the so-called heterogeneous joins, so that you could be
able to make a report joining (in the local memory of the client, of
course!) data coming from an Oracle table and an SQL Server table.
Obviously, this is what is happening here.
The problem is, how can we specify the multiple data sources at runtime? I
guess this is not supported anyway.
One potential idea you might like to try is to insert two "dummy" subreports
into the main report, each one using a different data set... At runtime, use
SetDataSource() on each subreport . I don't think it will work.
I think what I'll end up doing is making one huge dataset that combines
the schemas of all my seperate datasets and use that "super" dataset as
the datasource for my report. I was hoping to avoid this, however,
because it is extra code, extra datasets, and causes me to have data in
memory twice while creating the report...
After all, maybe it's the best solution. If you were able to specify both
datasets as datasources to the report,
Crystal would end up LOADING BOTH DATASETS INTO HIS OWN MEMORY in order to
do the joins, etc.

Regards - Octavio

<le**********@hotmail.com> escribió en el mensaje
news:11*********************@g47g2000cwa.googlegro ups.com... Octavio-
I guess that's where I was getting confused. I have multiple
typed-datasets in my project, and crystal was more than happy to let me
use multiple typed-datasets at design time, but a run-time when it came
time to actually give the report datasources for those multiple
datasets, I couldn't figure out how to do it.

I think what I'll end up doing is making one huge dataset that combines
the schemas of all my seperate datasets and use that "super" dataset as
the datasource for my report. I was hoping to avoid this, however,
because it is extra code, extra datasets, and causes me to have data in
memory twice while creating the report...

Thanks for your help,
Lee

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.