c# - Crystal Reports keeps prompting for Parameter -
i having terrible problem crystal report 2010 .net 4.0 (i using fixed 13.0.1 version 13.0.4 released). no matter way try, getting prompting dialogue box input 1 parameter value first time.
crystalreportviewer1.reportsource = customerreport1; customerreport1.database.tables[0].setdatasource ( this.dataset); customerreport1.setparametervalue("pathlocation", location.text); customerreport1.parameter_pathlocation.currentvalues.add(location.text) // safe using cs 2010 .net 4 crystalreportviewer1.reusereportparametersonrefresh = true; // prevent showing again , again.
i tried this:
customerreport1.database.tables[0].setdatasource ( this.dataset); customerreport1.setparametervalue("pathlocation", location.text); crystalreportviewer1.reportsource = customerreport1;
and this:
customerreport1.database.tables[0].setdatasource ( this.dataset); customerreport1.parameter_pathlocation.currentvalues.add(location.text) crystalreportviewer1.reportsource = customerreport1; // parameter in report has optional parameter = false, static , multiple value = false .
can please help? getting frustrated this. worked in previous versions, getting prompt box.
thank you.
finally found solution. doesn't prompt if set datasource
after parametervalue
.
so of work if put them in order:
// first, call setparametervalue. then, call setdatasource. customerreport1.setparametervalue("pathlocation", location.text); customerreport1.database.tables[0].setdatasource(this.dataset); crystalreportviewer1.reportsource = customerreport1;
thank all.
Comments
Post a Comment