Solved

Pass Dataset into my Crystal Report

Posted on 2008-06-25
2
1,196 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

707 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

13 Experts available now in Live!

Get 1:1 Help Now