0

データソース レポート グラフに Session[CountryList"] を使用したいと考えています。

レポートにグラフを追加しましたが、コードがありません。

Session[CountryList"] をデータソースとして追加し、レポート チャートに表示するにはどうすればよいですか?

モデル:

public static IList<Country> GetCountries()
{
return new List<Country>(){
new Country("Russia", 50),
new Country("Canada", 231),
new Country("USA", 33),
new Country("China", 111),
new Country("Brazil", 14),
new Country("Australia", 140),
new Country("India", 434),
new Country("Turkey", 3),
new Country("England", 21),
new Country("Greece", 116)
};
}
}
public class Country
{
string name;
double area;
public string Name { get { return name; } }
public double Area { get { return area; } }
public Country(string name, double area)
{
this.name = name;
this.area = area;
}
}

コントローラ:

public ActionResult ReportViewerPartial()
{

Session["CountriesDatas"] = CountriesProvider.GetCountries(); //Country List

XtraReport1 report = new Q502351.Reports.XtraReport1();
report.DataSourceDemanded += report_DataSourceDemanded;
ViewData["Report"] = report;
return PartialView("ReportViewerPartial");
}
4

1 に答える 1