ReportViewer Questions

G

Guest

Hello,

I have a windows application over data form that has a reportviewer control
on it. I have several reports defined, each works as expected when they are
embedded into the report.

On the form I have 3 buttons and two DateTimePicker controls. I want to use
the bottons to load the unique reports into the reportviewer. I want to use
the DateTimePicker controls as parameter inputs for one of the existing
reports.

I've spent days looking for a simple example or walkthrough but have found
either broken links or examples in c# (I'm still a VB newb, c# just confuses
me at this point) My Data source is an Access table, I've imported the
needed data as a dataset and used the tableAdapter query builder to some
limited success but I'm unsure of the relationship between the parameter
source (the DateTimePickers) and the datasource. I've read up on SQL Server
reporting services but I'm afraid that only added to my confusion. (I've also
perused "gotreportviewer.com")

I'm hoping someone will walk me through this two part question.

Thanks.
 
L

Lucas

Hello,

I have a windows application over data form that has a reportviewer control
on it. I have several reports defined, each works as expected when they are
embedded into the report.

On the form I have 3 buttons and two DateTimePicker controls. I want to use
the bottons to load the unique reports into the reportviewer. I want to use
the DateTimePicker controls as parameter inputs for one of the existing
reports.

I've spent days looking for a simple example or walkthrough but have found
either broken links or examples in c# (I'm still a VB newb, c# just confuses
me at this point) My Data source is an Access table, I've imported the
needed data as a dataset and used the tableAdapter query builder to some
limited success but I'm unsure of the relationship between the parameter
source (the DateTimePickers) and the datasource. I've read up on SQL Server
reporting services but I'm afraid that only added to my confusion. (I've also
perused "gotreportviewer.com")

I'm hoping someone will walk me through this two part question.

Thanks.

Dim newfrmReport As New frmReport
'Dim dr As OleDb.OleDbDataReader
Dim getCmd As New OleDb.OleDbCommand("Select * from TABLE
where DATE < #SOMEDATE# and DATE > #SOMEDATE#", cnOleDb)

cnOleDb.Open()
newfrmReport.CrystalReportViewer1.ReportSource =
getCmd.ExecuteReader
cnOleDb.Close()

newfrmReport.ShowDialog()

This is a very simple SQL query from Access to fill a ReportSource. I
use a lot of parameters so this may need some tweaking to finalize
your end results. The #SOMEDATE# fields could be added in by
selections from the DTPickers then added subsequently into the string
for the SQL query.

any help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top