|
|
Posted on May 26, 2011 10:25
After a recent SSRS upgrade from SQL 2008 to SQL 2008R2 Gold ( no patches) , we began to get complaints from users that reports were running slow and Internet Explorer was hanging up when certain reports were executed.
We ran some of our standard SSRS reports, and there were no unusual report failures. We looked at the SSRS logs and there was nothing which could explain the problem either.
We could reproduce the problem by running one of our SSRS reports – it seemed to run forever, when normally it would run in less than 10 seconds.
It seemed that every time we touched the report – things would hang up. While the report was running, sometimes your laptop would go unresponsive as well. If you managed to click on any other tab in IE, the title bar for IE would include (Internet Explorer Unresponsive), and the entire IE window would grey out.
Running the same report, with the same data, in Report Builder 3 was fine.
We ran Fiddler to see what we might learn by following the network traffic. The times between send and receives were pretty fast. Summing up the times accounted for only a small portion of the 1:40 that it took to run the report. However we did notice a pattern – there was a large wait on the client side. Fiddler looked like:
Send -> receive
Send -> receive
Send -> receive
<Long Wait>
Send -> receive
The sends come from the IE client, and the receive is the response from SSRS Reportserver.The client would send a request, get a quick response, then sometimes just wait. Since the unexplained time was after a receive, and before a send, we know that the client is the problem. If the client would simply do the next send – all would be good.
Running Task Manager on the client during the report run , we would see one or two processors using nearly 100% during the wait, then returning to normal. Below is task manager during the unresponsive period.

