public void LoadReport(string strFromDate ,string strToDate)
{
bool boolSuccess=true; //for handling exception
try
{
rpt.ServerUrl=@strServerPath;
rpt.ReportPath=@strReportPath+"/RECScheduledCandidateReport";
rpt.SetQueryParameter("FromDate",strFromDate);
rpt.SetQueryParameter("ToDate",strToDate);
// the following line supresses the Parameter input part of the tool bar
rpt.Parameters=Microsoft.Samples.ReportingServices.ReportViewer.multiState.False;
//ReportViewer
rpt.Format="HTML4.0";
}
catch(Exception ex)
{
lblMessage.Text = "Enter Valid entries."+ ex.Message ;
lblMessage.Visible = true ;
rpt.Visible = false ;
boolSuccess=false ;
}
if(boolSuccess==true)rpt.Visible = true ;
}
Bookmarks