The report has no tables in VB.NET -
i designing windows based application in vb.net 2008 using ms access .mdb file. below code; issue face report has no tables. have no typed dataset. directly populating reports below query:
imports system.data imports system.data.oledb public class frminvoicereport public da oledbdataadapter public ds dataset public con oledbconnection public cmd oledbcommand public dt datatable public sbuilder oledbcommandbuilder public sqlq, constr, table string private sub frminvoicereport_load(byval sender system.object, byval e system.eventargs) handles mybase.load constr = ("provider=microsoft.ace.oledb.12.0;data source=" & my.application.info.directorypath & "\shri_swami_samartha_classes.mdb") con = new oledbconnection(constr) con.open() sqlq = "select * invoicerptquery serialcode =1" if con.state = connectionstate.open con.close() con.open() da = new oledbdataadapter(sqlq, con) ds = new dataset da.fill(ds) con.close() dim obj new mrptv1 obj.setdatasource(ds.tables("invoicerptquery")) crystalreportviewer1.reportsource = obj crystalreportviewer1.refresh() end sub end class
Comments
Post a Comment