简体   繁体   中英

Is it possible to implement a CSS class in crystal reports for Visual Studio 2012 (winform or WPF application)?

I need to change the font size of data label in bars but it's not possible with the visual studio version of crystal reports. I think that I can change it using a cssClass, but I have never used css with crystal reports.

How can I implement Css classes in crystal reports for Desktop?

Yes. you can do this.

1.Right-click in the embedded Crystal Reports Designer and select Set CSS Class.
2.In the Object Scope field, select the objects or sections you would like the class to be applied to.
3.Enter the name of the class in the CSS Class Name field.

Tip Use CssClass in the Properties window to view, edit, or delete the class values for a specific report object or section.

4.Click OK.
5.Save the report.
6.Access the .aspx file in your project.
7.In the HTML tab of the .aspx file, reference an external style sheet that has the class already defined, or enter the class value.

For example:

<HTML>
    <STYLE>
        .classname
        {
            background-color:808080; border-color:000000; color:000000; font-family:Arial; font-weight:bold; font-style:italic; }
   <STYLE>
</HTML>

Source: MSDN

I Hope it will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM