CU3–Issue with reporting strings


This should not be a common issue it only happens when the same management pack is first imported not sealed and then substituted by a sealed one without changing version. Very common in dev environments and should not happen in production ones. Anyway this happened to me and this is the full story. The post is a memento for me not to do that anymore, I’m sharing just in case.

By the way, what’s the issue?

If after applying Cumulative Update 3 some reports start to break in error (rsReportParameterProcessingError) then you’re in.

image

If the same error occurs from the SQL Reporting Services web page, you’re in.

CU3 changes the behavior of the ReportDisplayStringGet stored procedure, when you’re in the case I stated at the beginning of this post.

The following is the pre-CU2 stored procedure

image

And this is the new one

image

The stored procedure is called when a report is initialized to get the localized display strings, the new stored procedure can return multiple rows with the same key (N)

This is a sample query

exec ReportDisplayStringGet @ManagementGroupGuid=N’f6337ea5-d7d2-a4bb-76e3-09e760d09ce8′,@ManagementPackSystemName=N’Progel.Report.Library’,@ReportSystemName=N’Progel.Report.Summary’,@LanguageCode=N’ENU’,@Scope=N’R.%’

<R>
  <S N="R.AggregationLabel">Data Aggregation</S>
  <S N="R.AggregationValue_0">Hourly</S>
  <S N="R.AggregationValue_1">Daily</S>
  <S N="R.BusinessTimeFormat">{2}   from  {0}  to  {1}</S>
  <S N="R.Chart2Title">Alerts Summary</S>
  <S N="R.Chart3Title">Number of Alerts</S>
  <S N="R.Description">The Alerts and Availability Summary Report gives an overview which istances raised more alerts and which systems had more downtime.</S>
  <S N="R.DescriptionTitle">Click on plus sign to see a full description for this report</S>
  <S N="R.GeneratedTimeLabel">Report Time</S>
  <S N="R.MonitorLabel">Monitor</S>
  <S N="R.ObjectFormatLine1">{0}: {1}</S>
  <S N="R.ObjectFormatLine2">{0} {1}</S>
  <S N="R.ObjectFormatLine2Path">| {0}</S>
  <S N="R.ObjectsFormat">{0} agents monitored</S>
  <S N="R.ObjectsLabel">Object(s)</S>
  <S N="R.ObjectUseContainment">All objects contained by:</S>
  <S N="R.PageFormat">Page {0} of {1}</S>
  <S N="R.SeverityLevel0">Information</S>
  <S N="R.SeverityLevel1">Warning</S>
  <S N="R.SeverityLevel2">Critical</S>
  <S N="R.StartEndTimeFormat">From  {0}  to  {1}</S>
  <S N="R.StartEndTimeLabel">Report Duration</S>
  <S N="R.TimeZoneFormat">All dates and times are shown in {0}</S>
  <S N="R.Title">Alert Summary Report</S>
  <S N="R.TValue_Min">{0} minute(s)</S>
  <S N="R.TValue_Sec">{0} second(s)</S>
  <S N="R.ObjectFormatLine1">{0}: {1}</S>
  <S N="R.ObjectFormatLine2">{0} {1}</S>
</R>

When the GetLocTable procedure is called to get parameters display strings it breaks in error creating the dictionary XmlStringTable (yes you cannot have dictionary with duplicate keys)

  Public Function GetLocTable(Name As String) As Microsoft.EnterpriseManagement.Reporting.XmlStringTable
    Dim LocTable As Microsoft.EnterpriseManagement.Reporting.XmlStringTable

    If Not LocTables.TryGetValue(Name, LocTable) Then
    LocTable = New Microsoft.EnterpriseManagement.Reporting.XmlStringTable(LocTableStringQuery, Report.Parameters(Name).Value)
    LocTables.Add(Name, LocTable)
    End If

The hack I found to address the issue is to add a distinct clause to the select statement:

SELECT DISTINCT

     1 AS Tag

    ,NULL AS Parent

This is far from perfect, because if you changed your display strings between the unsealed and sealed version of the MP you could end with the wrong display string, but again this is an uncommon scenario and this hack worked for me.

– Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: