[英]how to give color in each filed in crystal report
I have a crystal report like this: my records showing like this 我有这样的水晶报告:我的记录显示如下:
Status Location Parkingyype Vehiclecount
Received blooimng normal 1
recieved blooimng vip 10
parked blooming normal 1
deliverd blooimng vip 1
in each status i have to give separate color only the status column ,, 在每种状态下,我只需要给状态栏分别加颜色,
my expect out put like this:how i can do this in crystal report.. 我的期望是这样的:我如何在水晶报告中做到这一点。
You will have to create a rectangle control and set it behind your status control. 您将必须创建一个矩形控件并将其设置在状态控件的后面。
Then, depending on the value of the status control, you can set the color of the rectangle control through a formula. 然后,根据状态控件的值,可以通过公式设置矩形控件的颜色。
try following below steps. 请尝试以下步骤。
1] Order your result set based on status 1]根据状态订购结果集
2] Right click on Status column in rpt file and click Format Field... 2]右键单击rpt文件中的“状态”列,然后单击“ 格式化字段...”
3] Under Border Tab, check background checkbox and click the formula check box in front of background field. 3]在“边框”选项卡下,选中“背景”复选框,然后单击“背景”字段前面的“公式”复选框。
4] Add formula as per your requirement. 4]根据您的要求添加公式。 if previous(status_coulmn) = {Status_Column} then crred else crnocolor (This formula is just for your reference)
如果previous(status_coulmn)= {Status_Column},则crred else crnocolor(此公式仅供参考)
I hope this helps! 我希望这有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.