Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS expression issue

$
0
0

Hello All,

I'm having an issue with adding parameters to the report with the below statement. When I add @Start as a parameter in report and set the default value to =DATEADD( "M", -1, DATEADD("QQ", DATEDIFF("QQ", 0, Today()),0)), I get an error saying - An error occured during local report processing. How can I set default value for @End to - DATEADD(day, -1, DATEADD(month, DateDiff(month, 0, @Start) +1, 0))? Thanks

declare @Start as date
declare @End as date
declare @NextStart as date
Declare @NextEnd as date
Set @Start= DATEADD( MM, -1, DATEADD(QQ, DATEDIFF(QQ, 0, GETDATE()),0))
Set @End = DATEADD(day, -1, DATEADD(month, DateDiff(month, 0, @Start) +1, 0))
Set @NextStart = DATEADD(MONTH, 1, @Start)
Set @NextEnd = DATEADD(day, -1, DATEADD(month, DateDiff(month, 0, @Start) +2, 0))

Thanks,

Amol


Viewing all articles
Browse latest Browse all 10045

Trending Articles



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