Document Library for WPF | ComponentOne
SSRSDocumentSource for WPF / Features / Specify Parameters to SSRS Report
In This Topic
    Specify Parameters to SSRS Report
    In This Topic

    SSRSDocumentSource allows you to add parameter value to SSRS report through Parameters property of C1DocumentSource class. Additionally, SSRSDocumentSource class provides ValidateParameters method to validate the current parameters in the report and refresh the existing parameter value list.

    The following code explains the use of Parameters property and ValidateParameters method to add parameter value to a report.

    Dim ssrsDocSource As New C1SSRSDocumentSource()
    ssrsDocSource.DocumentLocation = New SSRSReportLocation(ssrsUrl, _
                                   "AdventureWorks/Sales Order Detail")
    ssrsDocSource.Credential = New NetworkCredential(ssrsUserName, _
                               ssrsPassword, ssrsDomain)
    
    ssrsDocSource.ValidateParameters()
    ssrsDocSource.Parameters(0).Value = "SO57060"
    
    C1SSRSDocumentSource ssrsDocSource = new C1SSRSDocumentSource();
    ssrsDocSource.DocumentLocation = new SSRSReportLocation(ssrsUrl,
                                     "AdventureWorks/Sales Order Detail");
    ssrsDocSource.Credential = new NetworkCredential(ssrsUserName,
                               ssrsPassword, ssrsDomain);
               
    ssrsDocSource.ValidateParameters();
    ssrsDocSource.Parameters[0].Value = "SO57060";
    
    See Also