Jump to content


rickym61

Automate Software Metering Monthly Report.

Recommended Posts

Just wondering if anyone has any ideas how to automate a software metering report for all future months, currently setup as an SSRS subscription.

 

example, new rule created for Visio, if you run the built in software metering reports, you have to select the values, so software metering rule name (easy part), year (easy part too) then the month is required, now if I want future months, I have to edit the SSRS subscription parameters  every month as that data/value isn’t available until a user/computer invokes that application.

Invoke-cmreport cmdlet would launch the report but can’t find a way to tie that into the SSRS subscription so I can set it up and let it run monthly without any intervention.

any ideas?

thanks.

 

Share this post


Link to post
Share on other sites


Ys you can do this but you will need to edit the report and modify the monthly prompt to use getdate and datepart to auto populate the prompt. 

Share this post


Link to post
Share on other sites
On 4/26/2018 at 1:36 PM, GarthMJ said:

Ys you can do this but you will need to edit the report and modify the monthly prompt to use getdate and datepart to auto populate the prompt. 

Hi Garth,

I tried this with some success, maybe im missing something obvious, you able to advise any further or one of your famous blog posts :)

so I've edited the parameter and added this expression =datepart(DateInterval.Month,dateadd(DateInterval.Month,-1,Today))

If I then run the report it will pick up the previous month which is good, tested this in April and today being 1st May, showed month value correctly. Tested hiding the month parameter and not hiding it.

Now the issue is with the subscription, now states "The subscription contains parameters that are not valid" - if I show the parameter then you have to select what is available as values, so there would be nothing for June until we are in June.

Share this post


Link to post
Share on other sites

Why not update the SQL query and not user SSRS itself. 

Something like this. 

Select datepart(mm,getdate()-1) as 'month'

Share this post


Link to post
Share on other sites

I did look at the original SQL used but it was overwhelming, made use of rbac fn and other bits, hence my request for help from the skilled :-)

im sure there’s a simple method to get it done but just can’t find it yet.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...