Tuesday, March 5, 2013

SSRS Dataset

Setup a Shared Dataset

  1. Right-click on Shared Datasets folder
  2. Add New Dataset
    1. A Shared Dataset Properties window will open with five tabs: Query, Fields, Options, Filters, and Parameters
  3. On the Query tab:
    1. Name your Dataset
      1. NOTE: It is critical that you think about what you are naming your Dataset because it can be difficult to rename.
    2. Choose the Data Source (Dropdown) or you can click the New… button and you can create a Data Source
    3. Enter your Query
      1. i.e. SELECT * FROM DUAL…
      2. Click Refresh Fields button
      3. Enter Time out (in seconds) 
  4. On the Fields tab:
    1. If the query was correct and the Data Source was setup correctly, then there should be two columns: Field Name, and Field Source
      1. NOTE: You have the ability to edit these fields, but I suggest that you edit your query so these fields auto-populate and no errors occur.
  5. On the Options tab:
    1. You can leave everything for Default, or change as necessary / desired
  6. On the Filters tab:
    1. You can Add or Delete a filter here
      1. NOTE: This may not be the place where you will want to add a filter. You can also add a filter inside of a report. Since this is a Shared dataset, you may not want a filter unless you want the filter on all reports sharing this dataset.
  7. On the Parameters tab:
    1. If you have formatted your parameters in your query correctly they will show up here.
    2. You can set a Default Value here or at the report level
Add Existing Dataset to your project
  1. Right-click on Shared Data sets Folder
    1. Add
      1. Existing Item
  2. Navigate to your existing project workspace
  3. Double click on your project work folder
  4. Sort by type make it easier to find
  5. Select 
    1. DatasetName.rsd
    2. You can select multiple by holding shift or cntrl
  6. Add
  7. Double click on DatasetName.rsd in Solution Explorer
  8. Click the Refresh Fields button and ensure that no errors occur
  9. If no errors occur your Dataset is functioning properly
See our next tutorial: Setup an SSRS Report

No comments:

Post a Comment