cancel
Showing results for 
Search instead for 
Did you mean: 

Named Date Ranges in Business Objects Report Instance

Former Member
0 Kudos

I've just created a series of reports which are scheduled to run under 4.1.

The user will have the opportunity to view the reports 'as is' or, within Infoview, select against the saved data to view the last full week, month, etc.

The Saved Data Selection Formula is:

if not hasvalue({?Account Open}) or {?Account Open}=0  then 1=1

    else if hasvalue({?Account Open}) and {?Account Open}=1 then {p_report_Customer_High_Risk_Occupations_Detail.Account_open_date_newest}in LastFullWeek

    else if hasvalue({?Account Open}) and {?Account Open}=2 then {p_report_Customer_High_Risk_Occupations_Detail.Account_open_date_newest}in LastFullMonth

    else if hasvalue({?Account Open}) and {?Account Open}=3 then {p_report_Customer_High_Risk_Occupations_Detail.Account_open_date_newest}in Yeartodate

    else 1=0;


My question is, if the user retains instances stretching back over a month or two, opens one of those instances, then filters against the 'saved data' based on the formula above, will the filtered data returned be based on the date the report was originally run or will the Crystal function take the current date when applying the filter?


If the latter, what sort of strategy can be applied to ensure the 'proper' starting point for the named date function?


Thanks...

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi,

When you open the instances and use the 'saved data' selection, it will filter based on the 'Current Date'.

To be able to filter based on the dates the report were run on, you'll need to use the 'DataDate' function.

So instead if using LASTFULLMONTH, you'd use:

{p_report_Customer_High_Risk_Occupations_Detail.Account_open_date_newest}

in

[cdate(year(DateAdd("m",-1,DataDate)), month(DateAdd("m",-1,DataDate)), 01) TO

DateAdd("m",1,cdate(year(DateAdd("m",-1,DataDate)), month(DateAdd("m",-1,DataDate)), 01))-1]

-Abhilash

Former Member
0 Kudos

Thanks for the info... it was as I had suspected (UNFORTUNATELY). Looks I'm going to work to create some formulae!!!!

Answers (0)