Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Sage MAS Partner
csmith
Posts: 84
Registered: 01-26-2009
0

Parameter question: Can I leave a dynamic parameter blank?

I have a report with dynamic paramaters for beginning and ending inventory item numbers and static parameters for beginning & ending product lines.  My goal is to be able to select either a range of items OR a range of product lines.  Below is my formula:

 

{AR_InvoiceHistoryDetail.ItemCode} in {?Beginning Item Number} to {?Ending Item Number} and
{AR_InvoiceHistoryHeader.InvoiceDate} in {?Beginning Date} to {?Ending Date} or
{AR_InvoiceHistoryDetail.ProductLine} in {?Beginning Product Line} to {?Ending Product Line} and
{AR_InvoiceHistoryHeader.InvoiceDate} in {?Beginning Date} to {?Ending Date}

 

If I only want to select a range of product lines, I'm still required to select a range of item numbers.

 

Is there a workaround for this?

Sage MAS Partner
robertcwood
Posts: 294
Registered: 11-03-2008
0

Re: Parameter question: Can I leave a dynamic parameter blank?

Have you tried something like this:

 

if {?Beginning Product Line} = "" then

{AR_InvoiceHistoryDetail.ItemCode} in {?Beginning Item Number} to {?Ending Item Number} and
{AR_InvoiceHistoryHeader.InvoiceDate} in {?Beginning Date} to {?Ending Date}

else
{AR_InvoiceHistoryDetail.ProductLine} in {?Beginning Product Line} to {?Ending Product Line} and
{AR_InvoiceHistoryHeader.InvoiceDate} in {?Beginning Date} to {?Ending Date}

Robert C. Wood aka bertowud
DDF Consulting, Inc. and 90 Minds Member
Sage MAS Partner
csmith
Posts: 84
Registered: 01-26-2009
0

Re: Parameter question: Can I leave a dynamic parameter blank?

Thank you Robert. I tried that formula, but Crystal still required me to enter a range of item numbers. If I select the entire range of items, and only the product lines I want, I do get the correct data. I was just hoping we could leave the item range selection fields blank.
Super Contributor
connex
Posts: 795
Registered: 10-29-2008
0

Re: Parameter question: Can I leave a dynamic parameter blank?

[ Edited ]

Dynamic parameters in Crystal cannot have default values and must be explicitly selected. That said I don't suppose there would be any reason that you could create a dummy product line and inventory item called "NONE" and change your logic to

 

( {AR_InvoiceHistoryDetail.ItemCode} = "NONE" or

(

{AR_InvoiceHistoryDetail.ItemCode} in {?Beginning Item Number} to {?Ending Item Number} and

{AR_InvoiceHistoryHeader.InvoiceDate} in {?Beginning Date} to {?Ending Date}))

 

or

(

{AR_InvoiceHistoryDetail.ProductLine} = "NONE" or

(

{AR_InvoiceHistoryDetail.ProductLine} in {?Beginning Product Line} to {?Ending Product Line} and {AR_InvoiceHistoryHeader.InvoiceDate} in {?Beginning Date} to {?Ending Date}))

 

You would need to post at least one NONE item to get the dynamic list populated. If you begin your codes with an ampersand (&) they will show at the beginning of the dynamic lists.

 

The bummer about dynamic paramters is that they provoke the MAS login screen for EACH parameter even when they are installed on the custom reports menu. Maybe I should have mentioned that first! :-)

Dan Burleson
Sage Authorized Consultant - Ask me about advanced scripting!
e-mail me here
Sage MAS Partner
csmith
Posts: 84
Registered: 01-26-2009
0

Re: Parameter question: Can I leave a dynamic parameter blank?

Thanks Dan.  I realized pretty quick that the dynamic parameters would prompt for logins.  Unfortunate, but I guess that's the price we pay.