Solved

Pass Dataset into my Crystal Report

Posted on 2008-06-25
2
1,197 Views
Last Modified: 2013-11-06
Hello,

I have a vb.net application with several Crystal Reports.  In the past I have simply called the Crystal Report and inside the Crystal report set parameters.  How do I pass in a dataset fron vb.net to the Crystal report.  (I would like to query the database in vb.net and pass in the dataset basically)  I have done this in the past but can't remember for the life of me how I did it.  Thanks in advance for your help!!!
0
Comment
Question by:jwebster77
2 Comments
 
LVL 33

Accepted Solution

by:
jppinto earned 250 total points
ID: 21867861
Try this code.

hope it helps.

jppinto
Dim your_report As New rptReportName

       

sSQL = "SELECT * FROM [Scrap] WHERE ...."   ' your SQL statment

da = New OleDb.OleDbDataAdapter(sSQL, con)

ds.Clear()

da.Fill(ds, "Scrap")

your_report.SetDataSource(ds)
 

CrystalReportViewer1.ReportSource = your_report

Open in new window

0
 
LVL 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 250 total points
ID: 21868012
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now