Friday, 19 July 2013

SSRS Interview Questions

Interview Questions -SSRS

Following are some general questions about SSRS development to see if general working knowledge of SSRS is known.
1) What are the different kinds of SSRS Reports?
Reports can be categorized into operational and analytical reports. The distinction is based on the source of data and level of analysis facilitated by any particular report. Operational reports are based on OLTP sources and are static reports and Analytical reports are based on OLAP sources and generally facilitate drill-down and drill-through for analysis. Technically, SSRS reports can be categorized into parameterized, linked, snapshot, cached, etc…
2) What are parameterized reports? What are cascading parameters in SSRS reports?Reports that accept parameters from users to fetch and report data conditionally, are known as parameterized reports. When you have multiple parameters in a report and values of different parameters are dependent and populated dynamically based on the value of parent parameters, it’s known as a cascading parameter.
3) How would you go about developing a SSRS report?
General development methodology for a SSRS report is to start by creating a data source. Based on the data source create one or multiple datasets as needed for parameters and the body of the report. Add required controls from the toolbox which would act as a container for the fields in the dataset. Format the controls added to the report body. Verify and validate the report and finally deploy the report.
4) What is a dataset and what are the different types of datasets?
A dataset is similar to a query definition, which is executed when the report is executed. Datasets are of two types: Shared and Embedded. An embedded dataset is private to the report in which it exists and shared datasets can be shared across reports.
5) Would you store your query in a SSRS report or a Database server? State the reason why.Storing SQL queries directly in text format in the dataset, should be avoided. Ideally it should be stored in a stored procedure in the database server. The benefit is that the SQL would be in a compiled format in a SP and brings all the benefits of using an SP compared to using an ad-hoc query from the report.
6) What is Tablix?
A Tablix can be seen as a control with combined capabilities of a table and a matrix, which facilitates asymmetric and flexible, row and column level, static and dynamic groupings.
7) How would you access SSRS reports deployed on report server?
Reports Manager is the most straight-forward way to access SSRS reports deployed on report server. Apart from executing the reports, it is the main administration console for SSRS server to manage reports.
8) Have you used the Report Viewer control / web part? What are the limitations?
The report viewer control / web part is the basic control to integrate SSRS reports with external applications. Using these interface applications can link and display SSRS reports within the application. The parameters toolbar in these controls have a limited programmable interface to decorate and blend it with the theme of the application.
9) Which is the latest version of SSRS and what are the new enhancements?
SSRS 2008 R2 is the latest RTM version of SSRS. Rich data visualizations, better programming functions for lookup and aggregation, improved performance and better control over exported data are some of the major enhancements.
10) What is Report Builder?
Report Builder is an ad-hoc report authoring tool primarily targeted to be used by business analysts to facilitate self-service report authoring. Report Builder 3.0 is the latest version available as of date.
11) How would you deploy SSRS Reports using out-of-box functionality and how can you automate SSRS report deployment?
Business Intelligence Development Studio is generally used to deploy SSRS reports. There is no out-of-box support in SSRS to automate reports deployment, but free third-party products like RSScripter can be used for this.
12) What is drill-down and drill-through in SSRS?
Drill-down is a mechanism of decomposing summarized information to a detailed level. Drill-through is a mechanism of decomposing the problem by drilling information generally using more than one report.
SSRS – SQL Server Reporting Services
Q: What is SSRS?
SQL Server Reporting Service is one of the server-based software systems that generate reports developed by Microsoft. It is used for preparing and delivering interactive and variety of printed reports. It is administered through an interface that is web based. Reporting services utilizes a web service interface for supporting and developing of customized reporting applicatons. It can be competed with Crystal Reports and other business intelligent tools.
Q: Explain SSRS Architecture?
Reporting services architecture is comprises of integrated components. It is multi-tiered, included with application, server and data layers. This architecture is scalable and modular. A single installation can be used across multiple computers. It includes the following components: – Report Manager, Reporting Designer, Browser Types Supported by Reporting services, Report server, Report server command line utilities, Report Server Database, Reporting Services Extensibility, Data sources that is supported by Reporting Services.
Q: Explain Reporting Life Cycye?
The Reporting Lifecycle includes – Report designing – The designing is done in Visual Studio Report Designer. It generates a class which embodies the Report Definition. – Report processing – The processing includes binging the report definition with data from the report data source. It performs on all grouping, sorting and filtering calculations. The expressions are evaluated except the page header, footer and section items. Later it fires the Binding event and Bound event. As a result of the processing, it produces Report Instance. Report instance may be persisted and stored which can be rendered at a later point of time. – Report Rendering: Report rendering starts by passing the Report Instance to a specific rendering extension (HTML or PDF formats). The instance of reports is paged if paging supported by output format. The expressions of items are evaluated in the page header and footer sections for every page. As a final step, the report is rendered to the specific output document.
Q: How to finetune Reports?
To tune-up the Reporting Services, follow the below mentioned ways: – Expand the Server or utilizing the reporting services of another database server. For better embedding of report contents, report application’s logic and characteristics can have a duplicate copy of data. – Replication of data continuously. Using nolock, the issues of locking can well be resolved and the performance of the query can be improved. This can be done by using dirty read at the time of duplicating the data is unavailable.
Q: What are Data Driven Subscriptions?
Reporting Services provides data-driven subscriptions so that you can customize the distribution of a report based on dynamic subscriber data. Data-driven subscriptions are intended for the following kinds of scenarios: Distributing reports to a large recipient pool whose membership may change from one distribution to the next. For example distribute a monthly report to all current customers. Distributing reports to a specific group of recipients based on predefined criteria. For example send a sales performance report to the top ten sales managers in an organization.
Q: What is Linked Report?
Q: What are different types of roles provided by SSRS?
Q: Difference between Logical Page an Physical Page in SSRS.
Logical page breaks are page breaks that you insert before or after report items or groups. Page breaks help to determine how the content is fitted to a report page for optimal viewing when rendering or exporting the report. The following rules apply when rendering logical page breaks: Logical page breaks are ignored for report items that are constantly hidden and for report items where the visibility is controlled by clicking another report item. Logical page breaks are applied on conditionally visible items if they are currently visible at the time the report is rendered. Space is preserved between the report item with the logical page break and its peer report items. Logical page breaks that are inserted before a report item push the report item down to the next page. The report item is rendered at the top of the next page. Logical page breaks defined on items in table or matrix cells are not kept. This does not apply to items in lists.
Q: User want only to display only pdf as export option in report Manager. How to acheive this?Q: Name and Describe few console utilities for SSRS?
Q: Name few Endpoints exposed by SSRS 2012?
Q: Describe different Processing Modes offered by SSRS?
Q: When to Use Null Data driven Subscription?
Create a data-driven subscription that uses the Null Delivery Provider. When you specify the Null Delivery Provider as the method of delivery in the subscription, the report server targets the report server database as the delivery destination and uses a specialized rendering extension called the null rendering extension. In contrast with other delivery extensions, the Null Delivery Provider does not have delivery settings that you can configure through a subscription definition.
Q: How can you monitor the report Usage?Q: How does the report manager work in SSRS?
Report manager is a web application. In SSRS it is accessed by a URL. The interface of this Report manager depends on the permissions of the user. This means to access any functionality or perform any task, the user must be assigned a role. A user with a role of full permissions can entire all the features and menus of the report. To configure the report manager, a URL needs to be defined.
Q: What are the Reporting Services components?
Reporting services components assist in development. These processing components include some tools that are used to create, manage and view reports. A report designer is used to create the reports. a report sever is used to execute and distribute reports. a report manager is used to manage the report server.
Q:SQL Server Reporting Services vs Crystal Reports.
Crystal reports are processed by IIS while SSRS have a report server. Caching in Crystal reports is available through cache server. On the other hand, caching in SSRS is available for Report history snapshots. Crystal reports have standards and user defined field labels. SSRS allows only user defined field labels.
Q: What is Report Builder?
Report Builder is a business-user, ad-hoc report design client that allows users to design reports based on the business terms (Report Builder model) they are familiar with, but without needing to understand database schemas or how to write SQL or MDX queries. Report Builder works with both SQL Server and Analysis Services data sources.
Q: How does Report Builder support Analysis Services cubes?
Report Builder supports relational SQL and Analysis Services data sources in SQL Server 2005. To create a model for Analysis Services cube, go to Report Manager or Management Studio, create a data source for your Analysis Services database, and then select the Generate Model option to create the model.
Q: How do users use Report Builder with SQL Server data sources?
While models that provide access to SQL Server Analysis Services are automatically generated on the report server, the Report Builder Model Designer can be used to generate or modify the models that are built on top of SQL Server relational databases. These model-building projects are a new type of project within a Visual Studio–based development shell.
Q: How do I get Report Builder to generate a parameter that can be set by users viewing the report?In the filter dialog box, click the name of the criteria that you would like to prompt the user for when viewing the report. For example, for the criteria Order Year=2000, click Order Year. Select the Prompt option in the drop-down list.
Q: What new data source types were added in SSRS 2012?In addition to the data source types available in SSRS 2005 (SQL Server, Oracle, ODBC, OLE DB), the following have been added in SSRS 2008: SQL Server 2005 Analysis Services SQL Server 2005 Integration Services SQL Server 2005 Report Builder Models XML (through URL and Web services) SAP
Q: How can I add Reporting Services reports to my application?
Visual Studio 2005 (Standard and Enterprise editions) contains a set of freely redistributable Report Viewer controls that make it easy to embed Reporting Services functionality into custom applications. Two versions of the Report Viewer exist, one for rich Windows client applications and one for ASP.NET applications.
Q: Do I need a report server to run reports in my application?In addition to publishing reports to a report server, you can build reports using the Report Designer that is directly integrated with Visual Studio language projects. You can embed reports directly in any Windows Forms or ASP.NET Web application without access to a report server. The data access in embedded reports is a natural extension of the Visual Studio data facilities. Not only can you use traditional databases as a source of data for your reports, you can use object collections as well.
Q: Can you import Microsoft Excel data to SSRS?
Reporting Services does not import data. It only queries data in whatever format it is stored in their native storage system. I will assume that you’re asking whether you can create reports and use Excel spreadsheets as data sources. The answer is Yes, Reporting Services supports a wide variety of data sources, including Excel files. You’ll get the best performance with the built-in native .NET providers but you should be able to connect to any ODBC or OLE-DB data source, whether it comes from Microsoft or a third-party company.
Q: Can we deploy SSRS reports on our personal website?
Your reports can only be deployed on a reporting services site. Your only option for viewing them from other sites is an HTTP link. Some tools, like SharePoint offer controls allowing you to view reports in the context of the other websites, but the report is still deployed to and hosted from reporting services.
Q: Can we use datagrids for our report in SSRS?I’ve got an ASP.NET project that populates a datagrid. I’d like to use the datagrid as my datasource for my report using SQL Server Reporting Services. Is this possible? The simple answer is no. However, nothing’s ever simple. A set of reporting controls was added in Visual Studio 2010 allowing you to report in a dataset, on data that was supplied by you. So, if you retrieved your data into a dataset, bound the datagrid to the dataset so it had data to display, you could then use that dataset as the datasource for the reporting controls. These are then client-side reports, not server reports though.
Q: What are the drawbacks of reporting in SSRS?
For many years, Microsoft had no direct solution for reporting with the SQL Server besides Crystal Reports. Now, they have SQL Server Reporting Services, but it does have several drawbacks. It is still complex to understand the complete functionality and structure of this new component, and many users are still relying on the reporting application they are more familiar with, which is Crystal Reports. Also, components in SSRS like Report Builder and Report Designer are meant for different users for different aspects of the report process, yet complete understanding and exposure to both is important to utilize both functions fully and extensively. There are also issues when exporting very large reports to Microsoft Excel, as it can lead to a loss of data.
Q: Will running SSRS on Windows XP limit the number of users?
Yes, but not because of SSRS. The Internet Information Services (IIS) component of Windows XP only allows a small number of users to connect to the website at once. As SSRS runs via IIS, this would prevent more than a few people from using SSRS at once. Also, the only edition of SSRS that will install on Windows XP is the Developer Edition. This edition can not be used for production use. You need Standard or Enterprise Edition for production use, which requires a Server OS to install on (Windows 2003 Standard, Windows 2008 Standard, etc).
Q: Are there issues when exporting SSRS reports into Microsoft Excel?When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be? Exporting from SSRS is not always perfect, even if you stay within the Microsoft range of products. If you have extra resources, you could splurge for an add-on that offers much better control over exporting to Excel, such as OfficeWriter. From my experience, though, it is usually headers or footers that cause exporting issues. If any of these headers or footers overlap with data columns in your report, you will find that the exported version of the report has merged cells. Also, check columns next to each other to make sure that there is no overlap, as well.
Q: How to send a SSRS report from SSIS?
Often there is a requirement to be able to send a SSRS report in Excel, PDF or another format to different users from a SSIS package one it has finished performing a data load. In order to do this, first you need to create a subscription to the report. You can create a SSRS report subscription from Report Manager. At the report subscription you can mention the report format and the email address of the recipient. When you create a schedule for the SSRS report, a SQL Server Agent Job will be created. From the SSIS, by using sp_start_job and passing the relevant job name you can execute the SSRS report subscription.

