Link to home
Start Free TrialLog in
Avatar of PhilipR
PhilipRFlag for United States of America

asked on

Missing stored procedure parameters in Crystal Report XI

Two parameters were added to a stored procedure (data source for the report). The parameters will not appear in the Crystal Report Parameter Fields (Field Explorer). When we pass the parameters programatically from Visual Studio 2005, we get an error that the parameters are incorrect. We have tried verifying the database and cannot get the parameters to show up.
Avatar of Kurt Reinhardt
Kurt Reinhardt
Flag of United States of America image

Go to File|Report Options and check the box for "Verify Stored Proedures on First Refresh" and then try to refresh the report.  See if that helps.

~Kurt
Avatar of PhilipR

ASKER

Tried your suggestion and it did not work. I have attached a file with a screenshot of the error.
Error-Message.doc
Avatar of PhilipR

ASKER

I tried creating a NEW report with the same stored procedure and it prompts me for ALL the parameters. It is as if the original report is somehow corrupted.
Avatar of Mike McCracken
Mike McCracken

Possible.

Try to set the data source location

mlmcc
Yup - that's the next thing to try. Setting the location from the stored procedure back to the same stored procedure will most likely force it to be recognized.

~Kurt
Avatar of PhilipR

ASKER

I tried it and still do not see the parameters. When I verify the database, it prompts me for the original 3 parameters and when I enter a value and press ENTER, it returns the same error attached before.
Are you sure you are pointing to the right database and SP?

mlmcc
Avatar of PhilipR

ASKER

Yes, I'm sure I'm pointing to the right database and SP.  I have double and triple checked that.
Try creating a copy of the procedure under another name and changing the report to the new procedure.  If it picks up the new parameters, try changing it back to the old procedure and see if the new parameters are still there.

 I honestly have no idea if this will help.  It's just the next thing I would try in this situation.

 James
Avatar of PhilipR

ASKER

We have already tried that and it did not work.
You replied to our suggestion to set the location by stating you already tried verifying the database.  That's not the same thing.  Set Location and Verify database are separate functions.  Set Location is designed to let you change the entire data source from one to another (imagine data warehouse tables that are identical, but for different spans of time - why write the report twice - just re-point to a a different table).  In this case, you need to Database|Set Location make sure you highlight the current location, then drill down and select the exact same proc name as the new location.

~Kurt
Avatar of PhilipR

ASKER

I did do the Set Location and, after that, a Verify Database.
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PhilipR

ASKER

Thanks, James.  I tried everything else, but I think you were right that the report was just corrupt.  Once I recreated the report, everything worked.
Sorry there wasn't a better solution.

 FWIW, I don't think my post is really any more of a solution than any of the others.  The "solution" here was apparently that your report was corrupt and you just had to recreate it.  You were the one that first suggested that maybe the report was corrupt, and mlmcc said that that was possible, so, if nothing else, I wasn't the first to bring up that possibility.

 If you're going to award points for that, they should probably go to mlmcc.  If you just want to award points to the people that tried to help, they should probably be split between all of us.

 Just my opinion.

 James