请帮忙!
我需要生成一个包含多个数据列的Crystal Report,但也需要显示行标题。
e.g。
(Fieldname) (DataColumn1) (DataColumn2) (DataColumn3)
Animalname Elephant Dog Mouse
Animalsize Large Medium Small
我已经成功地使用详细信息部分中的“使用多列格式”选项显示数据列,但有没有显示标题的方法(Animalname / Animalsize)?
(我在Visual Studio 2008中使用Crystal Reports 2008)
答案 0 :(得分:1)
如果表格列是名称和大小,则垂直排列详细信息字段,如...
name {name_field}
size {size_field}
但我认为问题是当你“用多列格式化”时会变成这个...
name {name_field} name {name_field} name {name_field}
size {size_field} size {size_field} size {size_field}
name {name_field} name {name_field} name {name_field}
size {size_field} size {size_field} size {size_field}
name {name_field} name {name_field} name {name_field}
size {size_field} size {size_field} size {size_field}
那是问题吗?如何只显示第一列中的“行标题”?因为我不确定这是否可行。即使你能做到,这是你真正想要的吗?
name {name_field} {name_field} {name_field}
size {size_field} {size_field} {size_field}
name {name_field} {name_field} {name_field}
size {size_field} {size_field} {size_field}
name {name_field} {name_field} {name_field}
size {size_field} {size_field} {size_field}
仅仅采用标准的方式会不会更容易......
name size name size name size
{name_field} {size_field} {name_field} {size_field} {name_field} {size_field}
{name_field} {size_field} {name_field} {size_field} {name_field} {size_field}
{name_field} {size_field} {name_field} {size_field} {name_field} {size_field}
{name_field} {size_field} {name_field} {size_field} {name_field} {size_field}
{name_field} {size_field} {name_field} {size_field} {name_field} {size_field}
我错过了什么吗?
编辑
为每个字段创建一个公式,如此...
if remainder(recordnumber, 3) = 1 then
"Field Name " + {some_field}
else
{some_field}
可能希望将条件放入函数中,以防您想要显示超过3列。