|
|
 |
| Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Crystal Reports section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

July 14th, 2006, 02:30 AM
|
|
Registered User
|
|
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Crystal Reports 11 from VB to VB.net
HI,
I am converting a VB6 project into VB.Net.
I have used Crystal reports 11 in VB6. i have used CRAXDRT.application and generated report in VB6.
in VB.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.Net code
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
Next
crRAATSRpt.SQLQueryString = sql ' sql - will have my updatedquery
crViewer.ReportSource = crRpt
Please help me. Thanks in advance.
|

July 19th, 2006, 07:04 AM
|
|
Registered User
|
|
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
please reply.....
|

June 1st, 2008, 02:58 AM
|
|
Registered User
|
|
Join Date: Jun 2008
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |