【发布时间】:2017-04-18 03:17:28
【问题描述】:
我正在使用 MS Access 数据库开发 C# 中的考试试卷匹配模块。这里有一个与匹配模块相关的问题:我有一个如下所示的数据表,我想以随机播放的形式调用匹配模块。
Q_id Question Question_type MatchA MatchB Std sub
1 Where is Lion live? Ques_Ans 1 eng
2 What is sun ? Ques_Ans 1 eng
3 NULL Matching Lion Den 1 eng
4 NULL Matching Hen Coop 1 eng
5 NULL Matching Rabbit Burrow 1 eng
6 NUll Matching Earth Planet 2 Sci
问题在报告中正确打印但卡在匹配中。
我执行以下查询。
查询
Select *
from Question_table
where std = 1 and sub = "eng"
水晶报表输出:
Match the following :
1.Lion Den
2.hen Coop
3.Rabbit Burrow
但我想要一个匹配的输出:
Match the following :
1.Lion Burrow
2.hen Den
3.Rabbit Coop
我的问题是如何在特定 1 列 (MatchB) 的 C# 代码中对数据表进行洗牌?所以它会像上面那样在 Crystal Reports 中打印出来。
【问题讨论】:
标签: c# ms-access datatable crystal-reports dataset