Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Crystal report subreport error...

Crystal report subreport error...

Scheduled Pinned Locked Moved C#
databasesysadminhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    The_Collector
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • T The_Collector

      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

      C Offline
      C Offline
      CoderForEver
      wrote on last edited by
      #2

      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

      T 1 Reply Last reply
      0
      • C CoderForEver

        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

        T Offline
        T Offline
        The_Collector
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups