S
scottdg1
Guest
I have 2 winforms The first has a button that opens the second with a reportviewer that opens an SSRS report with a single parameter (CaseNo). I want to be able to pass the CaseNo from C# to the SSRS report.
This is what I currently have but I am not sure how to modify it to pass the parameter to the report.
private void btnOpenSummary_Click(object sender, EventArgs e)
{
CaseSummRpt summRpt = new CaseSummRpt("Case_Summary", " / Security", lblCaseNo.Text);
summRpt.ShowDialog();
}
Report Viewer Form
public CaseSummRpt(string rptText, string rptFolder, string CaseNo)
{
InitializeComponent();
string rptName;
rptName = rptFolder + "/" + rptText;
reportViewer1.ServerReport.ReportServerUrl = new Uri("http://servername:8000/servername_TRELVSQL02");
reportViewer1.ServerReport.ReportPath = rptName;
}
Continue reading...
This is what I currently have but I am not sure how to modify it to pass the parameter to the report.
private void btnOpenSummary_Click(object sender, EventArgs e)
{
CaseSummRpt summRpt = new CaseSummRpt("Case_Summary", " / Security", lblCaseNo.Text);
summRpt.ShowDialog();
}
Report Viewer Form
public CaseSummRpt(string rptText, string rptFolder, string CaseNo)
{
InitializeComponent();
string rptName;
rptName = rptFolder + "/" + rptText;
reportViewer1.ServerReport.ReportServerUrl = new Uri("http://servername:8000/servername_TRELVSQL02");
reportViewer1.ServerReport.ReportPath = rptName;
}
Continue reading...