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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Report has no tables

Report has no tables

Scheduled Pinned Locked Moved ASP.NET
helpdatabasedesigntutorial
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.
  • G Offline
    G Offline
    Girish481
    wrote on last edited by
    #1

    Hello, I am getting above error message. Here is my code which i am using: ... ... tablename = clsname & exmname & Trim(DropDownList1.Text) sql = "select * from " & tablename & " where rollno between " & TextBox1.Text & " and " & TextBox2.Text Dim myr As New CrystalDecisions.CrystalReports.Engine.ReportDocument Dim ocn As New System.Data.OracleClient.OracleConnection Dim ods As New System.Data.DataSet Dim oda As New System.Data.OracleClient.OracleDataAdapter(sql, ocn) ocn.ConnectionString = "Data Source=orcl;User ID=scott;Password=tiger;Unicode=True" oda.Fill(ods, tablename) myr.Load("C:\Inetpub\wwwroot\Exam2\CrystalReport.rpt") myr.SetDataSource(ods.Tables(0)) ' This is error line. myr.DataDefinition.FormulaFields("rollno").Text = ods.Tables(0).Rows.Item(0).Item("rollno") myr.DataDefinition.FormulaFields("dob").Text = ods.Tables(0).Rows.Item(0).Item("dob") myr.DataDefinition.FormulaFields("name").Text = ods.Tables(0).Rows.Item(0).Item("name") myr.DataDefinition.FormulaFields("schcode").Text = ods.Tables(0).Rows.Item(0).Item("schcode") myr.DataDefinition.FormulaFields("centcode").Text = ods.Tables(0).Rows.Item(0).Item("centcode") CrystalReportViewer1.ReportSource = myr CrystalReportViewer1.DataBind() Since i can not give the table name in design time (it will be dynamic); so I have create a crystal report in which i have created formula fields in the report which will be populated as above code. Please guide and help me. Regards Girish Sharma

    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