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 October 20th, 2006, 12:26 PM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SetDataSource is ignored, the whole table is shown

Please, help!

I have a report, created based on a SQL command.
I pass it a datasource filtered for a specific name but crystal still shows me data for all names instead of my datasource contents.

Here is my code:

Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
rptDocument.Load(ReportName)
Dim da As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQL, cn)
Dim ds As New DataSet
da.Fill(ds, "Table1")

rptDocument.SetDataSource(ds.Tables(0))
rptDocument.Database.Tables(0).SetDataSource(ds.Ta bles(0))
rptDocument.Refresh()
crw.ReportSource = rptDocument






Similar Threads
Thread Thread Starter Forum Replies Last Post
[Resolved] CR and SetDataSource snufse Crystal Reports 1 October 6th, 2008 07:33 AM
Passing Parameters and using SetDataSource bhavesh_busa Crystal Reports 0 August 10th, 2007 10:01 AM
Error on the Example shown on the book tarzannn Classic ASP Databases 8 January 17th, 2006 10:52 PM
Element value to be shown only once...HOW? suri XSLT 2 August 10th, 2004 10:51 AM





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