I am new to SSRS. I have created a report and was able to deploy it on the server. I am calling the report from ASP.NET application. How can I change the CSS of the report? I want to change the styles for individual data cells of the table deing displayed also. How is it possible? Thanks in advance.
You can customize the CSS at <drive>:\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\Stylesor you can specify your own Stylesheet.
See this MSDN article for complete reference: Customizing Style Sheets for HTML Viewer and Report Manager
Magier:
There is a relatively simple way to do this (report by report) when using SSRS URL access to display the reports.
You create custom stylesheets on the report server for whatever different options you want to show or hide (or anything else in the Report Toolbar that you want to customize) and save them to: :\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\Styles
Then, you simply add an &rc:Stylesheet= parameter to the URL you use to display the report, and spec whichever stylesheet you want. Your code can determine what the value of the rc:Stylesheet is:
ie:
http://localhost/reportserver?/AdventureWorksSampleReports/Product+Line+Sales&rs:Command=Render&rc:Stylesheet=NameOfYourStlesheetSansExtension
So as you can see, it can be dynamic, and (as far as I can tell), is the only straightforward way of controlling the ReportViewer styles in SSRS.
Source (same as the above answers, I just wanted to explain how to style on report by report basis): https://msdn.microsoft.com/en-us/library/ms345247.aspx
Related
I have a weppart page I'm editing in SharePoint Web. I have an excel workbook display webpart in a column. The webpart has a summary toolbar for open in excel, download, and such. The toolbar has multiple buttons displayed to the user that I want to remove. Foe example, the first one is Edit in Excel.
I added a content editor for CSS and used
.cui-ctl-mdedium,
.cui-ctl-mdediumlabel
Display:None;
I've tried multiple classes, targeting just the webpart, using !important and such with no luck. Any thoughts?
Element/Class info
Are you sure you've written that selector correctly? The class name is actually .cui-ctl-mediumlabel ... you've written it with a "1". Not much to do in this case without code or anything to actually try it out. Have you tried solving your problem with your browser's dev tools adding rules?
I have googled too many links but all I get is to handle above requirement using report viewer at server side only.
I want some solution at my end only.
For ex: While creating\modifying rdlc file, would it be possible to restrict the export options ? Either using the report properties or writing custom code in report code section.
I have worked on rdl files & not rdlc's so don't have much idea about it.
I hope this question stands correctly under stack standards !
Thanks,
EDIT: This is not a possible duplicate questions because this question focusing on how to achieve the requirement in the report itself without making any changes in the configuration files at server. Other questions\answers focused on changes in the configuration files at server.
Thank you #alejandro zuleta.
We can write a visibility expression for the specific tables\object which is showing the data in the report. The data will be visible only when the report is viewed in application OR exported to PDF.
=IIF(Globals!RenderFormat.IsInteractive = "True", False, IIF(Globals!RenderFormat.Name = "PDF", False, True))
OR
We can suppress the export options other than PDF for all the SSRS reports (rdlc) available. For this, we need to add below jQuery code in the end of the </body> of SSRSReportViewer.aspx report viewer control.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(document).ready(function () {
$("a[title='Word']").parent().hide();
$("a[title='Excel']").parent().hide(); });
</script>
It is not possible to restrict export options using report custom code or any report property. The closest thing you can do using report properties is hide report components based on the Globals!RenderFormat.IsInteractive built-in field.
However, you can customize Report Viewer web app to change the exporting options matching your needs. Report Viewer has several properties that let you modify things like Show export menu item.
REFERENCE
Also read this article where there is an example of PDF export customization.
Let me know if this helps.
I am developing an ASP.NET application and i need to create a lot of report with same header and footer "skeleton". There is a way to create a custom component to solve this?
It is easier to make one Report with coresponding header/footer and then use it a s template. I have few of those. When I need new report, I just open Template and then use "Save As" and name it as I like.
I am pretty new to Sharepoint.
I need to customize some Sharepoint Masterpages (the background color, the font type and a few other css requeriments).
Considering I have available the following files: v4.master, default.master and two more pages which are content pages of default.master, plus the COREv4.css file.
I know I should create a copy of one of those master pages (I am not sure which tho) and customize it changing the CSS linked to it). The following questions come in regards of this:
1) The custom CSS file should be a modified copy of the COREv4.CSS or just another CSS file with the desired styles?
2) How do I create/link the customized CSS file for the modified page via Site Settings?. How/Where should I save the new file?.
3) As for the copy of v4.master, How do I load it to "replace" the original one for the site?.
4) The system is built upon Sharepoint 2010. That ensures that the page to have the modified CSS would be a v4.master copy only?.
Thank you for the insight as always.
**Update**
Hi,
I managed to solve the problem getting a general idea with the pdf manual provided, your suggestions and some extra steps I will describe briefly:
1) To place my custom css file I put it in the folder: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\3082\STYLES
2) I opened the site to be customized with Sharepoint Designer 2010.
3) I clicked on the option Main Pages/Master Pages, and selected the page to be v4.master page, copied and pasted it. Then I renamed it right clicking on it, selecting "Rename" and typed the new name, after doing that I right clicked one more and selected "Set page as main default page".
4) To edit the contents of the page I right clicked once more and selected the option "Edit content in advanced mode", right before the head tag ended I copied and pasted:
<SharePoint:CssRegistration name="customname.css" runat="server" After="core4.css"/>
Note that "customname.css" is my css file. Then I clicked on the floppy disk icon on the upper left side of the screen to save.
5) After doing that I used Chrome HTML/CSS Analyzer, inspecting the original (and now copied) master page to browse on the zones that needed customization in order to identify the class names/ids/element types that managed the styles to be changed. Once identified I only added to them the properties that required change, EG:
//Webparts Alternate Highlighted Rows
div#ctl00_MSO_ContentDiv table.ms-viewlsts tbody
tr.ms-alternatingstrong{ background-color:#F7FAF4 }
table.ms-listviewtable.ms-basictable tbody
tr.ms-alternatingstrong.ms-itmhover{ background-color:#F7FAF4 }
I mostly did this by myself by trial and error with Chrome Analyzer but I also helped the task using the Chart found here (http://sharepointexperience.com/csschart/csschart.html), tho at some point going thru it turned a bit tricky and I decided to do it by myself as I mentioned. In the process I repeatedly added more styles to the custom file and then overwrote it on the server location to refresh the page/pages to see how it was looking, this till the end of the process.
Thanks for your help, I hope this serves as a guide for anyone that needs it. If you have questions let me know.
You can create a new master page from the scratch or modify the existing one.
Please have a look at this link it may help you to get answers of your questions
http://www.rdacorp.com/wp-content/uploads/ASP-NET-Master-Pages-and-SharePoint.pdf
It's not advised to modify files of SharePoint.
Better to create new master page file, specify all CSS and script you want inside and install this with feature.
What version of SharePoint do you have? SharePoint 2010 Server or Foundation? Cause with server version you can brand your master page in a cool way:
see this link
Microsoft has a good introductory article on how you can/should do this.
http://office.microsoft.com/en-us/sharepoint-designer-help/customize-a-master-page-to-brand-your-site-HA102449505.aspx
I want to export a few Pages to pdf/xls. By Pages I mean as the eye sees it - a screenshot of the Page's contents. I know how to build pdf/xls documents using 3rd party tools but is there any way to quickly export the rendered contents of say a Panel?
edit: maybe a tool that can render the page's output as a browser would, and save it as an image file?
There is an open source console program named wkhtmltopdf which you could call from asp.net to convert the page. It can convert to PDF or an image with wkhtmltoimage (JPG, PNG, etc.) using the webkit rendering engine.
Check my answer to this question to see an example of how to convert from a html to a pdf using C#:
Easiest way of porting html table data to readable document
I can recommend http://www.screengrab.org/ for firefox.