简体   繁体   English

单行获取数据

[英]Getting data on a single row

I have a stored procedure that return the data as shown below. 我有一个存储过程,它返回数据,如下所示。 There is 3 rows of information for evey company. evey公司有3行信息。 I am trying to design a crystal report to display the data on a single row as shown below under Desired Output. 我正在尝试设计一个水晶报表,以将数据显示在单行中,如下所示,在“期望的输出”下。

How can this be done ? 如何才能做到这一点 ?

Loc facility ARtype days Revenue PPD Loc设施ARtype天数收入PPD
140 Company ABC MCD 1724 4000 137.76 140公司ABC MCD 1724 4000 137.76
140 Company ABC MRA 218 8000 327.69 140公司ABC MRA 218 8000 327.69
140 Company ABC MPD 85 7000 166.84 140公司ABC MPD 85 7000 166.84

Desired Output 期望的输出
140 Company ABC MCD 1724 4000 137.76 MRA 218 8000 327.69 MPD 85 7000 166.84 140公司ABC MCD 1724 4000 137.76 MRA 218 8000 327.69 MPD 85 7000 166.84

group by revenue and place your field in detail where you get individual record. 按收入分组,并将您的字段详细放在获得个人记录的位置。

Now use the below formula. 现在使用以下公式。

Shared StringVar a;

a:=a+<<Database field>>;

Place the above formula beside the database filed in detail and supress 将上面的公式放在详细归档的数据库旁边并禁止使用

Now create another formula 现在创建另一个公式

Shared StringVar a;
a;

Place above formula in group footer. 将以上公式放在组页脚中。

Edit: 编辑:

Create another formula reset 创建另一个公式重置

Shared StringVar a;
a:=" ";

Place this formula in group header and supress the formula as this not of user importance. 将此公式放在组标题中,并禁止该公式,因为这对用户不重要。

You can use below simple steps, 您可以使用以下简单步骤,

1] Assuming you are putting your data in detail section, go to Section Expert of detail section and check the checkbox having label Format with Multiple Columns 1]假设您要在“详细信息”部分中放置数据,请转到“详细信息的部分专家 ”部分,并选中带有标签“ 格式为多列”的复选框

2] This will print your data the way you are expecting. 2]这将按照您期望的方式打印数据。 For additional formatting, you will find layout tab generated once you check the checkbox. 对于其他格式,选中复选框后,您会发现生成了布局 选项卡 In that layout you can set the width of detail lines as well as gaps between lines etc. 在该布局中,您可以设置细部线条的宽度以及线条之间的间隙等。

I hope this helps! 我希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM