0
votes

I have just started messing with Telerik Reporting in an MVC C# application.

Since I need to create a dozen of reports, I was asked to create an external style to be aplied to all of them.

I cannot understand how it works, how to set the rules...

Eg I can create a style to affect all HtmlTextBoxes BUT I am trying to create a rule to have all the HtmlTextBoxes contained in the Group Header having (lets say) blue Background, Bold Segoi Font and I cannot.

Any help appreciated

2

2 Answers

1
votes

Styles created in a Telerik Report can be exported and then used in other reports.
You can store one or more Styles in an exported file.
The exported information is stored in an XML file.

So you can create your style rules using the Style context menu Right-clicking on the report object.
Style exporting and reusing style sheets

Use various Style Selectors to define how a style will be applied globally to items in a report. Each Style Rule that you create (either in code or using the StyleRule Collection Editor) must be created as one of the basic four selector. Learn more about style selector..
For me the best one is the "StyleSelector" that behave like a Css Class.

Nb: You can manage and bind your extenal StyleSheet in code behind. Or in your calling application.

this.StyleSheet.Clear();
this.ExternalStyleSheets.Add(
    new Telerik.Reporting.Drawing.ExternalStyleSheet("baseThemeRpt.xml"));
0
votes

It can be done using the Descendant Type