rdlc files

dpatfield66

Well-known member
Joined
Apr 6, 2006
Messages
136
Programming Experience
5-10
Rather than use Crystal Reports (which I like better), my boss has asked me to use the .rdlc files in VS Studio.
I've created a frmReport.vb with a ReportViewer1 embedded. I initially pulled down one of my .rdlc reports as the data source for the ReportViewer1.
It created 3 objects on the bottom of my frmReport (FormsDataSet, OBAdmitBindingSource, & OBAdmitTableAdapter)
It works great, love it.

However...NOW...I'd like to programmatically select these things for the ReportViewer1 object depending on what the User selects. If they select an Admit Record, then the above is fine,
But if they select a Triage Record, I need to see:
(FormsDataSet,OBTriageBindingSource, OBTriageTableAdapter)
I shouldn't have to create a ReportViewer1 and a ReportViewer2 considering I have a million reports. I just want to adjust the Binding Source and adapter.

ALSO, I have an OBAdmit.vb class and an OBTriage.vb class where all my relevant queries and such are occurring. I REALLY need the datasource of the reportviewer1 to point to these classes. In other words I want the classes to do the filling in the dataset.

In other words, I can use my class to fill the dataset with one record:
VB.NET:
obixAdmit.LoadAll
dv(1) as New DataView
dv(1).rowfilter = "AdmitID = '" & intRecordID & "'"
OR if the user selects a Triage record from the menu:
obixTriage.LoadAll
dv(1) as New DataView
dv(1).rowfilter = "TriageID= '" & intRecordID & "'"
How can I get these above to go to my reportviewer1 as a datasource?
Obviously I want my rptAdmit.rdlc to be the object OR rptTriage.rdlc depending.
 
Last edited by a moderator:
Back
Top