水晶报表在连接mdb(表为:T1)文件时能否有选择条件?例如:只连接t1.code=’1’的内容.

no_com 2003-08-08 05:34:32
水晶报表在连接mdb(表为:T1)文件时能否有选择条件?例如:只连接t1.code=’1’的内容.
...全文
17 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Cocoky 2003-08-09
  • 打赏
  • 举报
回复
你可以这样做:
m_Report.RecordSelectionFormula = "{t1.code} = '1'"
CRViewer1.Refresh
当不需要时改为:
m_Report.RecordSelectionFormula = ""
skyyiyang 2003-08-09
  • 打赏
  • 举报
回复
水晶报表.datasour=rs
rs 是一個有有條件的SQL語句

AdoRs.Open SqlStr, Cn1, adOpenKeyset, adLockReadOnly ', adLockBatchOptimistic
Dim m_Report As CrysRNewJob
Set m_Report = New CrysRNewJob
Me.MousePointer = vbHourglass
m_Report.Database.SetDataSource AdoRs
m_Report.Database.Verify
CRViewer1.ReportSource = m_Report
CRViewer1.ViewReport
no_com 2003-08-08
  • 打赏
  • 举报
回复
up

809

社区成员

发帖
与我相关
我的任务
社区描述
VB 多媒体
社区管理员
  • 多媒体
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