<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Direct Reports : Tips</title><link>http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx</link><description>Tags: Tips</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Marquee Moon (Field References in Page Headers and Footers)</title><link>http://blogs.msdn.com/bwelcker/archive/2007/06/19/marquee-moon-field-references-in-page-headers-and-footers.aspx</link><pubDate>Wed, 20 Jun 2007 09:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3418250</guid><dc:creator>bwelcker</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/3418250.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=3418250</wfw:commentRss><description>One of the questions that I get often is about putting database fields in their SSRS report page header and/or footer. Note that putting fields in the page header and footer is not the same as putting a data region in these sections. Because of the impact...(&lt;a href="http://blogs.msdn.com/bwelcker/archive/2007/06/19/marquee-moon-field-references-in-page-headers-and-footers.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3418250" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/bwelcker/attachment/3418250.ashx" length="55611" type="application/octet-stream" /><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category></item><item><title>At the End of Paths Taken (Modifying Where Clause when All Parameter Values are Selected)</title><link>http://blogs.msdn.com/bwelcker/archive/2007/05/19/at-the-end-of-paths-taken-modifying-where-clause-when-all-parameter-values-are-selected.aspx</link><pubDate>Sat, 19 May 2007 23:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2738717</guid><dc:creator>bwelcker</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/2738717.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=2738717</wfw:commentRss><description>&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With&amp;nbsp;the&amp;nbsp;&lt;A href="http://blogs.msdn.com/bwelcker/archive/2006/08/14/700189.aspx" mce_href="http://blogs.msdn.com/bwelcker/archive/2006/08/14/700189.aspx"&gt;return of “Select All”&lt;/A&gt; in Service Pack 2, all multi-value parameters&amp;nbsp;allow the user to pick all of the available values. But what if you want to remove the predicate from your WHERE clause instead of generating a long set of values in the IN predicate?&lt;/P&gt;
&lt;P&gt;You can accomplish this is via an expression-based query and an internal parameter. 
&lt;P&gt;First, create a second parameter in your report. It should be have a new name, multi-valued, use the same valid values query and the default values set to the valid values query as well. In addition, mark the "internal" flag in the parameters dialog so it is not displayed to the user. 
&lt;P&gt;Next, change your main report query to an conditional expression that compares the number of selected values to the number of available values (which will always be selected in the new parameter). For example: 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;="SELECT Hour, Month, Year, Username, Sitename, Cookie FROM dbo.GlobalIISLog " &amp;amp;&amp;nbsp;IIF(Parameters!ComputerName.Count = Parameters!AllComputerNames.Count,"", " WHERE (sComputername IN (@ComputerName))") &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;I have attached a sample report that demonstrates this technique.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2738717" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/bwelcker/attachment/2738717.ashx" length="60386" type="application/octet-stream" /><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/SP2/default.aspx">SP2</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item><item><title>Wincing the Night Away (Tips for SSRS in SharePoint Mode)</title><link>http://blogs.msdn.com/bwelcker/archive/2007/02/04/wincing-the-night-away-tips-for-ssrs-in-sharepoint-mode.aspx</link><pubDate>Mon, 05 Feb 2007 00:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1600052</guid><dc:creator>bwelcker</dc:creator><slash:comments>25</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/1600052.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=1600052</wfw:commentRss><description>&lt;P&gt;Here is some useful information about using SSRS in SharePoint Integrated mode (included with SP2): &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Installing the SharePoint Add-In&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If you plan to upgrade from a previous version of the add-in, you should uninstall the previous add-in then install the new one. After installing the new one, you will need to perform the RS configuration steps in SharePoint Central Administration again.&lt;/LI&gt;
&lt;LI&gt;If you have trouble with the install, take a look at the log files. In addition to the MSI install log, the Add-In also creates another log file named RS_SP_&amp;lt;number&amp;gt;.log. Both logs are found in the "&amp;lt;Drive&amp;gt;:\Documents and Settings\&amp;lt;User_Name&amp;gt;\Local Settings\Temp" folder.&lt;/LI&gt;
&lt;LI&gt;There is a known issue with the naming ReportServer.&amp;lt;culture&amp;gt;.resx files that are install as part of CTP3 in each SharePoint web sites' App_GlobalResources folder. After installing CTP3 this issue manifests itself as the following errors when you try to access any SharePoint web site:&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Server Error in '/' Application.&lt;BR&gt;Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To solve this, check the following in IIS Manager for each SharePoint web site: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Explore into &amp;lt;Web site&amp;gt;\App_GlobalResources &lt;/LI&gt;
&lt;LI&gt;Do you see any Reportserver.&amp;lt;culture&amp;gt;.resx files (where culture is a string like EN / FR/ CS etc.)? &lt;/LI&gt;
&lt;LI&gt;If yes, then delete all Reportserver.&amp;lt;culture&amp;gt;.resx except for ReportServer.resx file.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Deploying Reports to Report Server that is in SharePoint Mode&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use the updated Report Designer that ships with SQL 2005 SP2 CTP. &lt;/LI&gt;
&lt;LI&gt;Deployment paths need to change for deploying to a SharePoint Document Library with settings something like this:&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;TargetDataSourceFolder: &lt;A href="http://%3cmyserver%3e/%3CmySharePointsite%3E/%3Cmy_DataSource_Folder%3E/" mce_href="http://%3cmyserver%3e/%3CmySharePointsite%3E/%3Cmy_DataSource_Folder%3E/"&gt;http://&amp;lt;MyServer&amp;gt;/&amp;lt;mySharePointsite&amp;gt;/&amp;lt;my_DataSource_Folder&amp;gt;/&lt;/A&gt;&lt;BR&gt;TargetReportFolder:&amp;nbsp;&amp;nbsp; &lt;A href="http://%3cmyserver%3e/%3CmySharePointsite%3E/%3Cmy_Report_Folder%3E/" mce_href="http://%3cmyserver%3e/%3CmySharePointsite%3E/%3Cmy_Report_Folder%3E/"&gt;http://&amp;lt;MyServer&amp;gt;/&amp;lt;mySharePointsite&amp;gt;/&amp;lt;my_Report_Folder&amp;gt;/&lt;/A&gt;&lt;BR&gt;TargetServerURL: &lt;A href="http://%3cmyserver%3e/%3CmySharePointsite%3E/" mce_href="http://%3cmyserver%3e/%3CmySharePointsite%3E/"&gt;http://&amp;lt;MyServer&amp;gt;/&amp;lt;mySharePointsite&amp;gt;/&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;If you see a login screen when deploying reports, inspect the web.config fle of the SharePoint web site for the following entry:&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;location path="_vti_bin/ReportServer/ReportServiceAuthentication.asmx"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;system.web&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;authorization&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;allow users="*" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/authorization&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/system.web&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/location&amp;gt;&lt;/P&gt;
&lt;P&gt;Make sure there is only one such entry in the web.config file. Delete any duplicates. Next retry deploying. This is a known issue in the CTP release that we are fixing for RTM.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1600052" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/SP2/default.aspx">SP2</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item><item><title>Today! (Cleaning up Reporting Services SharePoint Add-In Setup Problems)</title><link>http://blogs.msdn.com/bwelcker/archive/2006/11/09/today-cleaning-up-reporting-services-sharepoint-add-in-setup-problems.aspx</link><pubDate>Thu, 09 Nov 2006 21:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1044720</guid><dc:creator>bwelcker</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/1044720.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=1044720</wfw:commentRss><description>&lt;P&gt;Some people have had problems during installation of&amp;nbsp;the new &lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4e50be6e-3f92-4552-a78c-b3be1d94d5da&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4e50be6e-3f92-4552-a78c-b3be1d94d5da&amp;amp;DisplayLang=en"&gt;Reporting Services Add-in for Microsoft SharePoint&lt;/A&gt;. If the add-in setup fails while to add the Reporting Services feature to the sites, some of your SharePoint sites will no longer work.&amp;nbsp; You can tell if the custom action failed by looking for a file named RS_SP_#.log in your %temp% directory.&amp;nbsp; If you have a log file there and your install failed, you will need to manually clean up your web.config files to get SharePoint up and running again.&lt;/P&gt;
&lt;P&gt;First, you will need to locate the SharePoint virtual directories on your server.&amp;nbsp; Typically these are&amp;nbsp;located at c:\inetpub\wwwroot\wss\VirtualDirectories. This folder contains several folders with names which are numbers representing the ports used by your SharePoint sites.&amp;nbsp; In each folder you will need to remove the following entries from the web.config file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SafeControl Assembly="Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.ReportingServices.SharePoint.UI.WebParts" TypeName="*" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SafeControl Assembly="Microsoft.ReportingServices.SharePoint.UI.ServerPages, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.ReportingServices.SharePoint.UI" TypeName="*" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add verb="*" path="Reserved.ReportViewerWebPart.axd" type="Microsoft.ReportingServices.SharePoint.UI.WebParts.WebPartHttpHandler, Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add verb="*" path="_vti_bin/ReportServer" type="Microsoft.ReportingServices.SharePoint.Soap.RSProxyHttpHandler, RSSharePointSoapProxy, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /&amp;gt;&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;lt;location path="_vti_bin/ReportServiceAuthentication.asmx"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;system.web&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;authorization&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;allow users="*" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/authorization&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/system.web&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/location&amp;gt;&lt;/P&gt;
&lt;P&gt;Once you remove these lines, save the file.&amp;nbsp; You must do this for every web.config file under the above directory.&lt;/P&gt;
&lt;P&gt;To get around the issue, you need to add the user who is running setup as one of the Site Collection administrators before you run the setup. You can do this though the Site Adminstration page.&lt;/P&gt;
&lt;P&gt;This is a known issue with our CTP2 setup and has been addressed in CTP3.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1044720" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/SP2/default.aspx">SP2</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Reporting+Services/default.aspx">Reporting Services</category></item><item><title>End of Amnesia (Avoiding Divide By Zero Errors)</title><link>http://blogs.msdn.com/bwelcker/archive/2006/09/26/End-of-Amnesia-_2800_Avoiding-Divide-By-Zero-Errors_2900_.aspx</link><pubDate>Tue, 26 Sep 2006 19:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:772650</guid><dc:creator>bwelcker</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/772650.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=772650</wfw:commentRss><description>&lt;P&gt;People often ask how to avoid divide by zero problems in their Reporting Services reports. Let's say you have a textbox that calculates profit margin via the expression:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;=Fields!Price.Value / Fields!Cost.Value&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This works fine unless a value in the Cost field is zero (and is not an integer or double), in which case you will get '#error' displayed in your report. This is because a divide by zero with a decimal field will throw an exception. This exception is caught by the&amp;nbsp;report processing&amp;nbsp;engine&amp;nbsp;and&amp;nbsp;#error is&amp;nbsp;displayed.&amp;nbsp;If&amp;nbsp;you would rather have a string like "N/A" instead of #error, you might think about creating a Reporting Services expression using the &lt;STRONG&gt;IIf &lt;/STRONG&gt;function:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;=IIf(Fields!Cost.Value = 0, "N/A", Fields!Price.Value / Fields!Cost.Value)&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But when you preview the report, you still see #error in your report. What gives?&lt;/P&gt;
&lt;P&gt;If you take a look at the &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctiif.asp" mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctiif.asp"&gt;IIf function description in the Visual Basic documentation&lt;/A&gt;, you will see the following:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;As part of preparing the argument list for the call to &lt;B&gt;IIf&lt;/B&gt;, the Visual Basic compiler calls every function in every expression. This means that you cannot rely on a particular function not being called if the other argument is selected by &lt;I&gt;Expression&lt;/I&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This means that even through the value for cost is zero, the error will still be generated. So how do you work around this? You have to force the expression evaluation to avoid the division with a nested &lt;STRONG&gt;IIf&lt;/STRONG&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;=IIf(Fields!Cost.Value = 0, "N/A", Fields!Price.Value / IIf(Fields!Cost.Value = 0, 1, Fields!Cost.Value))&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The nested &lt;STRONG&gt;IIf&lt;/STRONG&gt; is evaluated first so that the divide by zero can be avoided but is not used by the outer expression if it is zero.&lt;/P&gt;
&lt;P&gt;As an interesting side note, the &lt;A href="http://msdn2.microsoft.com/en-us/library/b6ex274z.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/b6ex274z.aspx"&gt;Arithemtic Operators topic in the Visual Basic documentation&lt;/A&gt;&amp;nbsp;seems to say that a&amp;nbsp;DivideByZeroException is&amp;nbsp;thrown for dividing by anything but the Double data type. I have not found this to be the case. Try this simple application in VB:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Dim a,&amp;nbsp;b As Integer&lt;BR&gt;a&amp;nbsp;= 1&lt;BR&gt;b&amp;nbsp;= 0&lt;BR&gt;MsgBox (a / b)&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will get "Infinity", despite what the documentation says. Anyway, the use of the expression above in your report&amp;nbsp;will ensure that you will get the desired results, no matter what data type you are using.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=772650" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category></item><item><title>Alien Lanes (Logical and Physical Pagination Rules)</title><link>http://blogs.msdn.com/bwelcker/archive/2005/08/19/Alien-Lanes-_2800_Logical-and-Physical-Pagination-Rules_2900_.aspx</link><pubDate>Fri, 19 Aug 2005 17:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:454043</guid><dc:creator>bwelcker</dc:creator><slash:comments>46</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/454043.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=454043</wfw:commentRss><description>&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;One&amp;nbsp;of the things I see people getting confused about in&amp;nbsp;Reporting Services is around page&amp;nbsp;sizing.&amp;nbsp;Not setting the correct properties can result in extra blank pages or improper paper orientation.&amp;nbsp;Here are some general guidelines for setting page sizes.&lt;/P&gt;
&lt;P&gt;The rules around page sizing depend on whether you are talking about physical pagination (used by the print control and the&amp;nbsp;TIFF and PDF rendering extensions) or logical pagination (used by the HTML and GDI rendering extensions). &lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;For rendering formats that render physical pages, set the &lt;STRONG&gt;PageHeight&lt;/STRONG&gt; and &lt;STRONG&gt;PageWidth&lt;/STRONG&gt; properties for the report to control the pagination. These can be set in the &lt;A href="http://home.ripway.com/2005-6/332074/PageLayout.PNG" mce_href="http://home.ripway.com/2005-6/332074/PageLayout.PNG"&gt;Report Properties dialog&lt;/A&gt; (available under the Report menu) along with &lt;STRONG&gt;LeftMargin&lt;/STRONG&gt;, &lt;STRONG&gt;RightMargin&lt;/STRONG&gt;, &lt;STRONG&gt;BottomMargin&lt;/STRONG&gt;, and &lt;STRONG&gt;TopMargin&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;One thing that is important to know is that setting the &lt;STRONG&gt;Body&lt;/STRONG&gt; size at design time is not generally useful in controlling pagination. The body is simply the container for the collection of objects on the report. The design time size of the body represents the smallest amount of space that will be taken up by the report. However, if any objects grow as they are filled with data, the body will expand to contain them. Mostly, the body will grow taller (tables, lists, and textboxes are a few of the items that will cause vertical growth) but can also grow wider (matrices and autosized images can cause horizontal growth).&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;So, when does a physical&amp;nbsp;page break occur? When the runtime size of the body (plus the page header and footer size, if they are defined) exceeds the&amp;nbsp;specified page size (minus the margins). It's important to understand that controls on the page that don't look like they contain any information (a wide textbox) can cause a blank page to be added to the report if it exceeds the page boundaries. Page breaks can also be specified explicitly before or after instances of report items (rectangles, groups, data regions). There are also certain situations were we ignore explicit page breaks (e.g. inside subreports).&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;So what defines a portrait vs.&amp;nbsp;landscape report? If the &lt;STRONG&gt;PageHeight &lt;/STRONG&gt;is less than the &lt;STRONG&gt;PageWidth&lt;/STRONG&gt;, then it is landscape, otherwise it is portrait. It is important to understand that Reporting Services has no notion of the rotation of the paper in the printer. It is up to the applications that consume the output (Acrobat reader, print control) to determine the correct printer settings to best render the specified page size.&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;Note that the &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_soapapi_dev_5l7q.asp" mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_soapapi_dev_5l7q.asp"&gt;DeviceInfo settings &lt;/A&gt;can be used at report rendering time to override the page sizes in the definition. This is how the client print control works when you change margins or page size. In SP2 and SQL 2005 Reporting Services, the default page sizes are extracted from the definition at publish time and written to the ReportServer database as custom properties on the report. While you can programmatically change these via the &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_61is.asp" mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_61is.asp"&gt;SetProperties &lt;/A&gt;method on the web service, they will be overwritten if the report is republished (unlike parameter and datasource information).&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;Logical pagination is a little bit different. In SQL 2000 Reporting Services, interactive rendering formats used the same&amp;nbsp;&lt;STRONG&gt;PageHeight&lt;/STRONG&gt; property to determine page breaks.&amp;nbsp;Since there is no real page boundaries on web pages, it is only used as a guidelines to reduce&amp;nbsp;the amount of data to put on a single page.&amp;nbsp;SQL 2005 Reporting Services introduces the &lt;STRONG&gt;InteractiveHeight&lt;/STRONG&gt; and &lt;STRONG&gt;InteractiveWidth&lt;/STRONG&gt; properties to determine logical page breaks. Actually, &lt;STRONG&gt;InteractiveWidth&lt;/STRONG&gt; is not used at all but may be in a future release. The nice thing about this is that if you don't want pagination in the web at all, you can set &lt;STRONG&gt;InteractiveHeight&lt;/STRONG&gt; to 0 and the processing engine will produce your report as a single logical page.&lt;/P&gt;
&lt;P&gt;The Excel rendering format does not explictly support pagination. The page size and margins are&amp;nbsp;mapped into the Excel document&amp;nbsp;for printing within Excel.&amp;nbsp;For these reports, you will need to specifically include page breaks to break the report into multiple worksheets.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=454043" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category></item><item><title>All Mod Cons (Multilingual Reports with AS2005)</title><link>http://blogs.msdn.com/bwelcker/archive/2005/07/03/all-mod-cons-multilingual-reports-with-as2005.aspx</link><pubDate>Mon, 04 Jul 2005 04:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:435130</guid><dc:creator>bwelcker</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/435130.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=435130</wfw:commentRss><description>&lt;P&gt;Based on feedback from a couple of folks, I've decided to make my post titles a bit more descriptive. I'll still use the name of one of the albums in my music collection as the primary title but will also include a description of the actual content of the post (happy, Jason?). &lt;/P&gt;
&lt;P&gt;Anyway, one of the cool new features of SQL 2005 Analysis Services is &lt;A href="http://whidbey.msdn.microsoft.com/library/default.asp?url=/library/en-us/uas9/html/018471e0-3c82-49ec-aa16-467fb58a6d5f.asp?frame=true"&gt;translations&lt;/A&gt;. This lets you provide language&amp;nbsp;translations&amp;nbsp;for both the data and the metadata in your cube. When an application connect to the server, it can provide the Locale ID (LCID) of the desired language&amp;nbsp;in the connection string. If the translation is not done, it will use the default one.&lt;/P&gt;
&lt;P&gt;To get this working, provide a parameter that allows you to select the language. You could just as easliy bind it to the User!Language global to get the language of the current users. One of the tricks is that Reporting Services uses Language names instead of LCIDs. I had to write a custom function to translate between them:&lt;/P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" face="Courier New"&gt;Public Function GetLCID(Name As String) As Integer&lt;BR&gt;&amp;nbsp;Dim CI As New System.Globalization.CultureInfo(Name) &lt;BR&gt;&amp;nbsp;Return CI.LCID &lt;BR&gt;End Function&lt;/FONT&gt;&lt;BR&gt;
&lt;P&gt;I first designed the report using English and then switched to use the GetLCID function in the connection string.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;="Data Source=localhost;Initial Catalog=""Adventure Works DW"";Locale Identifier=" &amp;amp; Code.GetLCID(Parameters!Language.Value)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Unfortunately, this only works for the data, not the static text. You would need to write some additional custom expressions for the report text. But it should give you a feel for how to leverage this feature in your own reports.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=435130" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Analysis+Services/default.aspx">Analysis Services</category></item><item><title>Perfect From Now On (Custom Chart Legends)</title><link>http://blogs.msdn.com/bwelcker/archive/2005/05/20/perfect-from-now-on-custom-chart-legends.aspx</link><pubDate>Fri, 20 May 2005 10:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:420349</guid><dc:creator>bwelcker</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/bwelcker/comments/420349.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bwelcker/commentrss.aspx?PostID=420349</wfw:commentRss><description>&lt;P&gt;While the legend built into&amp;nbsp;Reporting Services charts is relatively easy to use, it lacks some of the flexibility that you might like to have. One issue is that it takes up space within the chart boundaries, making the plot area smaller as the number of series grows.&amp;nbsp;So how can you get more control over the legend? Roll your own!&lt;/P&gt;
&lt;P&gt;The trick here is to replace the legend inside the chart with a table data region beside the chart bound to the same data set. First create a custom function to return a series color based on the group value. To be consistent, the function should use a hash table to map the same value to the same color:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Private colorPalette As String() = {"Green", "Blue", "Red", "Orange", "Aqua", "Teal", "Gold", "RoyalBlue", "#A59D93", "#B8341B", "#352F26", "#F1E7D6", "#E16C56", "#CFBA9B"}&lt;BR&gt;Private count As Integer = 0&lt;BR&gt;Private mapping As New System.Collections.Hashtable()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Public Function GetColor(ByVal groupingValue As String) As String&lt;BR&gt;&amp;nbsp; If mapping.ContainsKey(groupingValue) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return mapping(groupingValue)&lt;BR&gt;&amp;nbsp; End If&lt;BR&gt;&amp;nbsp; Dim c As String = colorPalette(count Mod colorPalette.Length)&lt;BR&gt;&amp;nbsp; count = count + 1&lt;BR&gt;&amp;nbsp; mapping.Add(groupingValue, c)&lt;BR&gt;&amp;nbsp; Return c&lt;BR&gt;End Function&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Create your chart and set the series value appropriately. Hide the legend in the chart properties dialog. Now create a table with with two columns and a single row grouped by the group expression used as the graph series. Set the color of the data point in the chart as well as the background color of the first column in the table&amp;nbsp;to:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;=Code.GetColor(Fields!&lt;EM&gt;Series&lt;/EM&gt;.Value)&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thanks to Robert Bruckner for the work on this one. I have atttached a sample report using this technique&amp;nbsp;using the Northwind sample database.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=420349" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/bwelcker/attachment/420349.ashx" length="12185" type="application/octet-stream" /><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://blogs.msdn.com/bwelcker/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category></item></channel></rss>