IOT Virtual Conference - Register now to book your ticket and get updates
x
CONGRATULATIONS! C# Corner Q1, 2021 MVPs Announced
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forumguidelines
Mohammad Imran
1.9k
76
6.1k
Report in winform
Sep 5 2014 6:07 AM
I want to generate report in winform.
I have reportviewer.
I call the report by this function
public void getReportFrmServer(string report, string[] param)
{
try
{
this.reportViewer1.ServerReport.ReportPath = "/Report From_Iris_New/" + report;
this.reportViewer1.ServerReport.Timeout = 3600000;
ReportParameter[] parameter = new ReportParameter[5];
parameter[0] = new ReportParameter("startDate", param[0]);
parameter[1] = new ReportParameter("endDate", param[1]);
parameter[2] = new ReportParameter("contractorName", param[2]);
parameter[3] = new ReportParameter("siteName", param[3]);
parameter[4] = new ReportParameter("FuncName", param[4]);
this.reportViewer1.ServerReport.SetParameters(parameter);
this.reportViewer1.RefreshReport();
}
catch (Exception exception)
{
MessageBox.Show(exception.Message);
}
}
in sql
SELECT * FROM BillingReport(@startDate,@endDate,@siteName)
It runs fine when I passed short date range like 25/07/2014 to 30/07/2014.
But when I passed date range like 25/07/2014 to 26/08/2014.
It gives en error
An error occured during report processing.
Cannot read the next data row for the data set Dataset1.
A severe error occured on the current command. The results, if any, should be discarded.
while I run query from Microsoft sql server Management studio report is generated
please suggest me!
Reply
Answers (
1
)
Execute .reg file?
Hide or Show DataGridViewCheckBoxCell in datagridview