The Issue

After modifying a report and on running it, Report Builder 2.0 returns the following error:


An error occurred during local report processing.
An error has occurred during report processing.
Query execution failed for dataset 'DataSet1'.
The variable name '@GroupName' has already been declared.  Variable names must be unique within a query batch or stored procedure.

Yes, well don't laugh, I could not find this on the WWW so I was obviously not using Google properly.  Anyway here's just a quick note on how to do if else statements in Report Builder 2.0

I'm looking at the following if statement:

If (MyFieldName = 0) Then
     Return 1
     Return MyFieldName

Can be expressed as:

IIf(Fields!MyFieldName.Value = 0, 1, Fields!MyFieldName.Value)


Dunno about you guys but I've searched the WWW for a solution and couldn't find it.  The work around I've documented is a "solution" to my situation and environment.
Our setup is:
  • SQL Server 2008
  • Report Builder 2.0
  • BMC Service Desk Express 9.8
  • Incident #
  • Group Name
  • Close Date & Time
  • Assigned to Full Name
  • Incident Type
The objective of this article is to explain how to hide "Series1" from appearing in your SQL Server Reporting Service (SSRS) report.  I am guessing that Series1 is the data series from an outer join where the joining index value is null.

Basically I thought that the regional settings of a report generated using Report Builder 2.0 on a MS SQL Server 2008 instance were dependent on either the server or the client machine.  Realised that this was actually specified in the report. Here's a quick note on how to set Dates and Times used in parameter fields to UK format (dd/MM/yyyy).