vb.net - No Data Returned on VB Report -


i'm new vb please don't laugh loudly @ coding skills :)

i have created dataset (dataset1) pulls 2 tables. sql on table adapter joins 2 tables. table adapters return data correctly. data sources on report viewer are:

 dataset1_uapowdercoat  dataset1_uapowdercoattype 

and both instantiated binding sources. there report parameter (lot num) needs filter info in report data 1 row.

code in form load event:

 me.reportviewer1.localreport.datasources.clear()         me.reportviewer1.localreport.datasources.add(new microsoft.reporting.winforms.reportdatasource("dataset1_uapowdercoat", uapowdercoattableadapter.getdata()))         me.reportviewer1.localreport.datasources.add(new microsoft.reporting.winforms.reportdatasource("dataset1_uapowdercoattype", uapowdercoattypetableadapter.getdata()))         me.reportviewer1.refreshreport() 

and in report event:

  dim params(0) microsoft.reporting.winforms.reportparameter         params(0) = new microsoft.reporting.winforms.reportparameter("report_parameter_0", me.txtlotnumber.text)          reportviewer1.localreport.setparameters(params)         me.uapowdercoattableadapter.fillbypclotnbr(dataset1.uapowdercoat, me.txtlotnumber.text)         me.reportviewer1.refreshreport() 

report fields are: =parameters!report_parameter_0.value

=(fields!pcstrength.value)

the parameter field works fine, can't rest of fields populate (just #error). have researched , tried ton of different things , if 1 thing fixed else goes wrong. can help?

thanks!!!

i suspect have data source binding error or syntax error in field. try 1 of following:

  • for data source bindings, make sure bindingsource , datasources both connected report , report has access them. heres how bind data sources:

    this.bindingsource1.datasource = somelist; this.reportviewer1.localreport.datasources.add(new reportdatasource("somedatatablename", (this.pointbindingsource)));

  • also, noticed difference in dataset name in dataset1_uapowdercoat , fillbypclotnbr(dataset1.uapowdercoat. error?

  • make sure =parameters!report_parameter_0.value =(fields!pcstrength.value) correct syntax. missing iff statement?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -