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

How can I get an output parameter in SQL Server passed to Crystal...

Status
Not open for further replies.

SteveMe

MIS
Aug 30, 2002
83
US
Enterprise please advise? Thanks

Steve
 
Rather than specifying architecture, why not describe the environment and requirements for the report?

I doubt that Crystal supports what you intend, but one can only guess since you post less than a sentence to describe requirements, not even your software version.

You might use a controlling application to take the output parameter and pass it to Crystal as a data source, again, hard to guess...

-k
 
CE 11.

We are looking to add the server name, database name and sproc name to every report. Each stored procedure would need the following 2 lines of coding.


SQL Server 2000

Stored Procedure

Parameter would be inside the sproc

DECLARE @v_ServerDBSp varchar(200) OUTPUT
SET @v_ServerDBSp = 'Server: ' + UPPER(@@ServerName) + ' -- DB: ' + UPPER(db_name()) + ' -- SP: ' + UPPER('srpt_mysproc')

Can't use a select statement to add onto it would crush bandwidth.
 
So how does Crystal get it's data?

Again, you are specifying architecture without understanding how Crystal works, nor describing what you need.

Crystal expects a single data source per report.

And the above would NOT crush bandwidth unless it's improperly designed.

So one common method would be to create a standard subreport which gets inserted into every report (build out a generic template which already has it in there), and just use the SQL in an add command rather than bothering with a sproc, it's not going to be any faster using a sproc for this sort of SQL. But a sproc will work.

You can also include it in your data being returned (which could crush performance), or create a SQL Expression, but either will cause it to be returned multiple times.

It's not database intensive, so just create the subreport, it also will promote reusability.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top