User Parameter Prompt or Automated Scheduled Value?

Posted on 2010-01-05
Last Modified: 2013-11-15
Hi All,

A 'quick' one; I have a report that when run by a user online it prompts for a Parameter value. This value being the end month they'd like the report to run to. EG: 10 (for october).

The report then gathers all values for the year to the month defined.

I would like to schedule this report (monthly) in Crystal Server, but I need the parameter value to either be dynamic or ignored for the 'Filter' to be editted to say Month(Today)-1.

Bascailly, the monthly report will run Year To Date. The selection fields for month and year are string fields that are referenced seperately (old iSeries system).

Can I do such an action without creating two 'versions' of the report?
Question by:ansvarit
    LVL 13

    Expert Comment

    Pass "CURR" from the server as the parameter (since they are strings).

    Alter the current test to check for currentdate-1 if the parameter is 'CURR' and to convert the parameter to month if not.
    LVL 16

    Accepted Solution

    You can have a schedule and adhoc all in one version. I do this currently and it works very well..

    Create a parameter called Runtype
    populate it with Ad-hoc and Scheduled as values (or whatever you want) make it default to Ad-Hoc.
    Then in the your record selection formula you will use it to check to see how the date is going to be set.
    If {?RunType} = 'Scheduled' then {TableField} = YearToDate else {TableField} = {?daterange}


    Author Closing Comment

    Thank you

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    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. …
    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    729 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

    21 Experts available now in Live!

    Get 1:1 Help Now