vb.net - Does not taking the update data -
i have 1 dataset
binding in reportviewer
, dataset
have 2 paramters, in study loud info displays in set problem when pass paremeters in new values reportviewer
, click search button
previous info in reportviewer
meat changes. means newer searched info not displayed!
here code:
protected sub page_load(byval sender object, byval e system.eventargs) handles me.load mysession() reportviewer1.processingmode = processingmode.local dim rep localreport = reportviewer1.localreport rep.reportpath = "leaving report.rdlc" dim ds1 dataset = getdata() dim empreplt new reportdatasource() empreplt.name = "proldataset_lrepoert" empreplt.value = ds1.tables("empdata") rep.datasources.add(empreplt) end sub private function getsalesdata() dim ds new dataset dim sql string = "select * laeve status='" & dropdownlist1.selectedvalue & "' , agent='" & session("agence") & "'" dim command new sqlcommand(sql,con) dim mysqladapter new sqldataadapter(command) mysqladapter.fill(ds, "empdata") mysqladapter.dispose() command.dispose() end using homecoming ds end function end sub protected sub search_click(byval sender object, byval e eventargs) handles button2.click reportviewer1.localreport.refresh() end sub
try place .ispostback
using webforms reportviewer control
protected sub page_load(byval sender object, byval e system.eventargs) handles me.load mysession() if not page.ispostback reportviewer1.processingmode = processingmode.local dim rep localreport = reportviewer1.localreport rep.reportpath = "leaving report.rdlc" dim ds1 dataset = getdata() dim empreplt new reportdatasource() empreplt.name = "proldataset_lrepoert" empreplt.value = ds1.tables("empdata") rep.datasources.add(empreplt) end if end sub
vb.net webforms reportviewer rdlc
No comments:
Post a Comment