Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Components
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2004, 10:53 AM
Registered User
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Slqquerystring from vb.net to crystal report

Hi Milan,

I want to pass sql query from vb.net to crystal report.
I am using crystaldecision.windows.forms.crstalreportviewr to view the report.
To use crviewr I have two options
1. Use Dim rptDocument As New ReportDocument as
criview.reportsouce= rptDocument (this line is ok)
 but ReportDocument has no property or method like sqlquerystring, which I can pass from vb.net to crystal report.
I also tried to populate the dataset with dynamic sql. It is pouplutating but when I assign dataset to ptDocument.SetDataSource(custDS) it still shows all records and don’t shows those records which are just in dataset.


2. second option is one that I was using in vb.6. In VB.6 we can assign Public crydatasheet As CRAXDRT.Report to crviewer control where CRAXDRT.Report has method sqlquerystring. But in vb.net we can’t assign CRAXDRT.Report to crystaldecision.windows.forms.crstalreportviewr, because it gives error message wrong type when we use
 criview.reportsouce= crydatasheet (error wrong type for reportsource)


Any suggestions? How can I pass sqlqeury to crystal report? The query joins several tables and where clause is being built dynamically according to the user selection of different fields from vb.net form.
Thanks
Salahud din


Din





Similar Threads
Thread Thread Starter Forum Replies Last Post
simple report and crystal report in vb.net saket123 .NET Framework 2.0 0 August 13th, 2008 06:55 AM
vb.net And Crystal Report Tata .NET Framework 1.x 0 June 13th, 2008 10:16 PM
Crystal Report and VB.NET rupesh_india Beginning VB 6 0 August 19th, 2006 08:47 AM
Crystal Report in VB.net anandf Crystal Reports 1 March 13th, 2006 01:21 PM
Crystal Report in VB.Net mangeshshelar Crystal Reports 1 January 13th, 2005 09:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.