Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Publishing to Enterprise

Status
Not open for further replies.

lana123

Programmer
Aug 20, 2003
79
US
Hi,people.
When I run report with parameters in Crystal Report, it allows me to enter one parameter and it runs the report correctly. So it assumes that the other parameters are optional. When I publish it to CE, however, it insists on having ALL parameters filled in (and there quite a few parameters) -- and if I enter only one parameter, the report fails.
How I have to tell Enterprise that parameters are optional?
I'll appreciate any answer.
Thanks in advance,
Lana
 
PArameters aren't optional.

Though in CE you can select whether a user is to enter a parameter or not, and if you so designate, then they must.

A common solution is to set a default for parameters, such as "All".

The record selection formula would then have:

(
{table.field} = "All"
or
{table.field} = {?Parameter}
)

The key is to make sure that the SQL is passed to the database by checking the Database->Show SQL Query

I usually fully qualify with the following to ensure this:

(
if {table.field} <> "All" then
{table.field} = {?Parameter}
else
if {table.field} = "All" then
true
)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top