1

I have various reports built in MS SQL 2005 Report Designer, displaying various sums and counts of different data. Now I need to implement different types of charts in these reports (Bar graphs, Pie charts), using the data from the summed cells (subtotals and grand totals for groups).

I don't see any ways to specify a table cell as input for a chart's data in the chart properties, it gives me errors saying it's not part of the "data region." I can't find any info on how to create data regions, and I assume I don't want to use "data output" because that only deals with exporting xml?

Can anyone give me some direction on how to easily link table group subtotals to chart input data?

Thanks

4

2 に答える 2

0

異なるレポート アイテム (テーブル、グラフなど) は、1 つのデータセットから派生する必要はありません。レポート項目ごとに異なるデータセットを使用するだけです。メイン レポート テーブルで、さまざまな支店から送信された請求書を示すデータセットを使用し、支店レベルで合計するとします。

SELECT Branch, InvoiceNumber, InvoiceDate, InvoiceAmount
FROM Invoices
ORDER BY Branch, InvoiceNumber

要約情報である円グラフ用に別のデータセットを作成するだけです。

SELECT Branch, SUM(InvoiceAmount) AS BranchSum
FROM Invoices
GROUP BY Branch
于 2011-06-15T01:31:02.657 に答える
0

データセットを呼び出す式を作成したい

=Sum(Fields!InvoiceAmount.value, "DataSet1")

同じフィールドを呼び出したい場合は、select ステートメントで AS を使用してください。

Invoices.InvoiceAmount AS InvoiceAmt を選択します

InvoiceAmt は、invoiceamount と等しい使用可能なフィールドになります。

于 2011-08-18T18:49:10.003 に答える