# Re: 请教有关Crystal Report

Posted by yoyo on December 09, 1998 at 13:06:31:

In Reply to: Re: 请教有关Crystal Report posted by Keven on December 08, 1998 at 15:09:33:

: 第一:在Crystal Report中File/Save Data with Report的打勾先去掉
: 第二:你要显示的栏位先定义好,再储存此报表
: 第三:于VB中设定如下
: with CryReport1
: .SQLQuery = 这里放你要呼叫之StoreProcedure字串
: .LogonInfo(0) = "DSN = xxx;UID = sa;PWD =;"
: .ReportFileName = App.Path & "\..XXX.rpt"
: .Destination = 0
: .Action = 1
: end with
: 我想这样因该可以吧!自己试试看!!
谢谢你
可是我还有问题想请教你....
因为我使用一个参数由Stored Procedure
查询出一个table资料来
可是Crystal Report 必须使用一个table
产生报表......而我查询的结果是一个虚拟的table
如何在Crystal Report预先产生报表来接收
Stored Procedure的资料呢???
以下是程式部分...
因为我不知道这个Stored Procedure
是否有启动查询......
不过结果仍无法传至Crystal Report....

With CrystalReport1
.SQLQuery = "Exec erbcompile..erpr_plancost1 '" & Form1.Combo1.Text & "' "
.Connect = "DSN = erl_dp2;UID = sa;PWD =j08117;"
.ReportFileName = "C:\report1.rpt"
.DiscardSavedData = True
.Destination = 0
.Action = 1
End With
谢谢.....

Follow Ups:

- Re: 请教有关Crystal Report Keven 08:50:05 12/10/98 (0)