Skip to Content

Crystal Reports 13: Need to remove Parameter and Hardcode date range


I'm fairly new to Crystal reports. We have a report that I need to remove the date parameter and replace it with a hard coded date parameter starting on 1/1/2016 to infinity/meaning no maximum date.

Every place I've researched this always points to creating a parameter. I can't have any parameters in this report and there is no way to remove the Crystal Reports prompting for parameters. If I get any prompts the Alert system for our ERP system we use for automatic report sendings will not work. So I must strip all parameters from a report in order for them to be automatically sent. Thank you! :)

Here is the selection Expert detail;

({@USER_EPLANT_ID} = 0 or {@USER_EPLANT_ID} = {PO_DETAIL.EPLANT_ID}) and {V_PO_RECEIVED_VS_AP.UNINVOICED} <> 0.00 and {V_PO_RECEIVED_VS_AP.QTY_RECEIVED} > 0.00 and {PO_RECEIPTS.RECEIPTNO} <> "CUMD RECEIPT ADJUSTMENT" and ({@void} = Date (0, 0, 0) or isnull ({@void})) and ({@include inv item} in {?items} or {@include misc items} in {?items} or {@include non material} in {?items}) and {@podate} = {?date}

Here is the date parameter detail;

date-parameter.jpg (54.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 28, 2020 at 03:29 PM

    There are actually two parameters that will need to be removed: {?date} and {?items}.

    To remove the date parameter, I would change the last line in the Select Expert to be something like:

    {@podate} = Date(2016, 1, 1)

    You'll also need to figure out how you're going to remove the criteria for selected items. If you want to show all of the items, you'll remove the following lines in the Select Expert:

    ({@include inv item} in {?items} or 
     {@include misc items} in {?items} or 
     {@include non material} in {?items}) and 

    However, I see a couple of things in here that concern me over and above removing the parameters. In general, you don't want to use Crystal formulas in the Select Expert. When you do, Crystal cannot push the selection formula to the database and will pull all of the data into memory to filter it there. This can have a significant negative impact on the performance of the report. One of the things you can do to alleviate this is to use SQL Expressions instead. If you'll post the formulas for {@USER_EPLANT_ID}, {@void}, and {@podate} along with the type of database you're connecting to, I should be able to either help you write these or find another way around using the formulas.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 03, 2020 at 12:23 PM


    Thank you! I didn't want to post all the questions at once as I've been trying to tackle one parameter at a time and to make it less confusing of a question.

    I have attached screenshots of the parameters the report asks for with the answers as well as the three formulas.


    parameters.jpg (75.9 kB)
    podate.jpg (61.6 kB)
    usereplant.jpg (49.1 kB)
    void.jpg (63.0 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.