Monday, 15 July 2013

Tablix Data Region Cells, Rows, and Columns (Report Builder) and SSRS

SQL Server 2012

4 out of 5 rated this helpful - Rate this topic
To control how the rows and columns of a tablix data region display data in a report, you must understand how to specify rows and columns for detail data, for group data, and for labels and totals. In many cases, you can use the default structures for a table, matrix, or list to display your data. For more information, see Tables (Report Builder and SSRS), Matrices (Report Builder and SSRS), or Lists (Report Builder and SSRS).
A tablix data region displays detail data on detail rows and detail columns and grouped data on group rows and group columns. When you add row groups and column groups to a tablix data region, rows and columns on which to display the data are automatically added. You can manually add and remove rows and columns to customize a tablix data region and control the way your data displays in the report.
To understand how to customize a tablix data region, you should first understand how to interpret the visual cues you see when you select a tablix data region on the design surface.
Note Note
You can create and modify report definitions (.rdl) in Report Builder and in Report Designer in SQL Server Data Tools. Each authoring environment provides different ways to create, open, and save reports and related items. For more information, see Designing Reports in Report Designer and Report Builder (SSRS) on the Web at microsoft.com.
Visual cues on a tablix data region help you work with a tablix data region to display the data you want.

Row and Column Handles

When you select a tablix data region, the row and column handle graphics indicate the purpose of each row and column. Handles indicate rows and columns that are inside a group or outside a group. The following table shows a variety of handle displays.
Icon
Description
Row handle with 3 parallel lines for details row
Only the details group on the row group hierarchy
Row handle with details row and one outer group
One outer group and the child details group
Two parallel brackets showing nested groups
One outer group, one inner group; no details group
2 brackets & 3 stacked lines for nested & details
One outer group, one inner group, and the child details group
One outer group with footer row, one inner group
One outer group with a footer row for totals and one inner group
outer group bracket, inner group bracket, details
One outer group with a footer row for totals, one inner group with a footer row for totals, and one details row
parent header and footer, and also child group
One outer group with a header for labels and a footer for totals, and an inner group; no details group

