基于数据库表列的Crystal报表中的动态列 [英] Dynamic columns in crystal reports based on database table column
问题描述
嗨
我是水晶报告的新手.我需要水晶报表经验丰富的用户的帮助.
我的要求是为检查座位安排编写一份报告.房间数很多,每个房间的容量各不相同,座位的排数也不同.
下表具有以下数据
< b>学生
Rollno varchar(10),-----------纸卷编号
Roomno int,-----------房间号
colno int -----------列号
seatposition int -----------列中的座位位置
</b>
查询将是这样
< pre lang ="SQL">从Roomno,colno,seatposition,rollno</pre>
的学生订单中选择*
我想按以下方式打印报告
如果colno值为1,则rollno应该在座位位置的第1列中打印.
如果colno值为2,则rollno应该在座位位置的第2列中打印.
等等...
---根据colno的列数(可能因房间而异)
< b> Col1 col2 col3 col4
100001 100004 100007 100010
100002 100005 100008 100011
100003 100006 100009 100012</b>
希望我说清楚
提前非常感谢
Hi
I am new to crystal reports. I need help from crystal reports experienced users.
MY requirement is to develop a report for seating arrangement for examination. There are number of rooms and each room has different capacity with different number of rows for seating.
The below table has following data
<b>Students
Rollno varchar(10), ----------- Roll number
Roomno int, ----------- Room number
colno int ----------- Column number
seatposition int ----------- Seat position in the column
</b>
and the query will be like this
<pre lang="SQL">select * from students order by roomno,colno,seatposition,rollno</pre>
and I want to print the report as below
If the colno value is 1 then rollno should get printed in column 1 at seatposition.
If the colno value is 2 then rollno should get printed in column 2 at seatposition.
and so..on.
--- No.of columns depending on colno(it may vary from room to room)
<b>Col1 col2 col3 col4
100001 100004 100007 100010
100002 100005 100008 100011
100003 100006 100009 100012</b>
Hope I made it clear
Thanks a lot in advance
推荐答案
您可以尝试多列报告.
http://www.jack-frost.co.uk/multiple_column_subreport_crystal.html [ ^ ]
You can try multiple column report.
http://www.jack-frost.co.uk/multiple_column_subreport_crystal.html[^]
这篇关于基于数据库表列的Crystal报表中的动态列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!