Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call Reports From VC++

Status
Not open for further replies.

kaleem

Programmer
Apr 28, 2001
7
0
0
PK
dear All
i am a programmer in VB switched now in VC.
i wants to call crystal reports V 8.0 to call from vc
here is my VB code. Can anyone translate it to VC++.

Dim x As New CRAXDRT.Application
Dim y As New CRAXDRT.Report

Private Sub Command1_Click()
x.LogOnServer "pdssql.dll", "yankees- server", "yankees", "sa", "sa"
Set y = x.OpenReport(App.Path & "\rptlogact.rpt")
y.ParameterFields(1).AddCurrentValue "-1"
y.ParameterFields(2).AddCurrentValue "login"
y.ParameterFields(3).AddCurrentValue "01/01/1999"
y.ParameterFields(4).AddCurrentValue "12/12/2005"
y.ParameterFields(5).AddCurrentValue "-1"

Me.CRViewer1.ReportSource = y
CRViewer1.Zoom 100
CRViewer1.Left = 0
CRViewer1.Top = 0
CRViewer1.EnableCloseButton = True

CRViewer1.Height = 9600
CRViewer1.Width = Screen.Width
CRViewer1.ViewReport
End Sub



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top