Group Rows

Rows inside a group repeat once per unique group value and are typically used for aggregate summaries. Rows outside a group repeat once with respect to the group and are used for labels or subtotals. When you select a tablix cell, row and column handles and brackets inside the tablix data region show the groups to which a cell belongs. This figure displays the following visual cues:
  • Row and column handles that indicate group associations.
  • Highlighted group indicators that show the innermost group membership for a selected cell.
  • Group indicators that show all group memberships for a selected cell.
Table with detail and nested row groups

Total Rows

After you add row and column groups, you can add a row to display totals for columns and a column to display totals for rows. The following figure shows a matrix with both row and column groups, and a total row and a total column.
Tablix data region

Grouping Pane

The Grouping pane displays the row and column groups for the currently selected tablix data region on the design surface. The following figure shows the Grouping pane for this tablix data region.
Grouping pane for nested row and column groups
The Row Groups pane shows the parent group Category and child group Subcat. The Column groups pane shows the parent group Geography and child group CountryRegion, and also the Year group, which is an adjacent group to the Geography group. When you select the Subcat group in the Row Groups pane, the group bar turns a darker shade of orange, and the corresponding row group member cell is selected on the design surface.
Rows and row groups and columns and column groups have identical relationships. The following discussion describes how to add rows to display detail and group data on rows in a tablix data region, but the same principles apply to adding columns to display detail and grouped data.
For each row in a tablix data region, a row is either inside or outside each row group. If the row is inside a row group, it repeats once for every unique value of the group, known as a group instance. If the row is outside a row group, it repeats only once in relation to that group. Rows outside all row groups are static and repeat only once for the data region. For example, a table header or footer row is a static row. Rows that repeat with at least one group are dynamic.
When you have nested groups, a row can be inside a parent group but outside a child group. The row repeats for every group value in the parent group, but displays only once in relation to the child group. To display labels or totals for a group, add a row outside the group. To display data that changes for every group instance, add a row inside the group.
When you have detail groups, each detail row is inside the detail group. The row repeats for every value in the dataset query result set.
For more information about group hierarchies, see Understanding Groups (Report Builder and SSRS).
The following figure shows a tablix data region with nested row groups and a details group.
Design view, add total rows to group and table
For a tablix data region that displays detail data, the details group is the innermost child group. Rows that you add to a details group repeat once per row in the result set for the query for the dataset linked to this tablix data region. The following figure shows the last page of the rendered report. In this figure, you can see the last detail rows and the subtotal row for the last order.
Preview, Table with Group Totals, last rows
For each column in a tablix data region, the same principles apply. For example, a column is either inside or outside each column group; to display totals, add a column outside the group.
To remove rows and columns associated to a group, you can delete the group. When you delete a group, you have the choice between deleting the group definition only or deleting the group and all its associated rows and columns. By deleting just the group, you preserve the row and column layout on the data region. When you delete the group and its related rows and columns, you are deleting all static rows and columns (including group headers and footers) and dynamic rows and columns (including group instances) that are associated with that group.
For step-by-step instructions about adding or deleting rows and columns, see Insert or Delete a Row (Report Builder and SSRS) and Insert or Delete a Column (Report Builder and SSRS).
Tablix cells belong to one of four tablix areas: the tablix body, tablix row or tablix column group areas, or the tablix corner. Although each cell can potentially display any value in the dataset, the default function for each cell is determined by its location. For detailed information about tablix areas, seeTablix Data Region Areas (Report Builder and SSRS).
By default, cells in tablix row and column group areas represent group members. Group members are organized into multiple tree structures in the report definition. The row group hierarchy expands horizontally. The column group hierarchy expands vertically. These cells are added automatically when you create a group, and display the unique values for a group at run time.
Cells in the tablix corner are created when there are both row and column group areas. You can merge cells in this area to create a label or embed another report item.
Cells in the tablix body area can display detail data when the cell is in a detail row or column and aggregated group data when the cell is in a group row or column. The scope for the data in a cell is the intersection of the innermost row group and innermost column group to which the cell belongs.
Note Note
The actual data that is displayed for each cell is the evaluated expression for the report item that the cell contains, which is typically a text box. In a cell that belongs to a detail row or column, the expression defaults to the detail data (for example, [LineTotal]). In a cell that does not belong to a detail row or column, the expression defaults to an aggregate function (for example, Sum[LineTotal]). If an expression does not specify an aggregate function even though the cell belongs to a group row or column, the first value in the group is displayed. For more information about aggregates, seeExpression Scope for Totals, Aggregates, and Built-in Collections (Report Builder and SSRS).

