Friday, May 31, 2013

SQL SERVER – Query to Find Column From All Tables of Database


Following script which will go return all the tables containing specific column along with their schema name.

SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%StateProvinceID%'
ORDER BY schema_name, table_name;

Wednesday, May 22, 2013

SSRS Page Break while exporting in Excel..


SSRS Page Break while exporting in Excel..


we can use below expression in Group Expression of SSRS Tablix.
group expression =Ceiling((RowNumber(Nothing)) / Nth row)
replace Nth with any number like 65000 ..

Suppose you want to print fix number of rows per page in excel file then we can use above expression.
For ex- 2000 rows per page..
Use like this - Ceiling((RowNumber(Nothing)) / 2000).
Add page break in Group.

Every page will contain only 2000 per excel sheet ..

Enjoy . . :)

New Features in SSRS 2008 R2


New Features in SSRS 2008 R2

Microsoft has released MS SQL Server 2008 R2 recently. Now Business Intelligence (BI) developers want to learn what is new in Microsoft SQL Server 2008 R2 Reporting Services features.


Here is a short list of new features in Reporting Services 2008 R2.
Shared Data Sets
Report Part Gallery
Sparklines, Data Bars and Indicators
Aggregation on Aggregates
Rendering Features
Browser Support

For more go to :--
http://www.kodyaz.com/articles/what-is-new-in-sql-server-2008-r2-reporting-services.aspx

HOW MUCH WOMEN LOVE THEIR HUSBANDS



There was a group of women gathered at a seminar on how to live in a loving relationship with your husband.
*
The women were asked, 'How many of you love your husbands?'
*
All the women raised their hands.
*
Then they were asked, 'When was the last time you told your husband you loved him?'
Some women answered today, some yesterday, some didn't remember..
*
The women were then told to take their cell phones and send the following text to their respective husband: I love you, sweetheart.
Then the women were told to exchange phones and read the responding text messages.
*
Here are some of the replies:
*
1. Eh, mother of my children, are you sick?
*
2. What now? Did you crash the car again?
*
3. I don't understand what you mean?
*
4. What did you do now? I won't forgive you this time!!!
*
5. ?!?
*
6. Don't beat about the bush, just tell me how much you need?
*
7. Am I dreaming? ???????
*
8. If you don't tell me who this message is actually for, you will die today...!!!
*
9. I asked you not to drink any more!!
*
and the best one
*
10. Who is this?
LOL 

Tuesday, May 21, 2013

SSRS 2012 - Excel Renderer for Microsoft Excel 2007-2010 and Microsoft Excel 2003


Excel Renderer for Microsoft Excel 2007-2010 and Microsoft Excel 2003

The Reporting Services Excel rendering extension, new in SQL Server 2012, renders a report as an Excel document that is compatible with Microsoft Excel 2007-2010 as well as Microsoft Excel 2003 with the Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint installed. The format is Office Open XML and the file extension is XLSX.
This Excel-rendering extension removes limitations of the earlier version, compatible with Excel 2003. The following lists the improvement in the rendering extension:
  • Maximum rows per worksheet is 1,048,576.
  • Maximum columns per worksheet is 16,384.
  • Number of colors allowed in a worksheet is approximately 16 million (24-bit color).
  • ZIP compression provides smaller files sizes.

Data Alerts - New Feature in SSRS 2012


Data Alerts

Reporting Services data alerts are a data-driven alerting solution that informs you about changes in report data that are of interest to you, and at a relevant time.
Imagine a sales report that contains information such as year-to-day sales, average monthly sales, and sales targets for sales persons by territory. As a sales person, you would like to know how you are doing. By creating a data alert on the sales report, you can receive messages whenever year-to-date sales exceed or fall below a specified value or contain data that you consider noteworthy. Rules in the data alert definition specify the data values to trigger the data alert. By using AND and OR operators in the rules you can combine many clauses into complex rules that define precisely the report data values you want to be notified of.
In some cases, the presence of any data in a report is of interest. For example, a report that lists cancelled orders becomes interesting when the first cancellation occurs. You can create data alerts on reports in which the presence of data, rather than specific data values, is important.
Data alerts messages are sent by email. Depending on the importance of the information, you can choose to send alert messages more or less frequently and only when results change. You can specify multiple recipients for the alert messages and this way keep others informed and enhance efficiency and collaboration. If you want to send alert messages immediately, you can run data alerts directly instead of waiting for them to run automatically at the scheduled time.
The following summarizes the key areas of data alerting:
  • Define and save data alert definitions—User views a report, adds a data alert, creates rules that identify interesting data values, defines recurrence patterns for sending the alert, and specifies the recipients of the data alert message.
  • Run data alert definitions—Alerting service runs data alert definitions at a scheduled time, retrieves report data, and triggers data alerts based on the rules in the alert definition.
  • Deliver data alert messages to recipients—Alerting service creates an alert instance and sends data alert messages by email to recipients.
Data alerts provide the following tools for creating and managing data alert instances and definitions:
  • Data Alert Designer—Users create and edit data alert definitions.
  • Data Alert Manager for users—Users view information about their data alerts, delete their data alert definitions, or open alert definitions for editing.
  • Data Alert Manager for alerting administrators—Alerting administrators view a list of data alerts created by all users on the SharePoint site and delete alerts.

How to: Show Hidden Datasets


Reporting Services automatically creates datasets to populate the valid values for a parameterized query for multidimensional data sources. By default, these datasets do not appear in the Report Data pane. To display a hidden dataset, you must toggle the Report Data pane view.
  • To display hidden datasets

    In Design view, right-click an empty area of the Report Data pane, and then click Show Hidden Datasets.

    Note-

    If the Report Data pane is not visible, click Report Data on the View menu.