水晶报表中的拆分字段 [英] split field in crystal report

查看:111
本文介绍了水晶报表中的拆分字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Crystal Report中有一个带有大字符串的字段,我想将该字符串分为两部分或三部分以使我的报告看起来不错.

i have a field in crystal report which have large string, i want to split that string in two or three parts to make my report look good. can any body know how to do it.

推荐答案

在字段资源管理器"上,通过右键单击公式字段"并单击"新".

双击打开公式字段,然后编写如下代码.

昏暗的Test()作为字符串
测试= Split("fieldname Or String",")
公式= Test(1)

公式"会将结果返回到字段.

确保将语法更改为基本语法"
您可以通过查看Crystal Reports帮助来了解"Crystal Syntax".

注意:这已在Crystal Reports 2008中进行了测试
On the ''Field Explorer'' create a formula field by right clicking ''Formula Fields'' and clicking ''New''.

Open your formula field by double clicking it and then write your code something like following.

Dim Test() As String
Test = Split("fieldname Or String" , " ")
formula = Test(1)

''formula'' will return the result to the field.

Be sure to change your syntax to ''Basic Syntax''
You can figure out the ''Crystal Syntax'' by looking at crystal reports help.

Note: This is tested in Crystal Reports 2008


这篇关于水晶报表中的拆分字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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