Solved

Pass Dataset into my Crystal Report

Posted on 2008-06-25
2
1,202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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.
Suggested Courses

636 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