如何在ASP.NET 2010中将CSS应用于Crystal Report [英] How to apply CSS to Crystal Report in ASP.NET 2010

查看:61
本文介绍了如何在ASP.NET 2010中将CSS应用于Crystal Report的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我在网络应用程序中使用水晶报告。我使用了嵌入字体(.eot,.woff,.ttf)。为此我在css中制作了如下课程

< style type =text / css>

@ font-face

{

font-family:'myFirstFont';

src:url('/ Font / RNG1COR.eot'); / * IE9 Compat Modes * /

src:url('/ Font / RNG1COR.eot?#iefix')格式('embedded-opentype'); / * IE6-IE8 * /

src:url('/ Font / RNG1COR.woff')格式('woff'); / *现代浏览器* /

src:url('/ Font / RNG1COR.TTF')格式('truetype'); / * Safari,Android,iOS * /

}



.txtBox

{

font-family:myFirstFont;

}

< / style>



我想要在Crystal报表中使用.txtBox类我已经按照MSDN网站上给出的步骤使用了以下步骤



1.右键单击嵌入式Crystal Reports设计器并选择Set CSS类。

2.在对象范围字段中,选择您希望应用该类的对象或部分。

3.输入类的名称在CSS类名字段中。



提示在属性窗口中使用CssClass查看,编辑或删除特定报表对象或节的类值。 />


4.单击确定。

5.保存报告。

6.访问.aspx文件项目。

7.在.aspx文件的HTML选项卡中,引用一个外部样式表已定义类,或输入类值。



但问题是这不适用于Crystal Report。请帮我。我这么久就遇到了这个问题。

解决方案

检查链接一次并确认你遵循的程序



如何申请-css-class -to-crystal-reports-columns.aspx [ ^ ]


我认为Crystal报表仅支持True类型字体(.ttf)。检查这个

http://scn.sap.com/message/11030458 [ ^ ]

http://scn.sap.com/thread/2076266#10817872 [ ^ ]

http://www.dynalivery.com/customersupport/faq/pdffontissue.html [ ^ ]



对于Crystal报表中的CSS,

< a href =http://msdn.microsoft.com/en-us/library/ms225493(v=vs.80).aspx>用于自定义CrystalReportViewer控件的层叠样式表 [ ^ ]

使用层叠样式表格式化报告 [< a href =http://msdn.microsoft.com/en-us/library/ms227348(v=vs.80).aspx\"target =_ blanktitle =New Window> ^ ]

如何为不同客户更改Crystal报表格式 - 第1部分 [ ^ ]

如何为不同的客户更改Crystal报表格式 - 第2部分 [ ^ ]

Hi All

I am using crystal report in my web application. I used embed font (.eot,.woff,.ttf). for this i made class in css as follows
<style type="text/css">
@font-face
{
font-family: 'myFirstFont';
src: url('/Font/RNG1COR.eot'); /* IE9 Compat Modes */
src: url('/Font/RNG1COR.eot?#iefix') format('embedded-opentype'); /* IE6-IE8 */
src: url('/Font/RNG1COR.woff') format('woff'); /* Modern Browsers */
src: url('/Font/RNG1COR.TTF') format('truetype'); /* Safari, Android, iOS */
}

.txtBox
{
font-family: myFirstFont;
}
</style>

I want to use .txtBox class in Crystal report for this i already used following steps as per given on MSDN website

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.

But the problem is this is not working in Crystal Report. Please help me. I am facing this problem so long.

解决方案

Check the link once and confirm the procedure you followed

how-to-apply-css-class-to-crystal-report-columns.aspx[^]


I think Crystal reports support only True type fonts(.ttf). Check this
http://scn.sap.com/message/11030458[^]
http://scn.sap.com/thread/2076266#10817872[^]
http://www.dynalivery.com/customersupport/faq/pdffontissue.html[^]

For CSS in Crystal reports,
Cascading Style Sheets for Customizing the CrystalReportViewer Control[^]
Formatting Reports using Cascading Style Sheets[^]
How to Change Crystal Report Formatting for Different Customers - Part 1[^]
How to Change Crystal Report Formatting for Different Customers - Part 2[^]


这篇关于如何在ASP.NET 2010中将CSS应用于Crystal Report的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