The parameter is incorrect
-
hi i use these codes for reporting my proc:
create proc Cpost
@nopersoneli int
As
Select p.fname,p.lname,p.NoPersoneli,po.name from personal p
Join postpersonal pp
On p.NoPersoneli=pp.Cpersonal
Join post po
On po.code=pp.vpostReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@NoPersoneli";
paramDiscreteValue.Value = "45";
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
reportDocument.Load(@"C:\Documents and Settings\Administrator\Desktop\VEZARAT\VEZARAT\PostCrystalReport.rpt");
reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
crystalReportViewer1.ReportSource = reportDocument;error:The parameter is incorrect please help to me thanks a lot
-
hi i use these codes for reporting my proc:
create proc Cpost
@nopersoneli int
As
Select p.fname,p.lname,p.NoPersoneli,po.name from personal p
Join postpersonal pp
On p.NoPersoneli=pp.Cpersonal
Join post po
On po.code=pp.vpostReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@NoPersoneli";
paramDiscreteValue.Value = "45";
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
reportDocument.Load(@"C:\Documents and Settings\Administrator\Desktop\VEZARAT\VEZARAT\PostCrystalReport.rpt");
reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
crystalReportViewer1.ReportSource = reportDocument;error:The parameter is incorrect please help to me thanks a lot
Can you tell us which line is associated with the error?
-
Can you tell us which line is associated with the error?
program run when form opens i see this error
-
program run when form opens i see this error
Put a breakpoint on the line "ReportDocument reportDocument = new ReportDocument();", and run the program with the debugger (F5). After it stops on this line, hit F10 to execute one line at a time. (The highlighted line is the line that will be executed when you hit F10.) Tell us which line produces the error.
-
Put a breakpoint on the line "ReportDocument reportDocument = new ReportDocument();", and run the program with the debugger (F5). After it stops on this line, hit F10 to execute one line at a time. (The highlighted line is the line that will be executed when you hit F10.) Tell us which line produces the error.
i have error in this line: paramField.Name = "@NoPersoneli"; thanks a lot
-
i have error in this line: paramField.Name = "@NoPersoneli"; thanks a lot
Does the ParameterField class have a Name member? If it doesn't, that may account for the error message.