从文本框中获取价值以在VB6 Crystal报表中使用 [英] getting value from textbox to be used in VB6 Crystal reports

查看:163
本文介绍了从文本框中获取价值以在VB6 Crystal报表中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如何通过单击按钮从文本框或任何其他控件获取值并在vb6的水晶报表中使用它?该报告将显示在水晶报告查看器中.

请尽快回答,谢谢上帝保佑! :)

hi guys,

how to get the value from textbox or any other control and use it in crystal reports in vb6 by clicking a button? this report will be displayed in crystal report viewer.

please answer asap, thanks and God Bless! :)

推荐答案

在Crystal报表中使用参数字段.

将多个参数以编程方式传递给Crystal报表 [ ^ ]

VB.NET Crystal Reports字符串参数 [
Use Parameter fields in crystal report.

Passing Multiple Parameters to a Crystal Report Programmatically[^]

VB.NET Crystal Reports String parameter[^](But syntax is mostly same as VB 6)


您可以尝试这个
将CRApp变暗为对象
昏暗报表作为对象
昏暗的strsql作为字符串
昏暗rs作为ADODB.Recordset,rs2作为ADODB.Recordset
设置rs =新的ADODB.Recordset

strsql ="SELECT TR.*"
strsql = strsql& vbCrLf& "FROM ViewSchedulingShift TR"
rs.Open strsql,strCONN,adOpenDynamic,adLockOptimistic

设置报告= CRApp.OpenReport(App.Path&"\ Crystal Reports \ rSchedulingShift.rpt")
Report.Database.SetDataSource rs
CRViewer1.ReportSource =报告
CRViewer1.ViewReport
CRViewer1.Zoom(100)
you can try this
Dim CRApp As Object
Dim Report As Object
Dim strsql As String
Dim rs As ADODB.Recordset, rs2 As ADODB.Recordset
Set rs = New ADODB.Recordset

strsql = "SELECT TR.*"
strsql = strsql & vbCrLf & "FROM ViewSchedulingShift TR"
rs.Open strsql, strCONN, adOpenDynamic, adLockOptimistic

Set Report = CRApp.OpenReport(App.Path & "\Crystal Reports\rSchedulingShift.rpt")
Report.Database.SetDataSource rs
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
CRViewer1.Zoom (100)


这篇关于从文本框中获取价值以在VB6 Crystal报表中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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