Crystal report subreport error...
-
I'm currently using VS2005 Crystal report... I cant pass the parameter from Main report to its sub report.... it always encounter an error "@pParameter" value expected I can successfully display a crystal report with parameters but it will fail when it involves subreports.... I don't understand also why I cant display the above parameter but i noticed it runs successfully because it will display the expected output... hope to here some1 who can share thier ideas.. Thank you below is the code: string reportName = Session["ReportName"].ToString(); string reportDate = Session["ReportDate"].ToString(); string reportType = Session["ReportType"].ToString(); rpt.Load(Server.MapPath("~/Reports/" + reportName.ToString())); crConnectionInfo.ServerName = Session["MyServer"].ToString(); crConnectionInfo.DatabaseName = Session["myDatabase"].ToString(); crConnectionInfo.UserID = "myUser"; crConnectionInfo.Password = "myPassword"; crDatabase = rpt.Database; crTables = crDatabase.Tables; CrystalReportViewer1.ReportSource = rpt; ParameterDiscreteValue discreteBranch = new ParameterDiscreteValue(); ParameterFields paramFields = new ParameterFields(); ParameterDiscreteValue paramDiscreteBranch = new ParameterDiscreteValue(); ParameterField paramFieldBranch = new ParameterField(); paramFieldBranch.Name = "@pBranchCode"; paramDiscreteBranch.Value = Session["branchCode"].ToString(); paramFieldBranch.CurrentValues.Add(paramDiscreteBranch); paramFields.Add(paramFieldBranch); ParameterDiscreteValue paramDiscreteTranDate
-
I'm currently using VS2005 Crystal report... I cant pass the parameter from Main report to its sub report.... it always encounter an error "@pParameter" value expected I can successfully display a crystal report with parameters but it will fail when it involves subreports.... I don't understand also why I cant display the above parameter but i noticed it runs successfully because it will display the expected output... hope to here some1 who can share thier ideas.. Thank you below is the code: string reportName = Session["ReportName"].ToString(); string reportDate = Session["ReportDate"].ToString(); string reportType = Session["ReportType"].ToString(); rpt.Load(Server.MapPath("~/Reports/" + reportName.ToString())); crConnectionInfo.ServerName = Session["MyServer"].ToString(); crConnectionInfo.DatabaseName = Session["myDatabase"].ToString(); crConnectionInfo.UserID = "myUser"; crConnectionInfo.Password = "myPassword"; crDatabase = rpt.Database; crTables = crDatabase.Tables; CrystalReportViewer1.ReportSource = rpt; ParameterDiscreteValue discreteBranch = new ParameterDiscreteValue(); ParameterFields paramFields = new ParameterFields(); ParameterDiscreteValue paramDiscreteBranch = new ParameterDiscreteValue(); ParameterField paramFieldBranch = new ParameterField(); paramFieldBranch.Name = "@pBranchCode"; paramDiscreteBranch.Value = Session["branchCode"].ToString(); paramFieldBranch.CurrentValues.Add(paramDiscreteBranch); paramFields.Add(paramFieldBranch); ParameterDiscreteValue paramDiscreteTranDate
hey body to get an answer first put ur code in a codeblock ......... so that other can see it well and give u a reply
-
hey body to get an answer first put ur code in a codeblock ......... so that other can see it well and give u a reply
I don't know f u read my post very well or u just don't understand.... i already put the entire code block in my post....
xxx