How do I change the style of the report viewer?
The below sample allows you to change the style of the ReportViewer. HtmlTable toptable;
toptable = (HtmlTable)HtmlOutputReportResults1.FindControl("ReportControlTable");
toptable.Attributes["class"] = "ReportViewerTopTable";
toptable.CellSpacing = 5;
HtmlTable bottomtable;
bottomtable = (HtmlTable)HtmlOutputReportResults1.FindControl("FiltersTable");
bottomtable.Attributes["class"] = "ReportViewerTopTable";
bottomtable.BgColor = "#EEEEEE";
bottomtable.Style.Clear();
bottomtable.Border = 1;
bottomtable.BorderColor = "#EEEEEE";
HtmlTableCell toolcell;
toolcell = (HtmlTableCell)HtmlOutputReportResults1.FindControl("ToolBarHeader");
toolcell.Attributes["class"] = "ToolBarHeader";
toolcell.BgColor = "#EEEEEE";
toolcell.BorderColor = "#EEEEEE";
toolcell.Style.Clear();
The sample image below is the results of the sample code above.