我无法根据以下代码加载此报告:
ReportDocument crystalReport = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "Param";
paramDiscreteValue.Value = TextBox1.Text.ToString();
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
CrystalReportViewer1.ParameterFieldInfo = paramFields;
crystalReport.Load(Server.MapPath("CrystalReport.rpt"));
crystalReport.SetDatabaseLogon("username","password","servername","db");
CrystalReportViewer1.ReportSource = crystalReport;
它只是说“您要求的报告需要更多信息。” 我将报告所需的必要参数以及用户名、密码、服务器和数据库传递给它。任何建议都会有所帮助。谢谢!