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 reportviewr problem

crystal reportviewr problem

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

    s = "drop view q1" cmd.CommandText = s dr = cmd.ExecuteReader() dr.Close() s = "create view q1 as select sum(fatrq1)reglz from reglz where fatrdate between '" + str + "'and'" + str2 + "'" cmd.CommandText = s dr = cmd.ExecuteReader dr.Close() Form7.Show() in form 7 i put this code CrystalReportViewer1.ReportSource = ("CrystalReport1.rpt") and i saved my report in debug and when i when i click the bottom to show the report he tell me error loading the report is there any one to help me

    R 1 Reply Last reply
    0
    • M magedhv

      s = "drop view q1" cmd.CommandText = s dr = cmd.ExecuteReader() dr.Close() s = "create view q1 as select sum(fatrq1)reglz from reglz where fatrdate between '" + str + "'and'" + str2 + "'" cmd.CommandText = s dr = cmd.ExecuteReader dr.Close() Form7.Show() in form 7 i put this code CrystalReportViewer1.ReportSource = ("CrystalReport1.rpt") and i saved my report in debug and when i when i click the bottom to show the report he tell me error loading the report is there any one to help me

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

      hi, specify the error in detail. anyway use this procedure (in place of Form7.show) to show report call crystalForm.showReport() where crystalForm contains crystalReportviewer and showReport procedure. Private sub ShowReport() Try Dim obj As CrystalReport1 = New CrystalReport1 Dim ds As New DataSet Dim da As OleDbDataAdapter Dim str As String str = "select * from TableName" 'Query da = New OleDbDataAdapter(str, conn) ' where conn is connection object da.Fill(ds) obj.SetDataSource(ds.Tables(0)) me.CrystalReportViewer1.ReportSource = obj Me.Show() Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Information, "Report") End Try End sub one more thing ,CrystalReport1.rpt must be include in your project (not in debug folder) hope this helps

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

      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