Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1205
  • Last Modified:

Pass Dataset into my Crystal Report

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
jwebster77
Asked:
jwebster77
2 Solutions
 
jppintoCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now