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 on Basis of Dataset having multiple tables

Crystal Report on Basis of Dataset having multiple tables

Scheduled Pinned Locked Moved Visual Basic
helpdatabasesecurity
5 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
    Syed Ali Raza
    wrote on last edited by
    #1

    hi I want to use the crystal report in my application on the basis of dataset. I have done it with dataset having single table but having this error with more than one table : "Query Engine Error" Here is the Code: Dim DS As New DataSet Dim Cnn As New SqlClient.SqlConnection Dim DA As New SqlClient.SqlDataAdapter Cnn.ConnectionString = "data source=sofsrv02\development;" _ & "initial catalog=Northwind;persist security info=False;" _ & "user id=sa;Pwd=;workstation id=aliraza;Pooling=false;packet size=4096" Cnn.Open() DA.SelectCommand = New SqlClient.SqlCommand("Select A.PRODUCTID,A.PRODUCTNAME,B.SUPPLIERID,B.COMPANYNAME from SUPPLIERS B,PRODUCTS A WHERE A.SUPPLIERID=B.SUPPLIERID", Cnn) DA.Fill(DS) Dim oRpt As CrystalReport1 ' create new report object oRpt = New CrystalReport1 ' create new instance of the report object oRpt.SetDataSource(DS) ' set the reports data source CrystalReportViewer1.ReportSource = oRpt ' set the viewers report source It executes all the code but finally give me error. Kindly Solve this Problem Regards Ali

    R 1 Reply Last reply
    0
    • S Syed Ali Raza

      hi I want to use the crystal report in my application on the basis of dataset. I have done it with dataset having single table but having this error with more than one table : "Query Engine Error" Here is the Code: Dim DS As New DataSet Dim Cnn As New SqlClient.SqlConnection Dim DA As New SqlClient.SqlDataAdapter Cnn.ConnectionString = "data source=sofsrv02\development;" _ & "initial catalog=Northwind;persist security info=False;" _ & "user id=sa;Pwd=;workstation id=aliraza;Pooling=false;packet size=4096" Cnn.Open() DA.SelectCommand = New SqlClient.SqlCommand("Select A.PRODUCTID,A.PRODUCTNAME,B.SUPPLIERID,B.COMPANYNAME from SUPPLIERS B,PRODUCTS A WHERE A.SUPPLIERID=B.SUPPLIERID", Cnn) DA.Fill(DS) Dim oRpt As CrystalReport1 ' create new report object oRpt = New CrystalReport1 ' create new instance of the report object oRpt.SetDataSource(DS) ' set the reports data source CrystalReportViewer1.ReportSource = oRpt ' set the viewers report source It executes all the code but finally give me error. Kindly Solve this Problem Regards Ali

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

      hi, What type of error u Face ? What is the Message of error ? Explain In Detail.

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

      S 1 Reply Last reply
      0
      • R Rupesh Kumar Swami

        hi, What type of error u Face ? What is the Message of error ? Explain In Detail.

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

        S Offline
        S Offline
        Syed Ali Raza
        wrote on last edited by
        #3

        This is the complete error. Error in File C:\DOCUME~1\ALIRAZ~1\ASPNET\LOCALS~1\Temp\temp_2d2350fe-39ee-4e43-a51c-2503df13defd.rpt: Query Engine Error

        S 1 Reply Last reply
        0
        • S Syed Ali Raza

          This is the complete error. Error in File C:\DOCUME~1\ALIRAZ~1\ASPNET\LOCALS~1\Temp\temp_2d2350fe-39ee-4e43-a51c-2503df13defd.rpt: Query Engine Error

          S Offline
          S Offline
          Syed Ali Raza
          wrote on last edited by
          #4

          I have searched lots of article about my problem on Internet,Found many article for single table but there is no solution for multiple tables .Plz help me Regards Ali

          R 1 Reply Last reply
          0
          • S Syed Ali Raza

            I have searched lots of article about my problem on Internet,Found many article for single table but there is no solution for multiple tables .Plz help me Regards Ali

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

            hi syed, some time Crystal report Problem with Multiple table. in place of select fields on Crysatal report from Multiple Table, you Select fields from Query which contain columns of multiple table. create the query in database(Query 1) which contain record from Multiple Table. Now in VS2005 IDE Perform Following. Create Dataset from Data menu & after selecting appropriate databse,select Query1 from DataBase object VIews & name this dataset(dsQuery) & on crystal report choose this Dataset as datasource & place field from this dataset to Report 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