Results 1 to 7 of 7

Thread: Two distinct queries on a single report (RESOLVED)

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Resolved Two distinct queries on a single report (RESOLVED)

    Hello everybody

    I have a report which needs to display a list of employees. This can and has easily been done. The thing is that I want to display a Report Header. The title of this header will come from another table containing a single record-single field. I could create an Inner Join query but then I would be repeating this field for every employee. This is the code I`m currently using :

    Code:
    Dim oApp As New CRAXDRT.Application
     Dim oReport As CRAXDRT.Report
     Dim strPathToReport, strSQL As String
     Dim connbio_tech As ADODB.Connection
     Dim oRs As ADODB.Recordset
     
      
      ' ADO Connection to the database
      Set connbio_tech = New ADODB.Connection
      strConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER = localhost; DATABASE = xxx; UID = xxx; PWD = xxx;"
      connbio_tech.ConnectionString = strConnection
      connbio_tech.Open                ' Άνοιγμα σύνδεσης
      
      ' Open Recordset
      strSQL = "Select * From Texnikos Order By Kwd_Texnikou"
      Set oRs = New ADODB.Recordset
      Set oRs = connbio_tech.Execute(strSQL)
      CrystalReport1.Database.SetDataSource oRs, 3, 1
      
      ' Display in Viewer control.
      CrystalActiveXReportViewer1.ReportSource = CrystalReport1
      
      CrystalActiveXReportViewer1.ViewReport
    where CrystalReport1 is a viewer control. Could I create a second query for the header title and pass it only to the field in the report header as required?

    thx, in advance

    George Papadopoulos
    Last edited by divined; Jun 7th, 2005 at 06:26 AM.
    SteadFast!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width