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 Reports

Crystal Reports

Scheduled Pinned Locked Moved C#
questioncsharpdatabasevisual-studiosysadmin
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.
  • K Offline
    K Offline
    krieg38
    wrote on last edited by
    #1

    Please tell me what I am doing wrong. I have some problems using Crystal Reports. I have for an example an Access database with a table called "Authors". I connect to the database using the server explorer in VS.NET 2005, I create an OleDbConnection and a DataAdapter. I use the Generate Dataset option from the DataAdapter to generate a Typed DataSet called dataSet1. I load data into the DataSet using the Fill method from the DataAdapter. Then I insert a new Crystal Report Document Using the Wizard and I add as data source From the Project Data/ADO.Net Datasets the dataset1.Authors. I add all the fields from the dataset and I add an Crystal Report Viewer control to the main form. I use the folowing code to set the ReportSource filed of the viewer: CrystalReport1 cs = new CrystalReport1(); this.crystalReportViewer1.ReportSource = cs; Ok, when I run the Application the Crystal Report Viewer it lists nothing from the DataSet data. What is wrong?

    K 1 Reply Last reply
    0
    • K krieg38

      Please tell me what I am doing wrong. I have some problems using Crystal Reports. I have for an example an Access database with a table called "Authors". I connect to the database using the server explorer in VS.NET 2005, I create an OleDbConnection and a DataAdapter. I use the Generate Dataset option from the DataAdapter to generate a Typed DataSet called dataSet1. I load data into the DataSet using the Fill method from the DataAdapter. Then I insert a new Crystal Report Document Using the Wizard and I add as data source From the Project Data/ADO.Net Datasets the dataset1.Authors. I add all the fields from the dataset and I add an Crystal Report Viewer control to the main form. I use the folowing code to set the ReportSource filed of the viewer: CrystalReport1 cs = new CrystalReport1(); this.crystalReportViewer1.ReportSource = cs; Ok, when I run the Application the Crystal Report Viewer it lists nothing from the DataSet data. What is wrong?

      K Offline
      K Offline
      krieg38
      wrote on last edited by
      #2

      Yay I found a solution just by adding one line of code to the code from above: CrystalReport2 cs = new CrystalReport2(); cs.SetDataSource(this.dataSet11); this.crystalReportViewer1.ReportSource = cs;

      G 1 Reply Last reply
      0
      • K krieg38

        Yay I found a solution just by adding one line of code to the code from above: CrystalReport2 cs = new CrystalReport2(); cs.SetDataSource(this.dataSet11); this.crystalReportViewer1.ReportSource = cs;

        G Offline
        G Offline
        Glen Harvy 0
        wrote on last edited by
        #3

        Thanks for this - much appreciated. :-D Wish I'd found it two days ago :mad:

        Glen Harvy

        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