Reputation: 1610
I have been searching hi and lo, within and outside internet but it seems I cannot find a definitive answer: Can I change the default layout-items in SSRS reports? If so, how?
I am familiar with custom templates (.rdl) but they do not offer the possibility of changing layout-items like default font and colors and properties of report parts and such.
In VS 2005 there was the StyleTemplate to play with but that is only effective when using the wizard. It seems it is the same way with VS 2010.
I prefer to hear that it can be done and instructions how to, I would be satisfied with tips how to circumvent the problem of manually changing those properties eacht time and I will be grateful for a definitive answer. Right now it is driving me crazy :)
I am working with VS2010 (latest updates and such) icm SQL 2008, 2008R2 and (local) 2012BI
Thanks for thinking with me!
Upvotes: 19
Views: 20803
Reputation: 59
At the start of the XML for the RDL file (what you see if you select View Code on the file) there's a tag <df:DefaultFontFamily>
which defines the default font. If you change this to the family you want and re-save the XML file, any future textboxes you create will pick up this default font family.
Upvotes: 2
Reputation: 1
The FontSize property must be in npt format. If this property takes the value from an SQL query that returns an integer, add the expression by adding "pt": (for example, = Fields! DimFont.Value & "pt").
Upvotes: 0
Reputation: 311
You can always open code(XML)-view and edit font properties there. Eg. search for
<FontFamily> -tag and add <FontSize>10pt</FontSize> as a sibling for <Style>-tag.
Before editing the XML, close report design-view. Otherwise properties of objects are not functioning properly.
Upvotes: 4
Reputation: 482
I know it's a very old post, but for others in search of an answer, I thought I'd add the following. If I want all my textboxes in a font other than Arial 10pt, I will make the first textbox and set my font styling, then use that as a master textbox, copying it and changing the interior text rather than creating new textboxes each time. It's a hack, but since VS still can't do this in 2015, it's the best we have.
Upvotes: 9
Reputation: 1539
Unfortunately by design, you are not allowed to set default font etc. There is active defect in Microsoft https://connect.microsoft.com/SQLServer/feedback/details/574003/modify-the-default-font-family-for-sql-server-business-intelligence-development-studio-while-creating-a-report#
Upvotes: 9