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
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")