I got a request from a customer that they want to be able to subscribe to the built in report “Antimalware Activity Report” in Configuration Manager 2012. As this report requires a start date and end date to run the report will be be emailed for the dates that are entered when you create the subscription and not the current date.
Modifying the report to be for the last day or for the last 7 days and remove the Start Date and End Date prompt.
Here is how to do it:
1. Browse to the Configuration Manager 2012 reporting site
2. Under Endpoint Protection, select the “Antimalware Activity Report” and select “edit in report builder”
3.Under Parameters select @StartDate and Edit parameter
4. Change the visibility to “Hidden”
5. In the available values section change to “Get values from a query” with the below settings:
6. Then we do the same for the @EndDate parameter:
7. Then we save the report with a new name like “Anitmalware Activity Report – Last 7 days”
Now when we run the report we are no longer prompted for a Start Date and an End Date, only which device collection the report should be based on.
If you want to change the interval from 7 days to only include todays activity we can change that as well really easy in the Report Builder.
Under “Datasets” select the “StartEndDates” dataset and edit the query. Change the “-7” in the query to how many days back in time you want the report, for only todays activity set it to “0”.
Then the query looks like this:
select DATEADD(day,0,DATEDIFF(day, 0, GetUTCDate())) as StartDate, DATEADD(day,0,DATEDIFF(day, 0, GetUTCDate())) as EndDate
Then we save report again as for example “Antimalware activity report – todays activity”
I hope this can be useful for more than me
The scheduling functionality of system center reports is missing a key option when setting up a subscription. Everywhere else I’ve used Reporting Services, you have the option to check the “Use Report Default Value” option. You shouldn’t have to hide parameters to get them to use default values. This is a fail on the part of whoever created the interface.
Update on my previous post. The hacky work-around for this is to hide the parameters on the report, create subscription (you will not be prompted for default dates at this point), go back to report and un-hide parameters. This will force the report to use the default values but still allow you to specify dates when you run the report.
While this is an old topic I wanted to say I found it very helpful. Editing the report and running it works without issue. I created a report subscription for this report and everything seemed fine. The next day I didn’t receive the report so I logged in to check and I saw a status of “The subscription contains parameter values that are not valid.” I checked the properties of the subscription and the only value it was asking for was “collection”. I changed the schedule a bit and attempted to save but was then greeted with the message “Default value or value provided for the report parameter ‘StartDate’ is not a valid value’. Even though this field is hidden and running the report as normal works it still fails when ran through a subscription. Very frustrating and I have no idea how to resolve.