[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Crystal Reports- Hide Stored Procedure Parameter

Posted on 2010-09-01
9
Medium Priority
?
1,054 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 26

Assisted Solution

by:Kurt Reinhardt
Kurt Reinhardt earned 600 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 35

Accepted Solution

by:
James0628 earned 1400 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
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 

Author Comment

by:Shamanth
ID: 33587078
So, there is no straightforward way to do this in Crystal?!!!
0
 
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 35

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 35

Expert Comment

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

 James
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

649 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