How to assign stylesheet to reportviewer control?
Hi,
I have used the report viewer control to display reports (rdlc file) in my asp.net application. But i am not able to assign the stylesheet to that control. due to that it takes some styles from applciation css and toolbar not aligned properly.
If you have solution please help me in doing that.Thanks, Pranil Yambal | MCTS | Pranil.Yambal@hotmail.com
May 16th, 2011 10:56am
Hello,
Currently it is not possible to control the report viewer using CSS.
This thread
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/2afa03eb-14c8-4c49-9542-2a6434cf88ba/ follows a similar line to your own.
It is possible to use a database to hold a lot of styles for SSRS then return them to your report. All reprots controlled by the database can then be updated for style together.
Kind regards.FredSQL
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 11:29am
Hi Pranil,
Just as FredSQL's reply, we might not be able to control ReportViewer's style using CSS file, but ReportViewer has some API for us to customize the style, you can do some change to the style of ReportViewer, you can have a look at this external API
http://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.reportviewer_properties(v=VS.100).aspx, you can write some code-behind or HTML code to achieve your requirement, but all your requirement is
based on these API.
Similar thread
http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/29e00bc5-0a2c-4748-a7bb-fd1076462e3c
Thanks,
Challen FuPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
May 18th, 2011 2:10am
Hi,
Thanks for reply.
I have modify some properties of reportviewer control and get the required solution . But when i place a reportviewer control inside any control which has stylesheet class. so it reflect reportviewer toolbar alignment.
so i have remove control from that stylesheet.Thanks, Pranil Yambal | MCTS | Pranil.Yambal@hotmail.com
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 12:02pm