# Quick Start

## Content

This quick start topic guides you through a step-by-step process of creating a simple application for loading a SSRS report in the FlexViewer control. It uses a SSRS report named AdventureWorks, from the ComponentOne report server.
The following image shows a SSRS report opened in FlexViewer.
![](https://cdn.mescius.io/document-site-files/images/4a35dced-dcb9-4518-88b2-cb3b788a064c/images/ssrsreport-flexviewer.png)

### To load a SSRS report in FlexViewer programmatically

* [Step 1: Setting up the application](/componentone/docs/wpf/online-document/SSRSDocumentSource-for-WPF/SSRSDocumentSource-Quick-Start#step-1-setting-up-the-application)
* [Step 2: Load the SSRS report in FlexViewer](/componentone/docs/wpf/online-document/SSRSDocumentSource-for-WPF/SSRSDocumentSource-Quick-Start#step-2-load-the-ssrs-report-in-flexviewer)
* [Step 3: Build and run the project](/componentone/docs/wpf/online-document/SSRSDocumentSource-for-WPF/SSRSDocumentSource-Quick-Start#step-3-build-and-run-the-project)

#### Step 1: Setting up the application

1. Create a new WPF application.
2. Drag and drop **C1FlexViewer** control in the XAML view.
3. Add **Loaded="Window\_Loaded"** to the \<Window> tag in XAML view to create the Windows\_Loaded event.

#### Step 2: Load the SSRS report in FlexViewer

* Switch to the code view and add the following code to initialize the variables to be used as parameters for NetWorkCredential Property.
<br>
    ```vbnet
    Shared ReadOnly
    ssrsUrl As String = "http:// server url",
    ssrsUserName As String = "*",
    ssrsPassword As String = "*", 
    ssrsDomain As String = String.Empty
    ```

    ```csharp
    static readonly string
    ssrsUrl = "http:// server url",
    ssrsUserName = "*",
    ssrsPassword = "*",
    ssrsDomain = string.Empty;
    ```
    2. Add the following code in the **Windows\_Loaded** event to provide the location of the report on the server using [DocumentLocation](/componentone/docs/wpf/online-document/) and set the credentials using [Credential](/componentone/docs/wpf/online-document/) property:

<br>
    ```vbnet
    Dim ssrsDocSource As New C1SSRSDocumentSource()
    ssrsDocSource.DocumentLocation = New SSRSReportLocation(ssrsUrl,
                                     "AdventureWorks/Sales Order Detail")
    ssrsDocSource.Credential = New NetworkCredential(ssrsUserName,
                               ssrsPassword, ssrsDomain)
    ```

    ```csharp
    C1SSRSDocumentSource ssrsDocSource = new C1SSRSDocumentSource();
    ssrsDocSource.DocumentLocation = new SSRSReportLocation(ssrsUrl, 
                                     "AdventureWorks/Sales Order Detail");
    ssrsDocSource.Credential = new NetworkCredential(ssrsUserName, 
                               ssrsPassword, ssrsDomain);
    ```

3. Render the SSRS report in the FlexViewer control using **DocumentSource** property.
<br>
    ```vbnet
    viewer.DocumentSource = ssrsDocSource
    ```

    ```csharp
    viewer.DocumentSource = ssrsDocSource;
    ```

#### Step 3: Build and run the project

1. Press **Ctrl+Shift+B** to build the project.
2. Press **F5** to run the application.

## See Also

[Key Features](/componentone/docs/wpf/online-document/SSRSDocumentSource-for-WPF/SSRSDocumentSource-Key-Features)
[Features](/componentone/docs/wpf/online-document/SSRSDocumentSource-for-WPF/SSRSDocumentSource-Features)