Thursday, 18 June 2015

Today minus 2 years in ssrs

Hi Folks,
Write the below code in your SSRS expression tab to get date - 2 years in your ssrs textbox

=DateAdd(DateInterval.year,-2,Today())

Monday, 1 June 2015

Order By using CAML queries

Use the below code type to achieve order by using CAML queries in your SSRS query designer

<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ListName>Regions</ListName>
  <ViewFields>
   <FieldRef Name="RegionName"/>
  </ViewFields>
<Query>
<OrderBy>
    <FieldRef Name="RegionName" Ascending = "True"/>
</OrderBy>
</Query>
</RSSharePointList>

Hyperlink in SSRS shows 2 & field name while using it with Sharepoint

While using the GoTo URL link in SSRS to open a sharepoint list like below

="http://devserver:1882/Lists/Regions/DispForm.aspx?ID=25

I used the below settings in GoTo URL option in Action tab

="http://devserver:1882/Lists/Regions/DispForm.aspx?ID="&Fields!Region_ID.Value

but this would bring up wrong results i,e

="http://devserver:1882/Lists/Regions/DispForm.aspx?ID=25&ID=25

We can resolve this issue by adding extra / before your.aspx page

="http://devserver:1882/Lists/Regions//DispForm.aspx?ID="&Fields!Region_ID.Value

Ref - https://connect.microsoft.com/SQLServer/feedback/details/590273/ssrs-goto-url-action