c# - ReportViewer in Windows Application not working in XP -
in windows application developed using vs13 (windows 8.1) able see rdlc reports(using report viewer). when try view report in xp machine , application getting closed. i'm using subreports in rdlc report. not know exact problem feel this.reportviewer1.refreshreport();
getting issue. when comment this.reportviewer1.refreshreport();
, check in xp machine not see data application not closing , able see report. have developed reports microsoft.reportviewer.common.dll , microsoft.reportviewer.winforms.dll of version 11. make application run on xp machine have compiled application , referred v10 dlls. not know if there issue here well. can issue?
this code behind of report viewer form :
public kcform21(xmlparameters objparams) { gobjlog = applogwriter.instance; gobjparams = objparams; initializecomponent(); this.size = screen.primaryscreen.workingarea.size; datatable dt = new datatable(); try { dtsurvey = new datatable(); daclass obj = new daclass(); dt = obj.win_get_kc_header(gobjparams); reportviewer1.processingmode = processingmode.local; gobjlog.writetolog("kathachangeform21 - before binding rdlc."); reportviewer1.localreport.reportpath = appdomain.currentdomain.basedirectory.tostring() + configurationmanager.appsettings["reportpath"].tostring().trim() + "kathachangeform21.rdlc"; gobjlog.writetolog("kathachangeform21 - after binding rdlc."); gobjlog.writetolog("rdlc path : " + reportviewer1.localreport.reportpath.tostring().trim()); reportviewer1.localreport.datasources.clear(); reportdatasource datasource = new reportdatasource("dataset1", dt); reportviewer1.localreport.datasources.clear(); reportviewer1.localreport.datasources.add(datasource); dtsurvey = dt; this.reportviewer1.localreport.subreportprocessing += new subreportprocessingeventhandler(kcform21subreport); //this.reportviewer1.setdisplaymode(displaymode.printlayout); //this.reportviewer1.zoommode = zoommode.percent; //this.reportviewer1.zoompercent = 50; this.reportviewer1.refreshreport(); //reportviewer1.refresh(); } catch (exception ex) { gobjlog.writetolog("kcform21 : " + ex.message); } { gobjlog = null; } //this.reportviewer1.refreshreport(); } public void kcform21subreport(object sender, subreportprocessingeventargs e) { daclass obj = new daclass(); gobjlog = applogwriter.instance; try { if (count % 2 == 0) { datatable dt = new datatable(); dt = obj.win_get_kc_oldown(gobjparams, dtsurvey.rows[oldowncount]["land_code"].tostring()); reportdatasource subrptsource = new reportdatasource("oldowner", dt); e.datasources.add(subrptsource); oldowncount++; } else { datatable dtnew = new datatable(); dtnew = obj.win_get_kc_newown(gobjparams, dtsurvey.rows[newowncount]["land_code"].tostring()); reportdatasource subrptsourcenew = new reportdatasource("newowner", dtnew); e.datasources.add(subrptsourcenew); newowncount++; } count++; } catch (exception ex) { gobjlog.writetolog("kcform21subreport : " + ex.message); } }
Comments
Post a Comment