公式包含两个关键部分:组件和语法。组件是创建公式所添加的部分,而语法是组织组件所遵循的规则。
在 Crystal Reports 中有几种不同种类的公式:报表、格式化、选定、搜索、运行总计条件和警报公式。报表中的多数公式为报表公式和条件格式化公式。 <script type="text/javascript">google_ad_client = "pub-4475724770859924";google_alternate_color = "FFBBE8";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "text_image";google_ad_channel ="9379930647";google_color_border = "F8F8F8";google_color_bg = "FFFFFF";google_color_link = "FF6FCF";google_color_url = "38B63C";google_color_text = "B3B3B3";</script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script> name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-4475724770859924&dt=1208431055984&lmt=1208431055&alt_color=FFBBE8&prev_fmts=728x15_0ads_al_s&slot=1&format=468x60_as&output=html&correlator=1208431055906&channel=9379930647&url=http%3A%2F%2Fwww.netfetch.cn%2Fnetfetch%2Farticle.asp%3Fid%3D392&color_bg=FFFFFF&color_text=B3B3B3&color_link=FF6FCF&color_url=38B63C&color_border=F8F8F8&ad_type=text_image&ref=http%3A%2F%2Fwww.netfetch.cn%2Fnetfetch%2Fdefault.asp%3FCateID%3D16%26page%3D4&frm=0&cc=100&ga_vid=926437217.1208422657&ga_sid=1208427585&ga_hid=1715607777&ga_fc=true&flash=9.0.115.0&u_h=800&u_w=1280&u_ah=770&u_aw=1280&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">
----------------------------------------------------------------
一、公式组件
在 Crystal Reports 中创建公式与在任何电子数据表应用程序中创建公式类似。可以在公式中使用下列组件:
字段
示例:{客户.客户名}、{客户.去年销售额}
数字
示例:1、2、3.1416
Text
示例:“数量”、“:”、“您的文本”
运算符
示例:+(加)、/(除)、-x(求负)
运算符是可以在公式中使用的操作。
函数
示例:Round (x)、Trim (x)
函数执行求平均值、求和与计数之类的计算。列出所有可用的函数,其参数一并列出,并根据用途排列
在 Crystal Reports 中有几种不同种类的公式:报表、格式化、选定、搜索、运行总计条件和警报公式。报表中的多数公式为报表公式和条件格式化公式。 <script type="text/javascript">google_ad_client = "pub-4475724770859924";google_alternate_color = "FFBBE8";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "text_image";google_ad_channel ="9379930647";google_color_border = "F8F8F8";google_color_bg = "FFFFFF";google_color_link = "FF6FCF";google_color_url = "38B63C";google_color_text = "B3B3B3";</script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script> name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-4475724770859924&dt=1208431055984&lmt=1208431055&alt_color=FFBBE8&prev_fmts=728x15_0ads_al_s&slot=1&format=468x60_as&output=html&correlator=1208431055906&channel=9379930647&url=http%3A%2F%2Fwww.netfetch.cn%2Fnetfetch%2Farticle.asp%3Fid%3D392&color_bg=FFFFFF&color_text=B3B3B3&color_link=FF6FCF&color_url=38B63C&color_border=F8F8F8&ad_type=text_image&ref=http%3A%2F%2Fwww.netfetch.cn%2Fnetfetch%2Fdefault.asp%3FCateID%3D16%26page%3D4&frm=0&cc=100&ga_vid=926437217.1208422657&ga_sid=1208427585&ga_hid=1715607777&ga_fc=true&flash=9.0.115.0&u_h=800&u_w=1280&u_ah=770&u_aw=1280&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">
----------------------------------------------------------------
一、公式组件
在 Crystal Reports 中创建公式与在任何电子数据表应用程序中创建公式类似。可以在公式中使用下列组件:
字段
示例:{客户.客户名}、{客户.去年销售额}
数字
示例:1、2、3.1416
Text
示例:“数量”、“:”、“您的文本”
运算符
示例:+(加)、/(除)、-x(求负)
运算符是可以在公式中使用的操作。
函数
示例:Round (x)、Trim (x)
函数执行求平均值、求和与计数之类的计算。列出所有可用的函数,其参数一并列出,并根据用途排列