公式中的Crystal Report Line对象

时间:2014-03-03 02:36:35

标签: crystal-reports report

这是我再次询问水晶报告:D

我想问一下如何在水晶报告中做到这一点?

“In Accredited Hospital”是一个数据库项目,a-g中的项目是硬编码的。

enter image description here

我试图在公式字段中执行此操作但是我的结果与上面的图片不同,是否有其他解决方案?

这是我的结果

enter image description here

使用的公式:

    stringVar emergencyCare := "";
if {DBField} = "In Accredited Hospitals" then
    emergencyCare := "In Accredited Hospitals" &
                     "</br>a. Doctor's Services" &
                     "</br>b. Emergency Room Fees" &
                     "</br>c. Medicines used for immediate relief during treatment" &
                     "</br>d. Oxygem, Intravenous fluids and blood products" &
                     "</br>e. Dressings, conventional casts (plaster of Paris) and sutures" &
                     "</br>f. X-Rays, laboratory and diagnostic examinations, and other medical services related to the emergency treatment of the patient" &
                     "</br>g. Room Upgrade in case of room unavailability" 

else
    emergencyCare := {DBField}

1 个答案:

答案 0 :(得分:0)

请遵循以下流程,因为数据是硬编码的。

1. Create 8 detail sections
2. Dont create any formulas just take 16 text fields
3. Insert line at the bottom of every detail section and on line vertically so that it resembles table.
4. Now write you data as per the your requirement in every text field and preview the report.

如果这不起作用,请告诉我

编辑:如果数据来自数据库:

取16个公式并在那里写出16个条件,如第一个公式:

     `if {DBField} = "In Accredited Hospitals" then
        emergencyCare := "In Accredited Hospitals"` 
 if {DBField} = "In Accredited Hospitals" then
        emergencyCare := "a. Doctor's Services"... 

就像那样延伸到所有