Solved

Crystal Reports- Hide Stored Procedure Parameter

Posted on 2010-09-01
9
993 Views
Last Modified: 2012-05-10
Can we hide a stored procedure parameter? I am using a stored procedure for multiple reports. Some parameters are not necessary for some reports. I don't wan't to prompt the user for unecessary parameters. Set to Null option is there at the prompt but that is not the option I am looking for. I want to disable the parameter.
0
Comment
Question by:Shamanth
  • 4
  • 3
  • 2
9 Comments
 
LVL 26

Assisted Solution

by:Kurt Reinhardt
Kurt Reinhardt earned 150 total points
ID: 33583640
Sorry, but you can't hide it unless you run the report through some sort of custom front end.

~Kurt
0
 
LVL 34

Accepted Solution

by:
James0628 earned 350 total points
ID: 33583791
I know of 2 ways to handle this, a shell report or a shell procedure.

 Shell report:

 Create a new report and make your current report a subreport inside that report.  The subreport would have all of the stored procedure's parameters.  The shell report would ask for just the parameters that you wanted.  You'd have formulas in the main report for the remaining stored procedure parameters and they would produce whatever default or dummy values you like.  Link the parameters and formulas in the main report to the stored procedure parameters in the subreport.

 However, this won't work if your current report has any subreports, since a subreport can not contain another subreport.


 Shell procedure:

 Same basic idea.  Create a new stored procedure that executes the original stored procedure.  The new procedure would have whatever parameters you want, and pass preset default/dummy values to the other parameters in the original procedure.  I've used this approach a number of times when I was creating a new report that used the same data as another report, but I wanted to omit one or more of the original parameters.


 FWIW, both of these could be described as using a "front end" of sorts, as Kurt suggested, although I'm guessing that he was talking about some kind of application.

 James
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 33583861
James is right - those are both possible solutions (similar to what I do when I want to capture multiple value parameters against SQL Commands or Stored Procedures) and I was specifically referring to an application that gathers parameter values and passes them into the report.

~Kurt
0
 

Author Comment

by:Shamanth
ID: 33587078
So, there is no straightforward way to do this in Crystal?!!!
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 33587796
It can be done, as indicated by James, but not simply, no.  That's one of the major trade-offs in using Stored Procedures within Crystal Reports.

~Kurt
0
 

Author Closing Comment

by:Shamanth
ID: 33588161
Thanks!
0
 
LVL 34

Expert Comment

by:James0628
ID: 33593714
You're welcome.

 FWIW, I think a later version of CR (after 10, which is the version I have) may have some kind of "optional parameter" feature, but I doubt that it applies to stored procedure parameters.

 James
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 33596212
James is right, Crystal Reports 2008 has Optional Parameters, but they don't pertain to Stored Procedures.  They're only for Crystal Reports parameters values and take advantage of the new HasValue function.

~Kurt
0
 
LVL 34

Expert Comment

by:James0628
ID: 33602114
Thanks for the info Kurt.

 James
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now