Quantcast
Channel: Forum CRM Development
Viewing all articles
Browse latest Browse all 1000

CRM 2015 - SSRS Report cannot set date in pre filter.

$
0
0

I have a specific requirement from a customer that the pre-filter of an SSRS report should contain an "on-or-after" and an "on-or-before" clause.  Effectively similar to a last 7 days filter but the customer want to specify the dates as they find that much easier to understand.

I can make it work by hard coding the default value thus:

="<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='new_meeting'><all-attributes/>" +"<filter type='and'>" +"<condition attribute='scheduledstart' operator='on-or-after' value='2015-11-10' />" +"<condition attribute='scheduledstart' operator='on-or-before' value='2015-11-17' />" +"<condition attribute='statuscode' operator='eq' value='2' /></filter>" +"</entity></fetch>"

However if I inject a date formula into the pre filter default value I get blank values when I deploy and run the report.

="<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='new_meeting'><all-attributes/>" +"<filter type='and'>" +"<condition attribute='scheduledstart' operator='on-or-after' value='" + Format(DateAdd(DateInterval.Day, -7, Today()),"yyyy-MM-dd") + "' />" +"<condition attribute='scheduledstart' operator='on-or-before' value='" + Format(Today(),"yyyy-MM-dd") + "' />" +"<condition attribute='statuscode' operator='eq' value='2' /></filter>" +"</entity></fetch>"

Am I doing something very wrong here?  Is this something which should work?

My basic issue is that I want to use an end date which is the date on which the report is run and then work backwards a number of days to create the default query window.


Viewing all articles
Browse latest Browse all 1000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>