| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 619 人关注过本帖
标题:水晶报表问题求助,高手指点
只看楼主 加入收藏
sky_yang_sky
Rank: 3Rank: 3
等 级:论坛游民
威 望:8
帖 子:481
专家分:16
注 册:2007-5-30
结帖率:50%
收藏
 问题点数:0 回复次数:0 
水晶报表问题求助,高手指点
CREATE PROCEDURE cktzlfxb  
 @date1  int
 AS
select distinct a.fdate,b.fdcstockid,b.fscstockid,b.fitemid,c.fname,d.fnumber,e.fendbal,g.fauxpropid_fname
        into #cktbl from icstockbill a
       left join  icstockbillentry b on a.finterid=b.finterid
       left join  ICStockBillEntry39467Z38513453 g on g.fitemid=b.fitemid and g.fauxpropid=b.fauxpropid
       left join icbal e on e.fitemid=b.fitemid and e.fauxpropid=b.fauxpropid
       left join t_stock c on c.fitemid=b.fscstockid
       left join t_ICItemCore d on d.fitemid=b.fitemid
where left((ltrim(fbillno)),4)='sout' and e.fyear=year(getdate()) and e.fperiod=month(getdate())-1 order by b.fitemid

select AA.* into #cktbl1 from #cktbl AA where not exists(select 1 from #cktbl where fname=AA.fname and fnumber=AA.fnumber and fdate > AA.fdate) order by aa.fnumber

select  distinct bb.fdate,datediff(day,bb.fdate,getdate()) as date1,c.fnumber,c.fname,c.fmodel,e.fname as unit,floor(a.fqty) as fqty,b.fname as stockname/*,d.fendbal*/,
         bb.fendbal,((a.fqty)*(bb.fendbal)) as total,a.fitemid,bb.fauxpropid_fname  from icinventory a left join t_stock b on a.fstockid=b.fitemid
                            left join t_icitem c on a.fitemid=c.fitemid
                            left join t_measureunit e on e.fmeasureunitid=c.funitid
                            left join  #cktbl1 bb on bb.fname=b.fname and bb.fnumber=c.fnumber
                            --left join #cktbl3 cc on cc.fitemid=c.fitemid
where datediff(day,bb.fdate,getdate())>=@date1 order by c.fnumber

drop table #cktbl
drop table #cktbl1

VB中代码
Dim Cryapp     As New CRAXDRT.Application
          Dim Conn    As New ADODB.Connection
          Dim Rs     As New ADODB.Recordset
          Dim report     As New CRAXDRT.report
          Set report = Cryapp.OpenReport(App.Path + "\rpt2.rpt")
          Conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=AIS20071224103448;Data Source=WAPSERVER"
          Conn.Open
          Rs.CursorLocation = adUseClient
          Rs.Open "exec cktzlfxb '" & Val(Text1.Text) & "'", Conn, adOpenKeyset, adLockReadOnly
          report.Database.SetDataSource Rs
          report.DiscardSavedData
          Debug.Print Text1.Text
'          report.EnableParameterPrompting = False
          Screen.MousePointer = vbHourglass
          Form1.CRViewer91.ReportSource = report
          Screen.MousePointer = vbDefault
          Form1.Show 1
以上分别为存储过程和VB代码,执行老实出现输入参数值对话框,我若加上report.EnableParameterPrompting = False这句,不出现对话框,但是参数值没传过去,请高手指点,怎么处理,谢谢

[[it] 本帖最后由 sky_yang_sky 于 2008-5-5 12:13 编辑 [/it]]
搜索更多相关主题的帖子: 水晶 
2008-05-05 12:10
快速回复:水晶报表问题求助,高手指点
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016179 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved