Link to home
Start Free TrialLog in
Avatar of BuddyTo
BuddyTo

asked on

Crystal Reports 11 command parameters

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?
Avatar of Mike McCracken
Mike McCracken

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
ASKER CERTIFIED SOLUTION
Avatar of Kurt Reinhardt
Kurt Reinhardt
Flag of United States of America image

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 BuddyTo

ASKER

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.
 > 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