Hello,
I am having trouble with the ReportViewer. I am in a MVC projet but i already had this control working and looking fine in MVC. the display looks odd but not like
"The styles of the web report viewer's toolbar are messed up"
If you have any clues...
I am having trouble with the ReportViewer. I am in a MVC projet but i already had this control working and looking fine in MVC. the display looks odd but not like
"The styles of the web report viewer's toolbar are messed up"
If you have any clues...
4 Answers, 1 is accepted
0
Hello Paul,
In a new ASP.NET MVC Web Application the styles are defined in the Site.css style sheet. It specifies global styles for all table, table td and table th html elements without any restrictions which causes the problem. To fix the report viewer appearance, please remove these styles from the Site.css, clear the browser's cache (from Tools | Internet Options | General tab | Browsing History - Delete button and refresh the page. To customize table elements you can always create a custom style class and use the class attribute of the respective html elements to point to this class.
Hope this helps.
All the best,
Steve
the Telerik team
In a new ASP.NET MVC Web Application the styles are defined in the Site.css style sheet. It specifies global styles for all table, table td and table th html elements without any restrictions which causes the problem. To fix the report viewer appearance, please remove these styles from the Site.css, clear the browser's cache (from Tools | Internet Options | General tab | Browsing History - Delete button and refresh the page. To customize table elements you can always create a custom style class and use the class attribute of the respective html elements to point to this class.
Copy Code
/* TABLE
----------------------------------------------------------*/
table
{
border: solid 1px #e8eef4;
border-collapse: collapse;
}
table td
{
padding: 5px;
border: solid 1px #e8eef4;
}
table th
{
padding: 6px 5px;
text-align: left;
background-color: #e8eef4;
border: solid 1px #e8eef4;
}
Hope this helps.
All the best,
Steve
the Telerik team
0

Paul
Top achievements
Rank 1
answered on 02 Dec 2010, 05:37 PM
That was a quick answer but in MVC every page uses table style css. Is there a way to tell the ReportViewer not to take the Style.css?
Thank you for you suport.
Thank you for you suport.
0
Hi Paul,
Generally it is not a good practice to affect html elements globally and a preferred approach is to style your pages using the CssClass property. Why Visual Studio comes with such a default template for MVC is unknown and unfortunately out of our control.
Greetings,
Steve
the Telerik team
Generally it is not a good practice to affect html elements globally and a preferred approach is to style your pages using the CssClass property. Why Visual Studio comes with such a default template for MVC is unknown and unfortunately out of our control.
Greetings,
Steve
the Telerik team
0

Paul
Top achievements
Rank 1
answered on 02 Dec 2010, 05:54 PM
Is it possible to apply a ASP.NET WebForm stylesheet (or a custom one made for the control) to the ReportViewer by the CssClass prop? Will it style have side effects?