vb.net - Error Rendering report with multiple parameters -
i have project trying fix created person no longer works our company. can me figure out why getting this
localprocessingexception occurred
error? below code. dies on response.buffer = true
. of parameters have data in them. seems though 1 of report generation variables doesn't have data in them. assuming 1 of these
warnings
streamids
mimetype
encoding
format
extension
devinfo
any great. have tried lot of other suggestions on site no avail. , said first code i've gotten into. stack trace @ end.
//report generation variables dim warnings warning() = nothing dim streamids string() = nothing dim mimetype string = "" dim encoding string = "" dim format string = "pdf" dim extension string = "" dim devinfo string = "<deviceinfo><toolbar>true</toolbar></deviceinfo>" dim bytes byte() = nothing dim lr new localreport dim leadstable datatable = retrievepersons(casenum.text) dim suppltable datatable = ctype(session("persontable"), datatable) dim persontable datatable = combinepersons(leadstable, suppltable) //if there data ... if persontable.rows.count > 0 //assume best .... ctlnotice.visible = false ctlnotice.text = "" //retrieve charges dim chargestable datatable = retrievecharges(casenum.text) dim chargestable datatable = ctype(session("chargetable"), datatable) dim employeetable datatable = retrieveemployee() session("employeetable") = employeetable //make sure there charges added if chargestable.rows.count = 0 ctlnotice.visible = true ctlnotice.text = "there no charges. please add them first." else lr.reportembeddedresource = "crform.rdlc" lr.datasources.add(new reportdatasource("acrdataset_datatable1", persontable)) //charges charge subreport lr.datasources.add(new reportdatasource("charges02_chargestable", chargestable)) //employee specific information lr.datasources.add(new reportdatasource("employee2", employeetable)) //add datasource update subreport addhandler lr.subreportprocessing, addressof subreportprocessingeventhandler lr.setparameters(myparam) deviceinfo = "<deviceinfo><outputformat>pdf</outputformat></deviceinfo>" try bytes = lr.render(format, devinfo, extension, encoding, mimetype, streamids, warnings) response.buffer = true response.clear() response.contenttype = mimetype response.addheader("content-disposition", "attachment; filename=chargingrequest_" + cleancasenum(casenum.text) + ".pdf") response.binarywrite(bytes) response.flush() session("localreport") = bytes catch exn exception ctlnotice.text = "call support!. can't create report! " & exn.message ctlnotice.visible = true end try
stack trace
at microsoft.reporting.webforms.localreport.internalrender(string format, boolean allowinternalrenderers, string deviceinfo, pagecountmode pagecountmode, createandregisterstream createstreamcallback, warning[]& warnings) @ microsoft.reporting.webforms.localreport.internalrender(string format, boolean allowinternalrenderers, string deviceinfo, pagecountmode pagecountmode, string& mimetype, string& encoding, string& filenameextension, string[]& streams, warning[]& warnings) @ microsoft.reporting.webforms.localreport.render(string format, string deviceinfo, pagecountmode pagecountmode, string& mimetype, string& encoding, string& filenameextension, string[]& streams, warning[]& warnings) @ microsoft.reporting.webforms.report.render(string format, string deviceinfo, string& mimetype, string& encoding, string& filenameextension, string[]& streams, warning[]& warnings) @ chargingrequest._default.btnprint_click(object sender, eventargs e) in h:\visual studio 2010\chargingrequest\chargingrequest\chargereq.aspx.vb:line 301`
Comments
Post a Comment