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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use two stored procedures in same report

Status
Not open for further replies.

ldejesuspr

Programmer
Jul 29, 2004
27
PR
Can I use two different SPs in the same
report? When I tried to add fields from
the second sp i get an error.

thanks
 
Which Crystal? In 8.5, I found that when I used a Stored procedure, it wouldn't allow the database to also be accessesed. I got round this by
a) Including a lot of the data in my storred procedures
b) Using subreports in detail lines to get the database stuff - horriby inefficient, but it got the job done.

Madawc Williams (East Anglia)
 
I have version 9.

What work around could i do? I would prefer to have everything in the same SP the thing is that I have not find an efficient way to build it.

The report list an employee with its dependants and also its beneficiaries for life insurance.

There are three tables employees, dependants and beneficiariesInsurance.

The thing is that when i combined the three tables the records are multiplicated. employee is in a one to many relationship with the other two tables

 
Instead of using Stored Procedures, build SQL Commands within Crystal. You can probably cut and paste the code from the proc directoy into the editor.

Each Command can be treated as a table and, therefore, joined together.


~Kurt
 
I have never build SQL in CR, where do I do that?

thanks Kurt
 
You need to use the Database Expert:

Database|Database Expert|Create New Connection|<Your Database Connectivity Method,typically ODBC(RDO)>|Add Command (double-click)

I recommend that you search for SQL Commands in your Help File.


~Kurt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top