vb6,存储过程和Crystal Report 8.5

问题描述:

我是一个新手,我如何将参数从vb6传递到存储过程并将其显示给Crystal报表. :sigh:

rgds

i''m a newbie, how i passing parameter from vb6 to store procedure and display it to crystal report. :sigh:

rgds

只需在水晶报表中创建文件即可.

在vb6中调用文件

Dim Appl作为新的CRAXDRT.Application
昏暗的报告作为新的CRAXDRT.Report

设置报告= Appl.OpenReport(App.Path&"\ ledger1.rpt")


CRViewer1.ReportSource =报告
CRViewer1.ViewReport

Report.EnableParameterPrompting = True
Report.DiscardSavedData
Report.ParameterFields(1).ClearCurrentValueAndRange
Report.ParameterFields(1).AddCurrentValue Combo1.Text

CRViewer1.RefreshEx True
CRViewer1.Zoom(93)
just make the file in crystal report.

call the file in vb6

Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report

Set Report = Appl.OpenReport(App.Path &"\ledger1.rpt")


CRViewer1.ReportSource = Report
CRViewer1.ViewReport

Report.EnableParameterPrompting = True
Report.DiscardSavedData
Report.ParameterFields(1).ClearCurrentValueAndRange
Report.ParameterFields(1).AddCurrentValue Combo1.Text

CRViewer1.RefreshEx True
CRViewer1.Zoom (93)


哇....我收到此错误:

用户定义的类型未定义

当程序尝试执行时

wew.... i got this error:

user-defined type not defined

when the program try to execute

Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report



即使我将CRViwer添加到表单中? :confused :: confused:



even when i was add CRViwer to the form??
:confused::confused: