Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 14th, 2006, 01:30 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
  #2 (permalink)  
Old July 19th, 2006, 06:04 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

please reply.....

Reply With Quote
  #3 (permalink)  
Old June 1st, 2008, 01:58 AM
Authorized User
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2008
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this one. this is about passing sql query string to crystal reports.

http://vb.net-informations.com/cryst...ery_string.htm

http://vb.net-informations.com/cryst..._tutorials.htm

lee

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 1.1,VB.NET,crystal reports, SQl server gvi Crystal Reports 1 September 11th, 2008 02:55 AM
Crystal reports and VB.NET minnug Crystal Reports 0 May 20th, 2007 10:09 PM
exporting crystal reports through vb.net nikks9 Crystal Reports 0 May 16th, 2006 04:16 AM
Crystal Reports in VB.Net PatMcM VB.NET 2002/2003 Basics 0 January 31st, 2006 03:37 AM
Invoking Crystal Reports from VB.Net cyrilvictor Crystal Reports 0 December 1st, 2004 05:39 AM



All times are GMT -4. The time now is 08:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.