将行转换为晶体报告中的列 [英] CONVERTING ROWS TO COLUMNS IN CRYSTAL REPORTS

查看:63
本文介绍了将行转换为晶体报告中的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是水晶报表的新手.

我有一个数据表,

州立城市

KA BNG

KA KDM

PB PBB

PB DBC

如何在水晶报表中显示以下内容.

KA PB

BNG PBB

KDM DBC


或如何显示具有可变列数的数据表.

在此先感谢.

Hi All,

I am a newbie to crystal reports.

i have a datatable like,

State City

KA BNG

KA KDM

PB PBB

PB DBC

How can i display in crystal report as following.

KA PB

BNG PBB

KDM DBC


or how to displaying a data table with variable no of columns.

Thanks in advance.

推荐答案

只需返回该格式的数据,它应该这样做.阅读有关 SQL PIVOT :
使用PIVOT和UNPIVOT [了解PIVOT和UNPIVOT [在SQL Server中透视数据 [ MSDN:跨制表报告 [视频:Crystal Reports教程创建跨标签报告 [交叉标签报告 [
Just return the data in that format and it should do. Read aboutSQL PIVOT:
Using PIVOT and UNPIVOT[^]
Understanding PIVOT and UNPIVOT[^]
Pivoting data in SQL Server[^]


OR else,

try CrossTab-Reports of Crystal report for such display. Start from here:
MSDN: Cross-Tab Reports[^]
Video: Crystal Reports Tutorial Creating Cross-Tab Reports[^]
Cross Tab Reports[^]

Go through them, try out!


这篇关于将行转换为晶体报告中的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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