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 pass parameter to CrystalReports ?

How to pass parameter to CrystalReports ?

Scheduled Pinned Locked Moved C#
helpdatabasetutorialquestion
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

    i posted about how to pass my parameter to Crystalreports and a person reply to me by this code : crystalReport11.SetDataSource(MyDataSet); crystalReport11.SetParameterValue("PrintDate1", "2006/05/07"); // this line that error occured crystalReportViewer1.ReportSource = crystalReport11; but the following error shown me : Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) how to solve my problem and pass my parameter to crystalreports ? thanks

    S 1 Reply Last reply
    0
    • H hdv212

      i posted about how to pass my parameter to Crystalreports and a person reply to me by this code : crystalReport11.SetDataSource(MyDataSet); crystalReport11.SetParameterValue("PrintDate1", "2006/05/07"); // this line that error occured crystalReportViewer1.ReportSource = crystalReport11; but the following error shown me : Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) how to solve my problem and pass my parameter to crystalreports ? thanks

      S Offline
      S Offline
      shopi30
      wrote on last edited by
      #2

      Hi hdv212. Use the follow sintax: this.crystalReportViewer1.SelectionFormula = "{table.field} = value";

      SINCERELY. ANTHONY ACUÑA PREFERED PHRASE: SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?

      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