Merging and Splitting Cells

Inside a tablix area, you can merge multiple adjacent cells together. For example, you can create cells for labels that span multiple columns or rows.
In the tablix corner area, cells can be combined in only one direction at a time: horizontally across columns or vertically down rows. To merge a block of cells, merge the cells horizontally first. After all cells have been merged into a single cell in each row, select adjacent cells (you can select all adjacent cells in a column) and merge them.
In the tablix body area, cells can only be merged horizontally. Merging cells vertically is not supported.
You can split a cell that was previously merged. You can split cells horizontally across columns or vertically down rows. To split a cell into a block of cells, split the cell horizontally first, and then split vertically as many times as necessary.

Wednesday, 10 July 2013

SQL SERVER REPORTING SERVICES ISSUES

  1. How can I properly configure SSRS for Web service use?
  2. Can you import Microsoft Excel data to SSRS?
  3. Can we deploy SSRS reports on our personal website?
  4. What other software is needed to design reports for SSRS?
  5. Can we use datagrids for our report in SSRS?
  6. How can I guide users on input parameters in SSRS?
  7. What are the drawbacks of reporting in SSRS?
  8. How can I properly order data in an SSRS report?
  9. Will running SSRS on Windows XP limit the number of users?
  10. Are there issues when exporting SSRS reports into Microsoft Excel?
  1. How can I properly configure SSRS for Web service use?
