Skip to Content
0

Prompt for date range and which field to apply date range filter to

Dec 28, 2016 at 02:33 PM

466

avatar image

I am working on a universe in the Information Design Tool, and trying to figure out how to create a prompt for the user to select a date range, and to also choose which date field to apply that date range filter to. So basically, when they run a report, they can choose to either get a set of records that were created within a date range, or get a set of records that are due within a date range. If it matters, this will be used in Crystal Reports for Enterprise. Also, we are on version 4.1 SP5.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Nick VanLent Dec 28, 2016 at 03:40 PM
1

I think I found a solution (again, I was over thinking it a little). I used something like this:

  • Setup a static LOV for "Date1" and "Date2"
  • Used that LOV in a parameter that prompts the user "Filter by Date1 or Date2"
  • Setup two more parameters "Select a Start Date" and "Select an End Date"
  • Created a business layer filter:

    (@Prompt(Date1 or Date2) = 'Date1' and @Select(Date1) between @Prompt(Start Date) and @Prompt(End Date))
    or
    (@Prompt(Date1 or Date2) = 'Date2' and @Select(Date2) between @Prompt(Start Date) and @Prompt(End Date))
Share
10 |10000 characters needed characters left characters exceeded
Mahboob Mohammed Dec 28, 2016 at 02:59 PM
0

Hi Nick,

Try this blog, you'll have to update the logic a little bit though. Let us know if you need help in updating it.

Custom Predefined Date Range Filters in BO Universe

Thanks,

Mahboob Mohammed

Show 1 Share
10 |10000 characters needed characters left characters exceeded

It doesn't look like that blog will apply. It is filtering a single "table.date" field. For me, however, I would like to filter on either "table.date1" field or "table.date2" field, depending on which option the user selects. So there will be two prompts: one for date range, and one for the user to choose "Date1" or "Date2". (Actually, three prompts, because the date range will have two prompts; one for start and one for end.)

0
Mahboob Mohammed Dec 28, 2016 at 03:46 PM
0

Hi Nick,

Great, you found a solution!!!

I was thinking of something similar using Case statement.

Thanks,

Mahboob Mohammed

Share
10 |10000 characters needed characters left characters exceeded