Results 1 to 3 of 3

Thread: Cr9/vb6

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Cr9/vb6

    Hi
    I have a VB6 form that adds/Edit/Delete records from an Access Database.
    Inside this form I have a Report button that generates a Crystal report related to only the current record.
    The code is
    VB Code:
    1. Dim objCrystalApp As CRAXDRT.Application
    2. Dim oReport As CRAXDRT.Report
    3. rs2.Open "Select * from Btest where Flag=1 and BID=" & nar, cn, adOpenKeyset, adLockPessimistic
    4. rs2.Close
    5. Cancel = True
    6. Set objCrystalApp = New CRAXDRT.Application
    7. ReportPath = "C:\Book2\report4.rpt"
    8.  
    9.     Set oReport = objCrystalApp.OpenReport(ReportPath, 1)
    10.     oReport.RecordSelectionFormula = "{Btest.BID} =" & nar
    11.     frmreport.crvMyCRViewer.ReportSource = oReport
    12.     frmreport.crvMyCRViewer.ViewReport
    13.     frmreport.crvMyCRViewer.Refresh
    14.     frmreport.Show 1
    15. End If
    my problem is that I have a checkbox whose caption is "Amended",if it is checked I want to add the word Amended inside a shaded Border into the generated report, if it is not checked i want to only generate the report.
    how can I do it?
    I am using Crystal Report 9
    thanks

  2. #2
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: Cr9/vb6

    In CR.NET its easy because each report has a collection of objects you can browse and modifiy them easily.
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: Cr9/vb6

    Asgorath so what should I do in my case?
    i am using CR9 and VB6 with Access database

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