The Web service in my edition of SQL Server 2005 Reporting Services is not functioning properly. After a few minutes of browsing, I get the message, "This page cannot be displayed." Why is this happening?
It looks like you are using Network Service, which is a valid built-in account to use, and that you must be attempting to reach the Report Manager website. You must ensure that you have configured Reporting Services from the Reporting Services Configuration program in the SQL Server Configuration Tools program group. This is where you will go to configure the Web Service, Application Pool and Windows Service Identities. This step is often missed in SQL Server 2005.
—Mark Kromer, Business Intelligence Expert
  2. Can you import Microsoft Excel data to SSRS?
Reporting Services does not import data. It only queries data in whatever format it is stored in their native storage system. I will assume that you're asking whether you can create reports and use Excel spreadsheets as data sources. The answer is Yes, Reporting Services supports a wide variety of data sources, including Excel files. You'll get the best performance with the built-in native .NET providers but you should be able to connect to any ODBC or OLE-DB data source, whether it comes from Microsoft or a third-party company.
You can report against Excel data by using ODBC. First, create a new DSN in Windows Administrative Tools, select the Excel driver and point it to the Excel file you want to use. Then in your Reporting Services project create a new data source of the ODBC type, click on the Edit button next to the Connection String text box and select the DSN you had previously created. Once the data source is set up, you can create datasets in the query designer by running SQL statements against the Excel data. For example, let's say you have a file that contains a worksheet called Users. You can run the following query to retrieve your data:
SELECT * from [Users$]
Note: You need to append the dollar sign to the worksheet name.
—Roman Rehak, Reporting Services Expert
  3. Can we deploy SSRS reports on our personal website?
