c# - Reporting Services (.RDLC) Two Datasets -
i have .rdlc 2 datasources. when using datasource named "dslancamentos", working fine. now, i've add second one, named "dsdespesas", , report viewer throws message:
a data source instance has not been supplied data source 'dsdespesas'.
and here code:
var dsreportlancamentos = new dsreportlancamentostableadapters.pr_report_lancamentostableadapter(); var dsreportdespesas = new dsreportlancamentostableadapters.pr_report_sea_despesastableadapter(); var tabela = (datatable)dsreportlancamentos.getdata(txtnomeproduto.text, funcoes.getdatetimevalueornull(datade), funcoes.getdatetimevalueornull(dataate), funcoes.getbytevalueornull(status)); var despesas = (datatable)dsreportdespesas.getdata(funcoes.getdatetimevalueornull(datade), funcoes.getdatetimevalueornull(dataate)); // configuraÇÕes report ----------------------- reportdatasource rds = new reportdatasource("dslancamentos", tabela); reportdatasource rdsdespesa = new reportdatasource("dsdespesas", despesas); rvreport.reset(); rvreport.processingmode = processingmode.local; rvreport.localreport.reportpath = server.mappath("~/reports/lancamentosreport.rdlc"); rvreport.localreport.datasources.add(rds); rvreport.localreport.datasources.add(rdsdespesa); // -----------------------------------------------
can me this? can't find whats wrong.
tks.
to update datasets in report definition
1.open client report definition (.rdlc) file in visual studio report designer.
2.from view menu, select report data. report data window appears. add new dataset report definition, in report data window's toolbar, select new, , select dataset.
3. click refresh update report definition file changes.
Comments
Post a Comment