共享数据集定义无效。报告定义元素'数据集'是空的

时间:2014-12-02 22:26:17

标签: sql-server-2008 reporting-services ssrs-2008 temp-tables

     SELECT PRODDTA.F4006.OADOCO, PRODDTA.F4006.OADCTO, PRODDTA.F4006.OAKCOO,          PRODDTA.F4006.OAANTY, PRODDTA.F4006.OAMLNM, PRODDTA.F4006.OAADD1, PRODDTA.F4006.OAADD2, PRODDTA.F4006.OAADD3, PRODDTA.F4006.OAADD4, PRODDTA.F4006.OAADDZ, PRODDTA.F4006.OACTY1, PRODDTA.F4006.OACOUN, PRODDTA.F4006.OAADDS, PRODDTA.F4006.OACRTE, PRODDTA.F4006.OABKML, PRODDTA.F4006.OACTR, PRODDTA.F4006.OAUSER, PRODDTA.F4006.OAPID, PRODDTA.F4006.OAUPMJ, PRODDTA.F4006.OAJOBN, PRODDTA.F4006.OAUPMT, PRODDTA.F4006.OALNID
     INTO #BAF4006ShipTo
     FROM PRODDTA.F4006
     WHERE (PRODDTA.F4006.OAANTY='2');

     SELECT PRODDTA.F4211.SDKCOO, PRODDTA.F4211.SDDOCO, PRODDTA.F4211.SDDCTO, PRODDTA.F4211.SDAN8, PRODDTA.F4211.SDSHAN, PRODDTA.F4211.SDDOC, PRODDTA.F4211.SDDCT, PRODDTA.F4211.SDNXTR
     INTO #BAFSumF4211byInvoice
     FROM PRODDTA.F4211
     GROUP BY PRODDTA.F4211.SDKCOO, PRODDTA.F4211.SDDOCO, PRODDTA.F4211.SDDCTO, PRODDTA.F4211.SDAN8, PRODDTA.F4211.SDSHAN, PRODDTA.F4211.SDDOC, PRODDTA.F4211.SDDCT, PRODDTA.F4211.SDNXTR
     HAVING ((PRODDTA.F4211.SDKCOO='00035') AND (PRODDTA.F4211.SDNXTR='999'));

     SELECT PRODDTA.F0018.TDCO, PRODDTA.F0018.TDDCTO, PRODDTA.F0018.TDDOCO, PRODDTA.F0018.TDAN8, PRODDTA.F0101.ABALPH, PRODDTA.F0116.ALADDS, (PRODDTA.F0018.TDAEXP/100) AS TDAEXP, (PRODDTA.F0018.TDATXN/100) AS TDATXN, (PRODDTA.F0018.TDATXA/100) AS TDATXA, (PRODDTA.F0018.TDSTAM/100) AS TDSTAM, PRODDTA.F0018.TDTXA1, PRODDTA.F0018.TDEXR1, PRODDTA.F0018.TDDGL, PRODDTA.F0018.TDDSVJ
     INTO #BAFTaxQuery
     FROM (PRODDTA.F0018 INNER JOIN PRODDTA.F0101 ON PRODDTA.F0018.TDAN8 = PRODDTA.F0101.ABAN8) INNER JOIN PRODDTA.F0116 ON PRODDTA.F0018.TDAN8 = PRODDTA.F0116.ALAN8
     WHERE ((PRODDTA.F0018.TDCO='00035') AND (PRODDTA.F0018.TDDCTO='RI') AND (PRODDTA.F0018.TDDGL>114182 And PRODDTA.F0018.TDDGL<=114273));

     SELECT #BAFTaxQuery.TDCO, #BAFTaxQuery.TDDCTO, #BAFTaxQuery.TDDOCO, #BAFSumF4211byInvoice.SDDOCO, #BAFSumF4211byInvoice.SDDCTO, #BAFTaxQuery.TDAN8, #BAFTaxQuery.ABALPH, #BAFTaxQuery.ALADDS, #BAFSumF4211byInvoice.SDSHAN, #BAFTaxQuery.TDAEXP, #BAFTaxQuery.TDATXN, #BAFTaxQuery.TDATXA, #BAFTaxQuery.TDSTAM, #BAFTaxQuery.TDTXA1, #BAFTaxQuery.TDEXR1, #BAFTaxQuery.TDDGL, #BAFTaxQuery.TDDSVJ
     INTO #BAFTaxQuery2
     FROM #BAFTaxQuery LEFT JOIN #BAFSumF4211byInvoice ON (#BAFTaxQuery.TDDOCO = #BAFSumF4211byInvoice.SDDOC) AND (#BAFTaxQuery.TDDCTO = #BAFSumF4211byInvoice.SDDCT);

     SELECT #BAFTaxQuery2.TDCO, #BAFTaxQuery2.TDDCTO, #BAFTaxQuery2.TDDOCO, #BAFTaxQuery2.SDDOCO, #BAFTaxQuery2.SDDCTO, #BAFTaxQuery2.TDAN8, #BAFTaxQuery2.ABALPH as BAFTaxQuery2_ABALPH, #BAFTaxQuery2.ALADDS as BAFTaxQuery2_ALADDS, #BAFTaxQuery2.SDSHAN,PRODDTA.F0101.ABALPH as BAFTaxQuery3_ABALPH, PRODDTA.F0116.ALADDS as BAFTaxQuery3_ALADDS, #BAFTaxQuery2.TDAEXP, #BAFTaxQuery2.TDATXN, #BAFTaxQuery2.TDATXA, #BAFTaxQuery2.TDSTAM, #BAFTaxQuery2.TDTXA1, #BAFTaxQuery2.TDEXR1, #BAFTaxQuery2.TDDGL, #BAFTaxQuery2.TDDSVJ 
     INTO #BAFTaxQuery3
     FROM #BAFTaxQuery2 INNER JOIN PRODDTA.F0101 ON #BAFTaxQuery2.SDSHAN = PRODDTA.F0101.ABAN8 INNER JOIN PRODDTA.F0116 ON #BAFTaxQuery2.SDSHAN = PRODDTA.F0116.ALAN8;

     SELECT #BAFTaxQuery3.TDCO, #BAFTaxQuery3.TDDCTO, #BAFTaxQuery3.TDDOCO, #BAFTaxQuery3.SDDOCO, #BAFTaxQuery3.SDDCTO, #BAFTaxQuery3.TDAN8, #BAFTaxQuery3.BAFTaxQuery2_ABALPH, #BAFTaxQuery3.BAFTaxQuery2_ALADDS, #BAFTaxQuery3.SDSHAN, #BAFTaxQuery3.BAFTaxQuery3_ABALPH, #BAFTaxQuery3.BAFTaxQuery3_ALADDS,#BAFTaxQuery3.TDAEXP, #BAFTaxQuery3.TDATXN, #BAFTaxQuery3.TDATXA, #BAFTaxQuery3.TDSTAM, #BAFTaxQuery3.TDTXA1, #BAFTaxQuery3.TDEXR1, #BAFTaxQuery3.TDDGL, #BAFTaxQuery3.TDDSVJ, #BAF4006ShipTo.OAMLNM, #BAF4006ShipTo.OACTY1, #BAF4006ShipTo.OAADDS
     INTO #BAFTaxReportQuery
     FROM #BAFTaxQuery3 LEFT JOIN #BAF4006ShipTo ON (#BAFTaxQuery3.SDDCTO = #BAF4006ShipTo.OADCTO) AND (#BAFTaxQuery3.SDDOCO = #BAF4006ShipTo.OADOCO) AND (#BAFTaxQuery3.TDCO = #BAF4006ShipTo.OAKCOO);

     DROP TABLE #BAF4006ShipTo
     DROP TABLE #BAFTaxQuery
     DROP TABLE #BAFTaxQuery2
     DROP TABLE #BAFSumF4211byInvoice
     DROP TABLE #BAFTaxQuery3
     DROP TABLE #BAFTaxReportQuery

Query在Sql Server中运行正常。 我创建了共享数据集作为&#39; Text&#39;并且我能够成功创建。

但是在我添加数据集的报告中,没有显示任何字段。 我尝试手动添加它但是得到了这个错误。 &#34;共享数据集定义无效。报告定义元素&#39;数据集&#39;在第43行,第5行是空的。它缺少类型&#39;字段的强制性chid元素。&#39;&#34;

0 个答案:

没有答案