Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying and Pasteing Subreports

Status
Not open for further replies.

lgmin

Programmer
May 20, 2005
71
0
0
US
I am using Crystal XI. I have a report that pulls from 8 different data sources, and the data sources are identical except for the fact they are for different states. I created a report with a subreport that displays all the information I want in my report, and since all the databases are identical with the same field names and all, is there a way to copy and paste the subreport numerous times and then just change the database source?

Thanks much.

lgmin
 
Why would you change the datasource if as you said previously the datasource are identical except for different states?

Of course the term states can mean different things, you should try to post technical information using real technical terms.

Database/connectivity used
Example data
Expected output

You can use an Add Command and paste in a parameter which the user coudl supply to provide connectivity information, this depends on other factors though, such as the above.

If you ask about data sources, it stands to reason that you should include the type and the connectivity used.

-k
 
There are 8 different ACCESS databases, and they would like summary data pulled in from each database into one report. So I have created 8 ODBC connections, one for each database. I have created a subreport that pulls in the data from one of the databases, then I created a second subreport that is identical to the first except for the datasource connects to one of the other databases, so all I need is 6 more for the remaining databases. I was just looking for a quick way to duplicate the subreport and change the datasource instead of having to create each one manually. Is there a way to do this?

I can't use a parameter because the report will have data from all of the databases.

Example data and outcome is irrevelant since there is no questions regarding the data or outcome.

Thanks

lgmin
 
Simplify your life.

Create a link to the other databsaes within ONE Access database, and then create a Union query which combines them all into ONE datasource, and then you can use parameters or grouping to break out the data as if there were subreports. Your method is slower and more complicated. An example is:

select 'databasea' source, field1, field2 from DatabaseATable
union all
select 'databaseb' source, field1, field2 from DatabaseBTable
etc.

Then group on the source field within Crystal.

Access is faster, and you'll have a reusable data soruce.

-k
 
I'll give that a try. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top