Solved

Crystal Reports 11 command parameters

Posted on 2011-02-16
4
599 Views
Last Modified: 2012-08-13
How do Crystal Reports 11 commands work exactly? Commands look like database tables during a report setup. Are these command/tables recreated in their entirety each time a report table link points to a command?

Within Crystal Reports 11, is it possible to automatically and variably populate a command parameter from the main report?
0
Comment
Question by:BuddyTo
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Commands are like a database stored procedure.

The command is run each time the report is opened just as a stored procedure is or a view is run.

Not sure what you are getting at with
--   is it possible to automatically and variably populate a command parameter from the main report?

mlmcc
0
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 500 total points
Comment Utility
1)  A command is conceptually the same as a stored procedure - it must be executed 100% before most other Crystal Reports functionality.  That's not really the same as a view, which is simply treated by Crystal like any other table (it's simply materialized at runtime). Generally speaking, if you're using a command as a data source for your report then it should be the only data source.

2)  A command parameter needs to be created inside the command explicitly as opposed to normal Crystal Reports parameters that are created in the Field Explorer.  Once you've created the command and it's parameters, you can edit the parameter in the field explorer and append a list of values to it.  Those values, however, will be static. You can't make them dynamic, which is what it sounds like you're asking for.

Is there a specific reason you're using a command where regular tables or a view won't work?

~Kurt
0
 

Author Closing Comment

by:BuddyTo
Comment Utility
Thank you for your answer.
I am using commands because my connection to the target database is restricted to Crystal only. No SQL views, stored procedures, other languages, etc, are allowed.
If commands allowed "dynamic" parameter passing, then a command could act like a sub report AND could be placed on a sub report... a sub report on a sub report. This would help solve some fairly complex report problems I have involving nested bills of materials and my need for recursive reports.
0
 
LVL 34

Expert Comment

by:James0628
Comment Utility
 > If commands allowed "dynamic" parameter passing, then a
 > command could act like a sub report AND could be placed
 > on a sub report... a sub report on a sub report.

 I'm not sure what you're suggesting.  A Command parameter can be "dynamic" in that it can be passed different values.  For example, you could have a subreport that uses a Command that has a "part code" parameter and reads data for that part code, and a main report that reads a list of part codes.  The main report executes the subreport for each part code, and passes the part code to the parameter in the subreport, which uses that part code in the Command.

 But a Command is a datasource.  It's not "placed on" a report.  So I don't know what you were getting at there.

 Also, FWIW, a dynamic parameter in CR is one that gets the list of default values from a query, but someone/something still has to choose values from that list.  So, that kind of dynamic parameter doesn't really seem relevant/useful here.

 James
0

Featured Post

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

Join & Write a Comment

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. …
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…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

10 Experts available now in Live!

Get 1:1 Help Now