Your reports can only be deployed on a reporting services site. Your only option for viewing them from other sites is an HTTP link. Some tools, like SharePoint offer controls allowing you to view reports in the context of the other websites, but the report is still deployed to and hosted from reporting services.
—Eric Johnson, Reporting Services Expert
  4. What other software is needed to design reports for SSRS?
Assuming I have SQL Server, what else do I need to run the report designer for Reporting Services and the Business Intelligence Analyzer? It sounds like the Visual Studio environment hosts these tools, but what version of Visual Studio is required: Express, Standard or Professional? In other words, what do I need to buy after SQL Server to design reports for SQL Server Reporting Services?
All you need to create reports for SSRS is the SQL Server Business Intelligence Development Studio (BIDS), which is basically Visual Studio with only the SQL Server components installed. The good news is that BIDS comes with most versions of SQL Server. If you have the client tools installed, you will have BIDS.
—Eric Johnson, Reporting Services Expert
  5. Can we use datagrids for our report in SSRS?
I've got an ASP.NET project that populates a datagrid. I'd like to use the datagrid as my datasource for my report using SQL Server Reporting Services. Is this possible?
The simple answer is no. However, nothing's ever simple. A set of reporting controls was added in Visual Studio 2005 allowing you to report in a dataset, on data that was supplied by you. So, if you retrieved your data into a dataset, bound the datagrid to the dataset so it had data to display, you could then use that dataset as the datasource for the reporting controls. These are then client-side reports, not server reports though.
—Greg Low, Development Expert
  6. How can I guide users on input parameters in SSRS?
I am working on a report that has three input parameters. Is there a way to program a message box or text box that appears if the user tries to view the report without inputting the required information?
You need to change the properties of the input parameters to now accept null values. The user interface will then require a value to be input.
—SQL Server Expert Denny Cherry, IT Knowledge Exchange
  7. What are the drawbacks of reporting in SSRS?
For many years, Microsoft had no direct solution for reporting with the SQL Server besides Crystal Reports. Now, they have SQL Server Reporting Services, but it does have several drawbacks. It is still complex to understand the complete functionality and structure of this new component, and many users are still relying on the reporting application they are more familiar with, which is Crystal Reports.
Also, components in SSRS like Report Builder and Report Designer are meant for different users for different aspects of the report process, yet complete understanding and exposure to both is important to utilize both functions fully and extensively. There are also issues when exporting very large reports to Microsoft Excel, as it can lead to a loss of data.
—Jaideepkhanduja, IT Knowledge Exchange
  8. How can I properly order data in an SSRS report?
