Reporting help with rdlc files

dpatfield66

Well-known member
Joined
Apr 6, 2006
Messages
136
Programming Experience
5-10
:mad: Isn't there anyone out there who can help me with .rdlc files?
Here's an example of my dilemma: I have 2 tables in my Forms database in SQL (OBAdmit and OBTriage)
The data source wizard creates a <FormsDataSet.xsd> and I used to create queries in design view using the tableadapter (fill, update, etc...)
Someone showed my how to create classes instead (one each for OBAdmit and OBTriage). Through these classes I reference the FormsDataSet and OBAdmit/OBTriage DataTables. It works great! Now, I can delete my FormsDataSet (should I do modifications to the SQL table) and then reattach the DataSet with the newly modified fields (added/deleted/whatever) BACK into my project without worrying about wiping out queries I created. All my queries are located in my Classes, and work great.
Here's the issue. When I create a .rdlc report file, and connect it to my dataset (FormsDataSet) and effectively, one of my tables (OBAdmit for the rptAdmit.rdlc and OBTriage for the rptTriage.rdlc), it seems to point to the dataset but won't use my queries that I've created in my classes. I've tried to modify the source code to point to my classes where the queries I use are supposed to be sourcedate for these reports, but it keeps creating bindingsources and stuff automatically. When I wipe out these binding sources so I can try to point to my class, it just tells me that I need to create an instance of FormsDataSet_OBTriage, for example.
Why :mad: won't it point to my Class queries??
Inside my classes, I've created references to the TableAdapters necessary, and the DataTables as well.
I've even created instances of these classes.
For example: Dim obixAdmit as NEW OBAdmit
Now, I should be able to say: obixAdmit.LoadAll() ...where LoadAll() is a method that calls a query. it's located in my OBAdmit class.
When I set the reportviewer to frmAdmit.rdlc, for example. It creates a FormsDataSet object ON THE FORM, an OBAdmitBindingSource object, AND OBAdmitTableAdapter. Then it USES these to populate my frmAdmit.rdlc. I don't WANT to use these, I want to use my class, which ALSO instantiates a tableadapter object to do the querying.
Where am I going wrong? Help, please?
 
Back
Top