拆分水晶报表字段 [英] spliting crystal report field

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

问题描述

大家好
我将数据库列命名为医学名称",其值类似于"A,B,C,D"

当我创建用于打印该特定列的报告时
提交的报告显示为
医学名称
A,B,C,D

但我想要
医学名称
A
B
C
D

请帮助我
adv

hi all
i hv database column named "medicine name" and the values are like "A,B,C,D"

when i created a report for printing that particular column
the report filed shows like
Medicine Name
A,B,C,D

but i want like
Medicine Name
A
B
C
D

please help me
thanx in adv

推荐答案

如果您的数据库库姆名称为MedicineName,而行值为
A
B
C
D
您无需再做任何其他操作

将您的药物名称标签放置在Section2(页面标题)上
将您的MedicineName文本框放在Section3(详细信息部分)上
会自动逐行显示(并检查其属性是否有任何变化)



否则,您需要在安排的数据中创建数据集并分配给报告
在Google中搜索以根据数据集创建水晶报表
If your database counm name is MedicineName and your row values are
A
B
C
D
You don''t need to do anything more

Place Your Medicine Name label on Section2(Page Header)
Place your MedicineName textbox on Section3(Detail section)
that will automatically appear in row by row (And check its properties for any changes in that)



Otherwise you need to create a dataset in your arranged data and assign to report
Search in google for Creating crystal report from dataset


感谢回复.....
我已经找到了解决方案,

只需在水晶报表中获取一个unbound(string)字段
并使用替换"功能制作公式,如

Replace({您的字段名称},,",chr(13))

此代码在字符串中使用逗号时会中断换行
例如:A,B,C,D是原始字符串,并且在应用公式时将其更改为
A
B
C
D
chr(13)是Enter键的ASCII码
thanks for replies.....
i have got the solution as

just take a unbound(string) field in crystal report
and make formula using "Replace" function like

Replace({your field name},",",chr(13))

this code break the line when it get comma in string
eg:A,B,C,D is original string and when formula applied it changed into
A
B
C
D
chr(13) is ascii code for enter key


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

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