Solved

Pass Dataset into my Crystal Report

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

Assisted Solution

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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

830 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