Friday, March 9, 2012

Need One Parm/Main/Subreport/SProc

Hi, I've seen threads discussing this issue but have not seen an answer to my own specific question. I'm working on a simple dumb shell of a report in Crystal 8.5 as a test for how to pass parameters into a sql server 2000 stored procedure via a subreport. I'd like to deliver this as straight Crystal without using vb or other shells to call the report from. I am getting multiple requests from Crystal for the same parameter used in the Main, Subreport, and the Stored Procedure, and I would like to enter this once because it's all the same information.

Eventually I need to modify a copy of a main report with data and about 8 subreports, all pulling from stored procedures using one parameter called ID. I am getting many requests for this ID parameter and I think they're coming from the Stored Procedures, as I am linking the parameters to the subreports OK via subreport links.

The subreport wants to link into the stored procedure using the parameter name from the stored procedure, which is @.ID. The main report only wants to give the subreport a subordinate link such as ?Pm-@.ID. I cannot name the stored procedure parameter with a name like ?Pm-@.ID because it violates the rules of transact-sql. It sees the hyphen as a subtraction. I can see the logic of using the same variable names, but how do I get rid of that bothersome hyphen?

I have also tried using shared variables and they connect to the subreport ok, but I'm still not closing the loop by linking into the stored procedure based on the shared variable.

I am trying to use the same information in multiple places without making the user enter the same information over and over again.

Has anyone had this problem before?Hello? Is anybody here?|||Still searching for a solution, if anybody has some experience with this it would surely be helpful.

Thanks,

Bob

No comments:

Post a Comment