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. Visual Basic
  4. Crystal report Error: Report has no tables

Crystal report Error: Report has no tables

Scheduled Pinned Locked Moved Visual Basic
helpquestion
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.
  • S Offline
    S Offline
    Sipder
    wrote on last edited by
    #1

    I am trying to generate simple Crystal Report. To do so I have configured datas set and i have set this data set as reports's data source. If I check the table name of data set then It gives that right. But on the next line where I have set this dataset as report's data source it gives Error "Report has No tables" Code is as follow: Dim i As New CrystalReport1 Dim ds As New System.Data.DataSet Dim ObAdp As New SetDatasetClass' here dataset get configured ds = ObAdp.getDataset("Select * from Employee" ) MsgBox(ds.Tables(0).TableName)' Shows table name as Employee i.SetDataSource(ds.Tables(0)) Is the method is right?

    R 1 Reply Last reply
    0
    • S Sipder

      I am trying to generate simple Crystal Report. To do so I have configured datas set and i have set this data set as reports's data source. If I check the table name of data set then It gives that right. But on the next line where I have set this dataset as report's data source it gives Error "Report has No tables" Code is as follow: Dim i As New CrystalReport1 Dim ds As New System.Data.DataSet Dim ObAdp As New SetDatasetClass' here dataset get configured ds = ObAdp.getDataset("Select * from Employee" ) MsgBox(ds.Tables(0).TableName)' Shows table name as Employee i.SetDataSource(ds.Tables(0)) Is the method is right?

      R Offline
      R Offline
      Rupesh Kumar Swami
      wrote on last edited by
      #2

      I think you are not set any table to CrystalReport1 at design time. If Yes then,Let me explain how can you set the table for report 1 Open Report CrystalReport1 in IDE. 2.From the Field Explorer window,Right click on Database Fields and Select Database Expert option (Or you can also Select the 'Database Expert' option from Menu CrystalReports-->Database) 3.A new window is open(Database Expert) from which you can select the Table(Employee) for you Report and click on OK button. 4. Now in Field Explorer window, A + sign is appear in Front of 'Database Fields' Option. Expand this sign 5. After expanding, Employee table is appear which you select in Database Expert window. 6. Place fields of Employee table in Appropriate section of Crystal Report 7.Now run you application Hope this helps

      Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India) My Company

      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