Document Library for WinForms | ComponentOne
SSRSDocumentSource for WinForms / 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.

    C1SSRSDocumentSource1.DocumentLocation = New SSRSReportLocation(ssrsUrl,
                                           "AdventureWorks/Sales Order Detail")
    C1SSRSDocumentSource1.Credential = New NetworkCredential(ssrsName, ssrspwd)
    
    'For SSRS, ValidateParameters pulls the list of params from 
    'the server so that values can be specified
    C1SSRSDocumentSource1.ValidateParameters()
    C1SSRSDocumentSource1.Parameters(0).Value = "SO57060"
    
    c1SSRSDocumentSource1.DocumentLocation = new SSRSReportLocation(ssrsUrl, 
                                           "AdventureWorks/Sales Order Detail");
    c1SSRSDocumentSource1.Credential = new NetworkCredential(ssrsName, ssrspwd);
    
    //For SSRS, ValidateParameters pulls the list of params from 
    // the server so that values can be specified:
    c1SSRSDocumentSource1.ValidateParameters();
    c1SSRSDocumentSource1.Parameters[0].Value="SO57060";
    
    See Also