p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > Other .NET > Crystal Reports
I forgot my password Register Now
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 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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 14th, 2006, 02: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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old July 19th, 2006, 07:04 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

please reply.....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old June 1st, 2008, 02:58 AM
Registered User
Points: 21, Level: 1
Points: 21, Level: 1 Points: 21, Level: 1 Points: 21, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2008
Location: , , .
Posts: 7
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 03:55 AM
Crystal reports and VB.NET minnug Crystal Reports 0 May 20th, 2007 11:09 PM
exporting crystal reports through vb.net nikks9 Crystal Reports 0 May 16th, 2006 05: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 11:13 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc