These are My Drop downs in DesignPage.cshtml
@Html.LabelFor(m => m.LocationId, new { @class = "label_intro" })
@Html.DropDownListFor(m => m.LocationId,
new SelectList(Model.Locations.ToList(), "Id", "Name", Model.LocationId),
new { id = "patron-location", style = " width:300px", @class = "chosen-select", tabindex = "1" })
@Html.LabelFor(m => m.CategoryId, new { @class = "label_intro" })
@Html.DropDownListFor(m => m.CategoryId,
new SelectList(Model.Categories.ToList(), "Id", "Name", Model.CategoryId), "All",
new { id = "patron-category", style = " width:300px", @class = "chosen-select", tabindex = "1" })
=============================================================
My Controller Method
=============================================================
public ActionResult PatronBarGraph(FormCollection Form)
{
string patrontype = Form["patrontype"];
string location = Form["LocationId"];
string category = Form["CategoryId"];
string ReportTypeTitle = string.Empty;
string reportName = string.Empty;
int locationId = Convert.ToInt32(location);
int categoryId = (string.IsNullOrEmpty(category)) ? 0 : Convert.ToInt32(category);
if (patrontype.Equals("ActivePatronsByRace"))
{
reportName = "PatronBarGraphByLC";
ReportTypeTitle = "Active Patrons by Race Count";
}
else if (patrontype.Equals("InActivePatronsByRace"))
{
reportName = "PatronBarGraphByLC";
ReportTypeTitle = "InActive Patrons by Race Count";
}
var rpt = new Services.Report.ReportService(reportName, null);
var service = new PatronService(DataContext);
if (patrontype.Equals("ActivePatronsByRace"))
{
rpt.ReportDocument.SetDataSource(service.GetRaceCountOfActivePatrons(locationId,categoryId));
}
else if (patrontype.Equals("InActivePatronsByRace"))
{
rpt.ReportDocument.SetDataSource(service.GetRaceCountOfInActivePatrons(locationId, categoryId));
}
rpt.ReportDocument.SummaryInfo.ReportTitle = string.Format("Bar Chart Report for {0}", ReportTypeTitle);
return ReturnPDF(rpt.GetPDFStream(), reportName);
}
==============================================================
I want to Show Location and Category Name on The Report For the Selection Criteria.