This is a migrated thread and some comments may be shown as answers.

Regarding CSS in reports

3 Answers 116 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Suriya
Top achievements
Rank 1
Suriya asked on 06 Feb 2010, 01:11 PM
Dear Sir,
             I am using telerik report. Till now i have creates above 50 reports. So i wanna give back ground color for all reports using cascading style sheet. It is possible or not? If it is possible how it is? plz reply


With regards
S Suriya Narayanan

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 10 Feb 2010, 06:57 PM
Hi Suriya,

Telerik Reporting Styling is similar to CSS, with which many web developers are familiar. If you have to set the same style to a lot of Reports you can define a Style globally using the StyleRules.

Best wishes,
Peter
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Suriya
Top achievements
Rank 1
answered on 15 Feb 2010, 01:05 PM
I would like to apply a background color for 30 telerik reports with a simple one style apply globally. But the style rule is only applicable into the all items in a particular report only. But I would like to set the color style rule to the more than one reports in the entire project.
How is it possible? I have 120 reports. With a single modification (like css style in webpage) in a style rule, it should take effects on the entire bulk of reports (120 reports) concurrently. I can not apply the style rule one by one individually  report by report. It is not timesaving. Suppose, Later I would like to change the appearance (color, style) according to the theme in website , with a simple and single modification in one style ruler/selector.

Kindly let me know at once whatever it may be

Kind Regards
S Suriya Narayanan
0
Steve
Telerik team
answered on 16 Feb 2010, 05:16 PM
Hello Suriya,

You can export the style you've created from a single report and reuse it to all other reports like explained in Exporting and Reusing Style Sheets.
To do this from your actual application based on a team for example, you can proceed like so:

protected void Page_Load(object sender, EventArgs e)
    {
        Telerik.Reporting.Report report = (Telerik.Reporting.Report)this.ReportViewer1.Report;
         
         if (Page.Theme == "Theme1")
        {
            ExternalStyleSheet ess = new ExternalStyleSheet("sampleStyle.xml");
            report.ExternalStyleSheets.Add(ess);
        }
    }


Greetings,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Suriya
Top achievements
Rank 1
Answers by
Peter
Telerik team
Suriya
Top achievements
Rank 1
Steve
Telerik team
Share this question
or