[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

User Parameter Prompt or Automated Scheduled Value?

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?
1 Solution
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.
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}

ansvaritAuthor Commented:
Thank you

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now