Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

Crystal Reports Date in Parameter

Hi,

I am trying to create a running parameter that will utilise the "is in period"

When a user runs the report I want them to be able select from a drop down menu the options listed in the picture attached.

Can anyone explain how to set the parameter up?

Thanks
example.png
0
Dan560
Asked:
Dan560
  • 2
1 Solution
 
GJParkerCommented:
You would need to type each value into a parameter and handle the results from this paramter in the record selection formula i.e.

If {?Param} = 'Last7Days' Then
  {table.date} >= Today - 7 and {table.date} <= Today
Else If {?Param} = 'MonthToDate' Then
  {table.date} > Today - Day(Today) and {table.date} <= Today
Else If .........etc.

HTH
0
 
GJParkerCommented:
actually the selection formula can use the relative function

If {?Param} = 'Last7Days' Then
  {table.date} In Last7days
Else If {?Param} = 'MonthToDate' Then
  {table.date} In MonthToDate
Else If .........etc.

0
 
Dan560Author Commented:
Thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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