Skip to main content

SSRF CONFIGURTION


If this is your first time creating an SSRS report, then this is the right article for you. Below is a step-by-step guide that will help you to create, deploy and view your first report using SQL Server Reporting Services 2008:
Environment Check
Assuming the following are installed and already configured on your machine:
  • Installed SQL Server 2008 R2
  • Installed AdventureWork Sample Databases
    (You can visit Microsoft website to download and install it:
    http://msftdbprodsamples.codeplex.com/releases/view/55926
    We are using it in this case as a sample database. However, you can write any SQL statement on one of your pre-installed Databases)
  • Installed SQL Server 2008 Reporting Services
    (If you have not done this, visit this post: SSRS 2008 Installation Guide)
  • Both SQL Server and Reporting Services are installed on the same machine (localhost)
Now we can start the guide walk-through:
1. Open SQL Server Business Intelligence Development Studio (BIDS) by going to:
Start > All Programs > Microsoft 2008 R2 > BIDS
2. From the menu, choose File > New > Projects
image
3. Choose the right template: Report Server Project and type in name of the Project:
image
4. If this is your first time creating a report, then we do need to setup the path where some of the reports are stored while deploying. (We only need to do this once) So, right click on the project name from your Solution Explorer window (on the right side) and choose Properties.
image
5. I would normally leave the settings as default EXCEPT you need to add the value for parameter TargetServerURL which is blank:
image
6. Normally, the Report Server URL is: http://localhost/ReportServer
You can check this by going to: Start > All Programs > SQL Server 2008 R2 > Configuration Tools > Reporting Services Configuration Manager. Then, from left menu choose Web Sever URL and under Report Server Web Service URL, you will find the address which is setup. You can always replace the long ugly machine name with localhost:
image
7. Type in the Server URL and click OK:
image
8. Now, we begin to add Reports to our project. To do this, right click on Reports folder and choose Add > New Item:
image
9. Type in the name of your report: ContactList.rdl and click Add
image
10. Report Wizard will start. Although, you can create report manually without wizards, for the purpose of this first exercise we continue with the wizard. Click Next:
image
11. Every report need a DataSource to know which database to connect to. As this is the first time, we have to create this. Click on Edit:
image
12. Type in Server Name: localhost. I have setup the SQL Server to accept Window Authentication. Otherwise, enter SQL Server Authentication:
image
13. Choose the database that you want to work with and click OK to finish:
image
14. Now that we have created the connection string, click on Next to continue (note that you also tick the box Make this a shared data source to use for future reports):
image
15. In the next step, it will ask to to type in the Query String. There are two ways of doing this, either use Query Builder or write in your own code. I prefer the later, so I have opened SSMS and wrote my select statement which return the result that I have to use in my report. I will also run it to make sure the syntax is connect. Copy the code to the clipboard:
image
16. Page the code in the Query String and click Next:
 1: SELECT
 2:     Title,
 3:     FirstName,
 4:     LastName,
 5:     EmailAddress,
 6:     Phone
 7: FROM Person.Contact
 8: WHERE Title IS NOT NULL
image
17. Depending on the report choose the type. This is a simple basic report so we are going to use Tabular. Click Next:
image
18. In this step, the wizard allows you to do Grouping but for the purpose of this exercise, we will have a simple report that return lost of all names. Also, we have already specified the columns that we want in our SELECT query; therefore, we want to select all the available fields and click the Details button to move them to the Details section:
image
19. We can see all fields are in the Details section. Click on Finish:
image
20. You can type in or change the name of the report and click Finish to end:
image
21. We can see the report is now created. To view the report click on Preview tab:
image
22. The preview Tab will run and render the report to see the outcome result:
image
23. So, now that we have created the report and preview it, we can need to Deploy it to the Report Server so that it can be viewed and accessed by end-users. To do this, right click on the report file (ContactList.rdl) and choose Deploy:
image
24. Remember that we have to setup the Target Report Server URL correctly before deploying. If all is done correctly, we will see the successful message in the Output result dialog box. This is a confirmation that the report has successfully built, deployed and ready to be viewed:
image
25. To view the report which has just been deployed, open IE browser and type in: http://localhost/Reports
This is the address where all Reports are deployed and can be accessed by end-user. We can also see that reports are in a Folder structure similar to Window Files. Click on MyFirstReport folder:
image
26. And finally to view the report, click on ContactList:
image
27. Here is the report displayed on your web-browser:
image
28. Finally, a very useful feature of SSRS reports is the ability to export them into PDF, Excel, or Word:
image

Share this:

Comments

Popular posts from this blog

Dynamic Generation of Word Document Report in ASP.NET with HTML

Overview Ever needed to generate Word documents from your ASP.NET applications? There are a couple of components which will help to generate Word documents, but using these components may have some overhead such as Component Registration, setting permissions, licenses, etc., Sometimes, it may even become difficult to understand their features and use them. Generating word document in ASP.NET with HTML is incredibly easy. The following sample demonstrates how to place Heading and Table dynamically in the word document in ASP.NET web applications using HTML. Requirements Microsoft Visual Web Developer 2005 Express Edition Create the Web Application project Add the new Web Site Application project (with name as Generate Word Document) and place the button (with name as btnGenerateDocument) in the Default.aspx web form as shown below. Double click the highlighted code behind file from the Solution Explorer and add the following namespaces. Listing 1 using  System...

GRIDVIEW ZOOM IMAGE

When you have images in your  GridView , you would most likely show them as thumbnails so as to not distort the whole layout. However user would want to look at the full image by clicking on the image or just hovering his mouse over it. In today’s applications, this is a basic requirement and there are just so many third party controls or plugins which would support this functionality. I am going do this conventional way using  javascript  way in this article.  On top of it, I am also going to explain how to get images from database using  HttpHandlers . Example: I am using  Adventure Works  as datasource. We fetch handful of products and bind them to the grid. When page is initially loaded, we retrieve products from Production . Product  table and bind them to the grid. We display some product attributes such as Product ID, Product Number, Product Name, List Price and product’s thumbnail. When user hover his mouse on the page, we fetch the f...

GRIDVIEW GROUPING

When displaying data, we sometimes would like to group data for better user experience or when displaying long list of hierarchal data, we would want to display them in a tree view kind of structure. There is more than way of doing this, but I am going to explain achieving this functionality using  AJAX Collapsible Panel Extender Control . Overview: I am going to use  Adventure Works  as datasource. Every product in  Production.Product  table belongs to a product sub category. We fetch handful of products and the sub categories they belong to from the database. Our objective is to list all the available sub categories and allow user to  expand/collapse  to look/hide the list of products belonging to each subcategory. Database Connection Added following entry under  connectionStrings  element in  web.config . < add   name = "Sql"   connectionString="Data Source=(local); Initial  Catalog = AdventureWorks ...