Results 1 to 2 of 2

Thread: Crystal XI + VB6

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Crystal XI + VB6

    Hey,
    I am designing a report that is going to run of a temporary table being created on a SQL Server via VB6. My question is how do I change the source table name in my code so it will look at the current temporary table. My temporary table names will vary but the fields inside them will be identically named. Will changing the source table name of the report effect the report itself if all the field names are the same still?

    any input is greatly appreciated.

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: Crystal XI + VB6

    I have the code to open the report here:

    VB Code:
    1. Private Sub RunReport(stTableName As String)
    2. Dim crxApp As New CRAXDDRT.Application
    3. Dim crxReport As CRAXDDRT.Report
    4. Dim crxDatabaseTables As CRAXDDRT.DatabaseTables
    5. Dim crxDatabaseTable  As CRAXDDRT.DatabaseTable
    6. Dim crxDatabase As CRAXDDRT.Database
    7. Dim crxParm As CRAXDDRT.ParameterValues
    8. Dim crxSubReport As CRAXDDRT.Report
    9.  
    10. Dim ReportName As String
    11. ReportName = "\\Server\Reports\PL.rpt"
    12.  
    13. Set crxReport = crxApp.OpenReport(ReportName)
    14.  
    15. With crView
    16.     .ReportSource = crxReport
    17.     .ViewReport
    18.     While .IsBusy
    19.         DoEvents
    20.     Wend
    21.     .Zoom "100"
    22.     .Visible = True
    23. End With
    24.  
    25. End Sub

    I just want to programmatically change the name of the table that the report is looking at if that is possible...

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