Showing posts with label SSRS. Show all posts
Showing posts with label SSRS. Show all posts

Tuesday, September 24, 2013

SSRS (Reporting Services), Scale Out, Clusters, or NLB, ...

The question around installing Reporting Services as part of a SQL Cluster install with attention to the fact that SSRS is not cluster aware and utilizing NLB if you want to do it (even though it's not recommended) ended up in the following URL which I would like to share here.

Share/Bookmark

Thursday, September 19, 2013

SSRS Line Spacing

LineHeight property of Textbox control works just when the report renders in HTML format, to control line spacing in a Multi line textbox which carries a long text who handles auto text wrap up doesn't functions correctly.

Vote up for the following item in Microsoft Connect:
https://connect.microsoft.com/SQLServer/feedback/details/557661/line
Share/Bookmark

Tuesday, September 10, 2013

Enable/Disable - SSRS Export Types

SSRS supports exporting to different formats when you view the report through a drop-down list. Report services server configuration file which is available in the following path allows to control the list:
C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\rsreportserver.config

Inside the <Render> tag elements, the Extension names have Visible attribute which changing them to true will make the Extension visible in the Export list.
Example:


Share/Bookmark

Wednesday, August 28, 2013

Query all SSRS Reports, shared and embeded Datasources, and locations

As the SSRS reports details are available in ReportServer DB, sometime that's a good idea to take a look into reports' detail such as data sources which in some point may help to make a better decision to keep them embedded or utilize a shared one.

By customizing the folllowing script easily more information can be queried.

Use ReportServer GO ;WITH SSRS_Rprt_DtaSrc AS ( SELECT Catalog.Name AS [Report Name] , Catalog.path AS [Report Location] , DataSource.Name AS [Data Source Name] , DataSource.Link AS Link FROM [Catalog] INNER JOIN DataSource ON Catalog.ItemID = DataSource.ItemID ) SELECT [Report Name] , [Report Location] , [Data Source Name] , Ctlg.Name AS [Data Source Item] FROM SSRS_Rprt_DtaSrc INNER JOIN [Catalog] AS Ctlg ON SSRS_Rprt_DtaSrc.Link = Ctlg.[ItemID] ORDER BY [Report Location]

Share/Bookmark

Wednesday, August 14, 2013

ASP.NET MVC and SQL Server Reporting Services

ASP.NET MVC and SQL Server Reporting Services If you need to view a SSRS type report in ASP.NET MVC application one way would be to have a Controller action method to launch report and an ASP.NET Web Form to host the Report Viewer control. Then the action method redirects to the .aspx page which contains the report viewer control and passes necessary parameters for report's query filter. The sample code is as following:

".ASPX web form page who contains ReportViewer control"
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="768px" ProcessingMode="Remote" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="1024px"> <ServerReport ReportPath="/REPORTS_FOLDER/REPORT_NAME" ReportServerUrl="http://YOUR_SSRS_SERVER/reportserver" /> </rsweb:ReportViewer> </form> </body> </html>

using System.Web.UI; using System.Web.UI.WebControls; using Microsoft.Reporting.WebForms; ... protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { var rprtPrms = (Dictionary) Session["reportParameters"]; foreach (var item in rprtPrms) { ReportViewer1.ServerReport.SetParameters( new List() { new ReportParameter(item.Key, item.Value.ToString()) } ); } } }

"The action in the controller"
public ActionResult Index() { var rprtPrms = new Dictionary(); rprtPrms.Add("MyReportParameter", 6); Session["reportParameters"] = rprtPrms; return Redirect("/RprtViewer.aspx"); }

Share/Bookmark

Tuesday, August 13, 2013

SSRS Report - Showing Header objects only on First Page

To hide the header objects (textboxes, images) that hold the header information on pages other than first one it's possible to control visibility of objects by a conditional expression lok like the following one:
=iif(Globals!PageNumber = 1, FALSE, TRUE)

The expression property will be accessible with below steps:
right-click on the header object (Image, text box) -> choose properties -> visibility -> select "Show or hide based on expression" -> insert expression above


Share/Bookmark

Adding a Page Break after a Sub-report (SSRS report)

I needed to break the page after a sub-report to force the next sub report to be shown in next page.

One way which was fit for my case comes simply as following:

- Added a rectangle onto my report and position it just below the sub-report.
- Resized the rectangle to only one pixel tall.
- In properties windows of the Rectangle object, set the PageBreak->BreakLocation property to Start.


Share/Bookmark