I am converting a VB6 project into VB
I have used Crystal reports 11 in VB6. i have used CRAXDRT.application and generated report in VB6.
.Net i am using CrystalDecisions.CrystalReports.Engine.reportdocum ent
Can any one please tell me how can i pass the sqlquerystring (i have used this in VB6 to pass the sql to reportto reset the sql dynamically).
please tell me exact code which would load the report, pass the log oninfo and then pass the sql string and show the report using CrystalReportViewer.
i have attached the VB6 Piece of code for the same. Please tell me the equivalent Vb
Public crApp As New CRAXDRT.Application
Public crRpt As CRAXDRT.Report
Public crTab As CRAXDRT.DatabaseTable
Set crRpt = crApp.OpenReport(gDataPath + "R101.rpt", 1)
crRpt.FormulaFields.Item(4).Text = "'" & sFromDateParm & "'"
crRpt.FormulaFields.Item(5).Text = "'" & sToDateParm & "'"
For Each crTab In crRpt.Database.Tables
crTab.ConnectionProperties.Item("Data Source") = dbHostName
crTab.ConnectionProperties.Item("User ID") = gDbLoginID
crTab.ConnectionProperties.Item("Password") = gDbPswd
crRAATSRpt.SQLQueryString = sql ' sql - will have my updatedquery
crViewer.ReportSource = crRpt
Please help me. Thanks in advance.