After a while we realized that the problem occurs when the parameters refresh. It took 1:40 to refresh the parameter list. There were several parameters, and simply choosing a different item from the parameter list would send us into this 1:40 wait.
I pulled out the query which generates the parameter lists, and ran it in Management Studio – and it is fast, fast, fast.
Running the report in the development environment also did not exhibit the same behavior, even though it was on the same version of SSRS as the problem prod environment. There were lots of reports in prod that did not have this problem. We typically run 25,000 to 35,000 reports per day in production. Most were fine, but several reports, only in production, exhibited this behavior.
Continuing to work, we discovered that the number of values in the parameter lists in the trouble prod reports were between 8K and 11k. The same report which did not exhibit this problem in dev, had a much shorter list of values in its parameter lists. Changing the data source on the report in dev, to point to the production database – the dev report took forever to refresh, just like prod. Now we know the problem is related to having a large number of values in the parameter list. Checking other reports with the same problem, they all had a large parameter lists.
Microsoft has a KB article about this problem (http://support.microsoft.com/kb/2522708) and http://support.microsoft.com/kb/2506799/LN. it is fixed in CU7 for SQL Server 2008 R2. This CU is not included in SP1, which is in beta right now. However, I assume it will be included in SP2 and later, when they come out.
The KB article describes the problem to apply to “The report contains a large multi-select drop-down parameter list.” Our reports with single select drop-downs also showed this problem, so it does not apply ONLY to multi-select.
Another thing to note is that the initial load of the parameters when the report first comes up in IE is fine. However when you change one of the parameter values, and the parameters refresh – you wait, wait, wait.

How do I know if I have this problem?
· Report was created in an earlier version of SSRS than SQL 2008 R2
· Initial report load, and execution time same as pre-upgrade.
· Parameter refresh takes a long time, during which CPU utilization goes near 100%
· You are running SQL Server 2008 R2 pre-CU7
We installed CU 7 and the 1:40 refresh time dropped to about 10 seconds, and processor utilization dropped – problem fixed. CU7 can be found at http://support.microsoft.com/kb/2489376.

Warning: I believe that installing SQL 2008 R2 CU7 breaks intellisense in Visual Studio 10. If so, there is a patch which fixes this also.
Posted on May 26, 2011 08:55
We recently upgraded SQL Server Reporting Services for a large SSRS user from SQL 2008 to SQL 2008R2 Gold (no SQL 2008R2 patches).
Immediately some reports began to fail with a System.OverflowException. Sometimes the report would run correctly. Other times the report would fail. The implementation was 4 load balanced servers on the front end. Failures were happening on all of the servers, so the problem wasn’t specific to a particular server.
The error that customers would see in SSRS is in the screen shot below:

Looking at the SSRS Error Logs, we found errors like these:
processing!WindowsService_0!165c!05/24/2011-06:00:18:: e ERROR: An exception has occurred in data set 'OutageDataSet'. Details: System.OverflowException: Value was either too large or too small for an Int32.
processing!WindowsService_0!165c!05/24/2011-06:00:18:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: , Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> System.OverflowException: Value was either too large or too small for an Int32.
It was always System.OverflowException: Value was either too large or too small for an int32.
As it turns out, this is a known bug, documented in the KB article (http://support.microsoft.com/kb/2359606).
There is a work around in the article which tells us to convert a grouping field from int to Cdbl or CLong. However, if you do this – you’ll have to figure out which item needs to be changed. The error message will give you the dataset, but not the column, nor the item within the report that exhibits the problem.
This is fixed in Cumulative Update 4(http://support.microsoft.com/kb/2345451) , which you can download and install immediately. This fix is also included in SQL 2008 R2 SP1, which at the time of this writing, is still in beta.
Posted on January 24, 2008 04:26
|
Visual Basic Language Reference
|
|
Different Formats for Different Numeric Values (Format Function)
A user-defined format expression for numbers can have from one to three sections separated by semicolons. If the style argument of the Format function contains one of the Predefined Numeric Formats, only one section is allowed.
|
If you use
|
This is the result
|
|
One section only
|
The format expression applies to all values.
|
|
Two sections
|
The first section applies to positive values and zeros; the second applies to negative values.
|
|
Three sections
|
The first section applies to positive values, the second applies to negative values, and the third applies to zeros.
|
The following example has two sections: the first defines the format for positive values and zeros; the second section defines the format for negative values. Since the Style argument of the Format function takes a string, it is enclosed by quotation marks.
"$#,##0;($#,##0)"
If you include semicolons with nothing between them, the missing section is printed using the format of the positive value. For example, the following format displays positive and negative values using the format in the first section and displays Zero if the value is zero.
"$#,##0;;\Z\e\r\o"
|
Visual Basic Language Reference
|
|
|
|
|
Predefined Numeric Formats (Format Function)
The following table identifies the predefined numeric format names. These may be used by name as the style argument for the Format function:
|
Format name
|
Description
|
|
General Number, G, or g
|
Displays number with no thousand separator.
|
|
Currency, C, or c
|
Displays number with thousand separator, if appropriate; display two digits to the right of the decimal separator. Output is based on system locale settings.
|
|
Fixed, F, or f
|
Displays at least one digit to the left and two digits to the right of the decimal separator.
|
|
Standard, N, or n
|
Displays number with thousand separator, at least one digit to the left and two digits to the right of the decimal separator.
|
|
Percent
|
Displays number multiplied by 100 with a percent sign (%) appended immediately to the right; always displays two digits to the right of the decimal separator.
|
|
P, or p
|
Displays number with thousandths separator multiplied by 100 with a percent sign (%) appended to the right and separated by a single space; always displays two digits to the right of the decimal separator.
|
|
Scientific
|
Uses standard scientific notation, providing two significant digits.
|
|
E, or e
|
Uses standard scientific notation, providing six significant digits.
|
|
D, or d
|
Displays number as a string that contains the value of the number in Decimal (base 10) format. This option is supported for integral types (Byte, Short, Integer, Long) only.
|
|
X, or x
|
Displays number as a string that contains the value of the number in Hexadecimal (base 16) format. This option is supported for integral types (Byte, Short, Integer, Long) only.
|
|
Yes/No
|
Displays No if number is 0; otherwise, displays Yes.
|
|
True/False
|
Displays False if number is 0; otherwise, displays True.
|
|
On/Off
|
Displays Off if number is 0; otherwise, displays On
|
|
Visual Basic Language Reference
|
|
Predefined Date/Time Formats (Format Function)
The following table identifies the predefined date and time format names. These may be used by name as the style argument for the Format function:
|
Format Name
|
Description
|
|
General Date, or G
|
Displays a date and/or time. For real numbers, display a date and time; for example, 4/3/93 05:34 PM.If there is no fractional part, display only a date, for example, 4/3/93. If there is no integer part, display time only, for example, 05:34 PM. Date display is determined by your system's LocaleID value.
|
|
Long Date, or D
|
Displays a date according to your locale's long date format.
|
|
Medium Date
|
Displays a date using the medium date format appropriate for the language version of the host application.
|
|
Short Date, or d
|
Displays a date using your locale's short date format.
|
|
Long Time, or T
|
Displays a time using your locale's long time format; includes hours, minutes, seconds.
|
|
Medium Time
|
Displays time in 12-hour format using hours and minutes and the AM/PM designator.
|
|
Short Time, or t
|
Displays a time using the 24-hour format, for example, 17:45.
|
|
f
|
Displays the long date and short time according to your locale's format.
|
|
F
|
Displays the long date and long time according to your locale's format.
|
|
g
|
Displays the short date and short time according to your locale's format.
|
|
M, m
|
Displays the month and the day of a date.
|
|
R, r
|
Formats the date and time as Greenwich Mean Time (GMT)
|
|
s
|
Formats the date and time as a sortable index.
|
|
u
|
Formats the date and time as a GMT sortable index.
|
|
U
|
Formats the date and time with the long date and long time as GMT.
|
|
Y, y
|
Formats the date as the year and month.
|
|
Visual Basic Language Reference
|
|
User-Defined Date/Time Formats (Format Function)
The following table shows characters you can use to create user-defined date/time formats. Unlike in previous versions of Visual Basic, these format characters are case-sensitive
|
Character
|
Description
|
|
(:)
|
Time separator. In some locales, other characters may be used to represent the time separator. The time separator separates hours, minutes, and seconds when time values are formatted. The actual character used as the time separator in formatted output is determined by your system's LocaleID value.
|
|
(/)
|
Date separator. In some locales, other characters may be used to represent the date separator. The date separator separates the day, month, and year when date values are formatted. The actual character used as the date separator in formatted output is determined by your locale.
|
|
(%)
|
Used to indicate that the following character should be read as a single-letter format without regard to any trailing letters. Also used to indicate that a single-letter format is read as a user-defined format. See below for further details
|
|
d
|
Displays the day as a number without a leading zero (for example, 1). Use %d if this is the only character in your user-defined numeric format.
|
|
dd
|
Displays the day as a number with a leading zero (for example, 01).
|
|
ddd
|
Displays the day as an abbreviation (for example, Sun).
|
|
dddd
|
Displays the day as a full name (for example, Sunday).
|
|
M
|
Displays the month as a number without a leading zero (for example, January is represented as 1). Use %M if this is the only character in your user-defined numeric format.
|
|
MM
|
Displays the month as a number with a leading zero (for example, 01/12/01).
|
|
MMM
|
Displays the month as an abbreviation (for example, Jan).
|
|
MMMM
|
Displays the month as a full month name (for example, January).
|
|
gg
|
Displays the period/era string (for example, A.D.)
|
|
h
|
Displays the hour as a number without leading zeros using the 12-hour clock (for example, 1:15:15 PM). Use %h if this is the only character in your user-defined numeric format.
|
|
hh
|
Displays the hour as a number with leading zeros using the 12-hour clock (for example, 01:15:15 PM).
|
|
H
|
Displays the hour as a number without leading zeros using the 24-hour clock (for example, 1:15:15). Use %H if this is the only character in your user-defined numeric format.
|
|
HH
|
Displays the hour as a number with leading zeros using the 24-hour clock (for example, 01:15:15).
|
|
m
|
Displays the minute as a number without leading zeros (for example, 12:1:15). Use %m if this is the only character in your user-defined numeric format.
|
|
mm
|
Displays the minute as a number with leading zeros (for example, 12:01:15).
|
|
s
|
Displays the second as a number without leading zeros (for example, 12:15:5). Use %s if this is the only character in your user-defined numeric format.
|
|
ss
|
Displays the second as a number with leading zeros (for example, 12:15:05).
|
|
F
|
Displays fractions of seconds. For example ff will display hundredths of seconds, whereas ffff will display ten-thousandths of seconds. You may use up to seven f symbols in your user-defined format. Use %f if this is the only character in your user-defined numeric format.
|
|
T
|
Uses the 12-hour clock and displays an uppercase A for any hour before noon; displays an uppercase P for any hour between noon and 11:59 P.M. Use %t if this is the only character in your user-defined numeric format.
|
|
tt
|
Uses the 12-hour clock and displays an uppercase AM with any hour before noon; displays an uppercase PM with any hour between noon and 11:59 P.M.
|
|
y
|
Displays the year number (0-9) without leading zeros. Use %y if this is the only character in your user-defined numeric format.
|
|
yy
|
Displays the year in two-digit numeric format with a leading zero, if applicable.
|
|
yyy
|
Displays the year in four digit numeric format.
|
|
yyyy
|
Displays the year in four digit numeric format.
|
|
z
|
Displays the timezone offset without a leading zero (for example, -8). Use %z if this is the only character in your user-defined numeric format.
|
|
zz
|
Displays the timezone offset with a leading zero (for example, -08)
|
|
zzz
|
Displays the full timezone offset (for example, -08:00)
|
Example
The following are examples of user-defined date and time formats for December 7, 1958, 8:50 PM, 35 seconds:
|
Format
|
Displays
|
|
M/d/yy
|
12/7/58
|
|
d-MMM
|
7-Dec
|
|
d-MMMM-yy
|
7-December-58
|
|
d MMMM
|
7 December
|
|
MMMM yy
|
December 58
|
|
hh:mm tt
|
08:50 PM
|
|
h:mm:ss t
|
8:50:35 P
|
|
H:mm
|
20:50
|
|
H:mm:ss
|
20:50:35
|
|
M/d/yyyy H:mm
|
12/7/1958 20:50
|
|
Visual Basic Language Reference
|
|
User-Defined Numeric Formats (Format Function)
The following table identifies characters you can use to create user-defined number formats. These may be used to build the style argument for the Format function:
|
Character
|
Description
|
|
None
|
Displays the number with no formatting.
|
|
(0)
|
Digit placeholder. Displays a digit or a zero. If the expression has a digit in the position where the zero appears in the format string, display it; otherwise, displays a zero in that position.
If the number has fewer digits than there are zeros (on either side of the decimal) in the format expression, displays leading or trailing zeros. If the number has more digits to the right of the decimal separator than there are zeros to the right of the decimal separator in the format expression, rounds the number to as many decimal places as there are zeros. If the number has more digits to the left of the decimal separator than there are zeros to the left of the decimal separator in the format expression, displays the extra digits without modification.
|
|
(#)
|
Digit placeholder. Displays a digit or nothing. If the expression has a digit in the position where the # character appears in the format string, displays it; otherwise, displays nothing in that position.
This symbol works like the 0 digit placeholder, except that leading and trailing zeros aren't displayed if the number has fewer digits than there are # characters on either side of the decimal separator in the format expression.
|
|
(.)
|
Decimal placeholder. The decimal placeholder determines how many digits are displayed to the left and right of the decimal separator. If the format expression contains only # characters to the left of this symbol; numbers smaller than 1 begin with a decimal separator. To display a leading zero displayed with fractional numbers, use zero as the first digit placeholder to the left of the decimal separator. In some locales, a comma is used as the decimal separator. The actual character used as a decimal placeholder in the formatted output depends on the number format recognized by your system. Thus, You should use the period as the decimal placeholder in your formats even if you are in a locale that uses a comma as a decimal placeholder. The formatted string will appear in the format correct for the locale.
|
|
(%)
|
Percent placeholder. Multiplies the expression by 100. The percent character (%) is inserted in the position where it appears in the format string.
|
|
(,)
|
Thousand separator. The thousand separator separates thousands from hundreds within a number that has four or more places to the left of the decimal separator. Standard use of the thousand separator is specified if the format contains a thousand separator surrounded by digit placeholders (0 or #). A thousand separator immediately to the left of the decimal separator (whether or not a decimal is specified) or as the rightmost character in the string means "scale the number by dividing it by 1,000, rounding as needed."
For example, you can use the format string "##0,." to represent 100 million as 100,000. Numbers smaller than 1,000 but greater or equal to 500 are displayed as 1, and numbers smaller than 500 are displayed as 0. Two adjacent thousand separators in this position scale by a factor of 1 million, and an additional factor of 1,000 for each additional separator.
Multiple separators in any position other than immediately to the left of the decimal separator or the rightmost position in the string are treated simply as specifying the use of a thousand separator. In some locales, a period is used as a thousand separator. The actual character used as the thousand separator in the formatted output depends on the Number Format recognized by your system. Thus, You should use the comma as the thousand separator in your formats even if you are in a locale that uses a period as a thousand separator. The formatted string will appear in the format correct for the locale.
|
|
(:)
|
Time separator. In some locales, other characters may be used to represent the time separator. The time separator separates hours, minutes, and seconds when time values are formatted. The actual character used as the time separator in formatted output is determined by your system settings.
|
|
(/)
|
Date separator. In some locales, other characters may be used to represent the date separator. The date separator separates the day, month, and year when date values are formatted. The actual character used as the date separator in formatted output is determined by your system settings.
|
|
(E- E+ e- e+)
|
Scientific format. If the format expression contains at least one digit placeholder (0 or #) to the left of E-, E+, e-, or e+, the number is displayed in scientific format and E or e is inserted between the number and its exponent. The number of digit placeholders to the left determines the number of digits in the exponent. Use E- or e- to place a minus sign next to negative exponents. Use E+ or e+ to place a minus sign next to negative exponents and a plus sign next to positive exponents. You must also include digit placeholders to the right of this symbol to get correct formatting.
|
|
- + $ ( )
|
Literal characters. These characters are displayed exactly as typed in the format string. To display a character other than one of those listed, precede it with a backslash (\) or enclose it in double quotation marks (" ").
|
|
(\)
|
Displays the next character in the format string. To display a character that has special meaning as a literal character, precede it with a backslash (\). The backslash itself isn't displayed. Using a backslash is the same as enclosing the next character in double quotation marks. To display a backslash, use two backslashes (\\).
Examples of characters that can't be displayed as literal characters are the date-formatting and time-formatting characters (a, c, d, h, m, n, p, q, s, t, w, y, /, and :), the numeric-formatting characters (#, 0, %, E, e, comma, and period), and the string-formatting characters (@, &, <, >, and !).
|
|
("ABC")
|
Displays the string inside the double quotation marks (" "). To include a string in the style argument from within code, you must use Chr(34) to enclose the text (34 is the character code for a quotation mark (")).
|
Example
The following table contains some sample format expressions for numbers. (These examples all assume that your system's locale setting is English-U.S.) The first column contains the format strings for the Style argument of the Format function; the other columns contain the resulting output if the formatted data has the value given in the column headings.
|
Format (Style)
|
"5" formatted as
|
"-5" formatted as
|
"0.5" formatted as
|
|
Zero-length string ("")
|
5
|
-5
|
0.5
|
|
0
|
5
|
-5
|
1
|
|
0.00
|
5.00
|
-5.00
|
0.50
|
|
#,##0
|
5
|
-5
|
1
|
|
$#,##0;($#,##0)
|
$5
|
($5)
|
$1
|
|
$#,##0.00;
($#,##0.00)
|
$5.00
|
($5.00)
|
$0.50
|
|
0%
|
500%
|
-500%
|
50%
|
|
0.00%
|
500.00%
|
-500.00%
|
50.00%
|
|
0.00E+00
|
5.00E+00
|
-5.00E+00
|
5.00E-01
|
|
0.00E-00
|
5.00E00
|
-5.00E00
|
5.00E-01
|
Posted on February 26, 2008 11:27
Purpose
The scope of this document is to address the questions and provide best practices related to creating Data Sources for SQL Server Reporting Services (“SSRS”).
When requesting the creation of a Data Source for SSRS, the requestor must make several decisions regarding the configuration of the data source. This document covers those decisions and provides information and advice for the decision maker.
Overview
The SSRS data source defines a connection to data as a string of text stored either in the report definition file or in a separate data source file which can be shared among several reports. SSRS supports data sources that include most databases accessible with ODBC connectivity and all OLE DB providers.
The developer will provide the following information:
Work Header Information
- Add Data Source:
- Change Existing Data Source:
- Data Source Business Area
- Data Source Environment
- Development
- System Test
- Quality Assurance
- Production
- All
- Name/Folder Name/Location for New/Existing Data Source
- Specify name of Data Source
- Specify Folder location for Data Source
- Specify Server name for Data Source
Add/Change Data Source Details(see actual Reporting Services form below)
Note: If you are requesting for more than one environment (Dev, System Test, QA, Production), the following information must be provided for each environment, unless all of the details are the same.
.
- Data Source Description: (Must include contact information for support, formatted as follows )
- Support: (Place a pager/email group. If no pager/email group, then Person name, email, phone, and Alternate Person name, email and Phone)
- Data Access: (Only if different from above, place a pager/email group. If no pager/email group, then Person name, email, phone, and Alternate Person name, email and Phone)
- Hide in List View: Yes/No
- Enable this Data Source: Yes/No
- Connection Type:
- Microsoft SQL Server
- Oracle
- DB2
- OLE DB provider
- ODBC
- Microsoft SQL Server Analysis services
- XML
- Report Server Model
- Connection String(Depends on Data Source)
- Database Name on the Specified Server (if applicable)
- Server name(URL) where database(File) is located (Optional-based upon type of data source)
- Connect Using:
- Windows Integrated Security
- Credentials Stored Securely in the Report Server
- Process Id
- Password
- Use as Windows Credentials when connecting to the data source: Yes/No
- Impersonate the authenticated user after a connection has been made to the data source: Yes/No
- Credentials Supplied by the user running the Report
- Display text to prompt user for user name and password:
- Use as Windows Credentials when connecting to the data source: Yes/No
- Credentials are not required.
|

Wayne Snyder
|