Results 1 to 2 of 2

Thread: VS2008 and Crystal Reports

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    VS2008 and Crystal Reports

    Hi to all:

    I had declare in VS2008,in references, the:
    CrystalReports ActiveX Designer RunTime library 11.5
    and i have this code:

    Code:
    Dim Report As New CRAXDRT.Application
            Dim Rpt As CRAXDRT.Report
            Dim formula As CRAXDRT.FormulaFieldDefinition
    
           
            Me.CRViewer1.RefreshReport()
    
            Report = New CRAXDRT.Application
            Rpt = Report.OpenReport(My.Application.Info.DirectoryPath & "\BalanceteRazao.rpt")
    
    
            If (Rpt.HasSavedData) Then Rpt.DiscardSavedData()
    
         
            Rpt.ParameterFields(1).AddCurrentValue(firma) 'Nome Firma
            Rpt.ParameterFields(2).AddCurrentValue(anos) ' Exercício
    
          
            CRViewer1.ReportSource = Rpt
            CRViewer1.ViewReport()
    The problem is:
    Why VS2008 don't recognize the .reportsource and the .viewreport?


    Thanks

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: VS2008 and Crystal Reports

    I'm posting only the lines from your code that I consider that are wrong
    Code:
    Dim Rpt As New CRAXDRT.Report
    'Report = New CRAXDRT.Application  --> out
    Set Rpt = Report.OpenReport(My.Application.Info.DirectoryPath & "\BalanceteRazao.rpt")

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