I am using a case statement to order data on a SRS report. When the statement is run, it returns the correct order, but when I save the RDL file and preview it, it returns to ascending order. How do I correct this?
You should put the SELECT statement within a stored procedure, and then call the procedure. This way SSRS can't mess around with the SELECT statement.
—SQL Server Expert Denny Cherry, IT Knowledge Exchange
  9. Will running SSRS on Windows XP limit the number of users?
Yes, but not because of SSRS. The Internet Information Services (IIS) component of Windows XP only allows a small number of users to connect to the website at once. As SSRS runs via IIS, this would prevent more than a few people from using SSRS at once.
Also, the only edition of SSRS that will install on Windows XP is the Developer Edition. This edition can not be used for production use. You need Standard or Enterprise Edition for production use, which requires a Server OS to install on (Windows 2003 Standard, Windows 2008 Standard, etc).
—SQL Server Expert Denny Cherry, IT Knowledge Exchange
  10. Are there issues when exporting SSRS reports into Microsoft Excel?
When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be?
Exporting from SSRS is not always perfect, even if you stay within the Microsoft range of products. If you have extra resources, you could splurge for an add-on that offers much better control over exporting to Excel, such as OfficeWriter.
From my experience, though, it is usually headers or footers that cause exporting issues. If any of these headers or footers overlap with data columns in your report, you will find that the exported version of the report has merged cells. Also, check columns next to each other to make sure that there is no overlap, as well.
—Squashjunkie, IT Knowledge Exchange

How To Avoid Blank Reports in Subscriptions , In place of Blank sheet I need A Message"No data today".?

If you want to avoid a blank reports with empty messages. You need to do the follow the below steps in BIDS.

I assumed that "No data" is one of your tables.

* In the design view, Click the table the properties pane displays the properties for the selected item or press Cntrl+F4.

* In the properties pane, Look for the "NoRowsMessage" property filed and type the text as you mentioned "No data today".

Hope this helpful..!!


@ Basireddy V Subbareddy                                            

Visibility Settings in SSRS: Drill Down to Show/Hide Report Data

The functionality to collapse and expand groups of data, known as drill down within SQL Server Reporting Services, is very useful.  This post discusses a few handy things to know when working with Visibility settings.  It assumes the reader has a basic familiarity with visibility and drill down concepts.

What is Visibility?

The visibility settings within SSRS are one way of making a report interactive.  It allows the report developer to set which data is shown and which data is hidden when the report is initially run.  The toggle settings then allow the end user to click the +/- sign to drill down to further detail within the same report.  Visibility can be used to nest several groups of drill down data.  Here's a very simple example with just one parent group (Area Name) and one child group (School Name):
       Visibility_Example
The + sign:  referred to as collapsed.
The - sign:  referred to as expanded.

Where to Set Visibility

It can be easy to get the placement a bit backwards, especially if it’s a complex report you’re not terribly familiar with.  Here’s how I think about it:
  • Visibility:  Set on the group/row/column/textbox which will be shown or hidden.  I think of this as “inside” the area to be shown/hidden.  In the screen shot shown above, the visibility is set on the School Name detail group.
  • Toggle:  Set on the textbox which will have the +/- displayed.  I think of this as “outside” the area to be shown/hidden (in fact, it must be outside or you’ll get a recursive error).  In the screen shot shown above, the toggle is set within the School Name detail group, and points to a textbox called Area name which is part of the Area Name parent group.
Most often you will want to set visibility within Group Properties – usually on Row Groups but Column Groups work very well too, especially if the columns are time-oriented. 
If your group has just one row or column (ex: just a detail row without a group header or group footer), using the Row Visibility will get the same result as using Group Properties.  However, I typically use the Group Properties which will ensure that the entire group will show and hide together.  You can also set visibility on individual textboxes if that makes sense for your report (which isn’t very often).
       Visibility_GroupProperties

Initial Toggle State

