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. how to change values of Crystal Reports in vc# 2005?

how to change values of Crystal Reports in vc# 2005?

Scheduled Pinned Locked Moved C#
csharptutorialquestion
2 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.
  • H Offline
    H Offline
    hdv212
    wrote on last edited by
    #1

    hi i created a report in my solution with crystalreport for print my datagridview's records, and i add a date object to Crystalreport designer that show date in my report. but i want to change this vlaue in my app programmatically, but how to change it from my code ? thanks .

    B 1 Reply Last reply
    0
    • H hdv212

      hi i created a report in my solution with crystalreport for print my datagridview's records, and i add a date object to Crystalreport designer that show date in my report. but i want to change this vlaue in my app programmatically, but how to change it from my code ? thanks .

      B Offline
      B Offline
      bearfx
      wrote on last edited by
      #2

      Create a parameter field for the date. When you create the report object, use the ParameterFields Collection of the ReportDocument to find your paramter. Set it using the .CurrentValues.Add property of the ParameterField. ReportDocument report = new ReportDocument(); report.Load(@"MyReportFile.rpt"); foreach(ParameterField field in report.ParameterFields) { if(field.ParameterFieldName == "MyName") { field.CurrentValues.Add(MyDateValue); } }

      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