Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
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 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, 02:07 PM
Registered User
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default dynamic SLq for crstalreportviewr control

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
crview.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
 crview.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


Din





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create XML file from SLQ Server2000 using vbScript ilearn XML 1 September 5th, 2008 02:32 AM
dynamic button control SKhna ASP.NET 2.0 Basics 1 February 1st, 2008 10:36 AM
Dynamic Web Control chandrakiran145 ASP.NET 1.x and 2.0 Application Design 1 December 6th, 2006 09:15 AM
Access the dynamic control using C# kapi.goel C# 19 February 2nd, 2006 07:21 AM
Dynamic placing of a control Warbird General .NET 1 July 9th, 2004 02:19 PM





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