If you select the Hide radio button for “When the report is initially run” then the +/- symbols will appear as you expect them to.  However, if you choose Show, or an expression which will make some or all groups show, then there’s an additional step to take in order for the +/- symbol to appear properly.  Here’s an example of where we set it to initially Show the data rows, which it is doing properly, but the problem is we really want to see a - sign instead of a + sign:
       Visibility_InitiallyShow
To get the + signs shown above to display as - signs instead, the Initial Toggle State property must be set.  This is done on the textbox properties for the toggle report item being used.  In this example that’d be the Area Name textbox.
You want to change the default InitialToggleState property from False to True. 
  • True:  will show the image initially as expanded (- symbol)
  • False:  shows it initially as collapsed (+ symbol)
       Visibility_InitialToggleState
Note:  the Initial Toggle State is not available in the Property Pages (i.e., the right-click menus); it is only available in the Property Pane.

Expanding the First Group Shown

Recently our team delivered a dashboard where, within one report viewer web part, the customer wanted to see the first group of data expanded, but the rest of the groups collapsed.  This allowed us to show the user something without requiring an initial click, yet saved some space which is particularly a premium on a dashboard.  I handled this in three steps:
1.  First, in the stored procedure which serves up the dataset, I added a Rank() function.  The only rank we are concerned with is the #1 value, grouped by the same set of data we’ll be showing or hiding in the report.  This derived field must be available to the dataset in SSRS, so we can use it in step 2.
RANK() OVER (ORDER BY A.DisplayName) AS 'ClassGrouping'
2.  Back to the report.  In the Visibility settings, use an expression which utilizes our rank field to know whether it should conditionally show or hide when the report is initially run.
IIF(Fields!ClassGrouping.Value = 1, false, true)
  • False = Do not hide when initially run.  Will apply to our rank 1 group of data only.
  • True = Hide when initially run.  Will apply to all ranks except for 1.
       Visibility_Expression
3.  Set the Initial Toggle State for the textbox which serves as the toggle.  The tricky part here:  notice how the IIF statement here in step 3 is the opposite of the one used in step 2 for the visibility settings. 
IIF(Fields!ClassGrouping.Value = 1, true, false)
  • True:  Will show the image initially as expanded (- symbol).  Will apply to all ranks except for 1.
  • False:  Shows it initially as collapsed (+ symbol).  Will apply to our rank 1 group of data only.
       Visibility_InitialToggleState2
Just for grins, one more example of the conditional Initial Toggle State:
      Visibility_InitialToggleState3

Conditionally Expanding or Collapsing Groups

Several ideas are conditionally controlling visibility, such as on row counts, are listed in this MSDN article:  Expression Examples.

Toggle Image

The + /- is the only symbol supported by SSRS for visibility functionality.  It would be fantastic to be able to have additional choices (for example, a chevron which is popular these days for show/hide functionality) in a future version of SQL Server.

Toggle Report Item

The only report item that can be used as a toggle is a textbox.  Using an image, or another type of item from the toolbox isn’t supported.

Expanding All Groups With One Click

Expanding more than one group in a single click isn’t supported, but there’s a workaround which may be helpful, depending on how your reports are delivered.  I discussed this workaround in a previous entry called “Expand or Collapse All Grouped Items on SSRS Report.”

Naming Conventions

Can’t resist the urge to leave with one last thought … it’s a lot more self-documenting to set the toggle on a textbox named “AreaName” or “txt_AreaName” or whatever – anything that isn’t along the lines of textbox1, textbox2, etc.  SQL Server 2008 R2 has taken one more step forward in helping to name textboxes and groups well, but I still like to keep an eye on them especially if they’re referred to by another report item.

Finding More Information

Thursday, 4 July 2013

SQL how to print all the column names with in a table in one row


SELECT OutTab.TABLE_NAME,
      STUFF ( (
                SELECT ', '+InTab.COLUMN_NAME
                FROM INFORMATION_SCHEMA.COLUMNS InTab
                WHERE InTab.TABLE_NAME = OutTab.TABLE_NAME
                ORDER BY InTab.ORDINAL_POSITION
                FOR XML PATH(''), TYPE
                ).value('.','VARCHAR(MAX)'
             ) , 1,1,SPACE(0)) AS Col_Names 
FROM INFORMATION_SCHEMA.COLUMNS OutTab
GROUP BY OutTab.TABLE_NAME