[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Missing stored procedure parameters in Crystal Report XI

Posted on 2009-04-30
15
Medium Priority
?
762 Views
Last Modified: 2012-05-06
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.
0
Comment
Question by:PhilipR
  • 7
  • 3
  • 3
  • +1
15 Comments
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 24270144
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
0
 

Author Comment

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

Author Comment

by:PhilipR
ID: 24270832
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.
0
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 
LVL 101

Expert Comment

by:mlmcc
ID: 24270922
Possible.

Try to set the data source location

mlmcc
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 24271078
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
0
 

Author Comment

by:PhilipR
ID: 24271383
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.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24272292
Are you sure you are pointing to the right database and SP?

mlmcc
0
 

Author Comment

by:PhilipR
ID: 24272510
Yes, I'm sure I'm pointing to the right database and SP.  I have double and triple checked that.
0
 
LVL 35

Expert Comment

by:James0628
ID: 24276299
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
0
 

Author Comment

by:PhilipR
ID: 24278870
We have already tried that and it did not work.
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 24281355
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
0
 

Author Comment

by:PhilipR
ID: 24281591
I did do the Set Location and, after that, a Verify Database.
0
 
LVL 35

Accepted Solution

by:
James0628 earned 2000 total points
ID: 24284370
You tried my suggestion of making a copy of the procedure and it didn't work, but which part?  Did it pick up all of the parameters when you changed the report to use the copy of the procedure, but not when you changed it back to the original procedure?  Or did it not get them all with the copy either?

 I'm not sure what else to suggest except fairly obvious stuff, like making various changes to the parameters (change the names of the problem parameters, or add another parameter, or remove one of the "good" and/or "bad" parameters) and trying the "verify database" again to see if CR picks up those changes.

 Have you tried doing the "verify database", etc. from a different computer (just on the off chance that there's something weird going on with the computer you've been using)?

 What kind of db connection are you using?  ODBC?  OLE DB?  Maybe you could try switching to a different type of connection and try the "verify database" again.  Just a thought.

 I'm afraid that the report file may just be corrupt and you may just have to recreate the report.

 I don't know if this is relevant, but it is sort of similar.  I once had a report that was reading a table directly, not using a stored procedure (so it's not exactly the same situation), and CR kept deleting one of the parameters.  I had copied&pasted the parameter from another report, so I wouldn't have to enter the default values and other parameter settings (those are copied with the parameter).  That normally works fine, but in this case, CR kept deleting the parameter.  I'd copy the parameter into the report and CR would generally immediately delete it.  Then I'd copy it again and it would stay, until I saved and closed the report.  When I re-opened it, the parameter would be gone again.  It was really weird.  CR didn't delete the references to the parameter (eg. in the record selection).  Just the parameter itself.  So I'd get an error if I tried to run the report.

  What I finally did there was just create the parameter from scratch.  It was fine after that.  I still have no idea why CR was deleting the copy.

 Unfortunately, I don't think that that solution will help you, since you can't create a stored procedure parameter.  CR automatically picks them up (well, usually it does ).

 James
0
 

Author Closing Comment

by:PhilipR
ID: 31576423
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.
0
 
LVL 35

Expert Comment

by:James0628
ID: 24300613
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
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question