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 ParameterFields

Crystal Report ParameterFields

Scheduled Pinned Locked Moved C#
databasesalesquestion
1 Posts 1 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.
  • B Offline
    B Offline
    Bedevian
    wrote on last edited by
    #1

    i wrote a sales report, which works fine with my application if i include start date and end date in the database, {gndsale.dob} in {date.startdate} to {date.enddate}. but if i change the report to pass Parameter Fields, {gndsale.dob} in {?Start Date} to {?End Date} when i load the report first time it's okay i can see the correct parameters on the Page header and in Details, but if i load report 2nd time with different parameters , the page header is updated but the details not, some how i need to refresh crystalReportViewer1 after i pass parameters. ??? check this code ReportDocument1.Load(RptPath.ToString()); crystalReportViewer1.RefreshReport(); crystalReportViewer1.ReportSource = reportDocument1; paramFields = new ParameterFields (); ParameterField crParamFld = new ParameterField(); ParameterDiscreteValue CrparamValue = new ParameterDiscreteValue(); paramFields = crystalReportViewer1.ParameterFieldInfo; crParamFld = paramFields[0]; CrparamValue.Value = PassDT_Start; crParamFld.CurrentValues.Add(CrparamValue); ParameterField crParamFld_2 = new ParameterField(); ParameterDiscreteValue CrparamValue_2 = new ParameterDiscreteValue(); crParamFld_2 = paramFields[1]; CrparamValue_2.Value = PassDT_End; crParamFld_2.CurrentValues.Add(CrparamValue_2); crystalReportViewer1.ParameterFieldInfo = paramFields; crystalReportViewer1.ReportSource = reportDocument1; Or this code reportDocument1.SetParameterValue("Start Date",PassDT_Start ); reportDocument1.SetParameterValue("End Date",PassDT_End ); crystalReportViewer1.RefreshReport(); crystalReportViewer1.ReportSource = reportDocument1;

    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