如何在命令行将参数传递给晶体报告......? [英] How to pass parameters to a crystal report at command line......?

查看:56
本文介绍了如何在命令行将参数传递给晶体报告......?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

I Am Using This SP in VB.NET (VIsual Studio 2005)

CREATE PROCEDURE [dbo].[SP_TEST]
    @DCNo Varchar(50)   <<<<
AS
BEGIN

    SELECT DealerCode
      ,DCNo
      ,DCDate
      ,PONo
       ,VendorDCNo
      ,VendorCode
      ,Remarks
      ,DelFlag
      ,UpdUser
      ,UpdDate
      ,UpdTime
      ,UpdTerm
      ,TransferStatus
      ,ChargeOutNo
  FROM DCMaster where DCNo = @DCNo
END





<<<<有,,,我如何为@Dcno(SP)传递变量值

在Crystal Report中



在Crystal Report>> >>>>>其中= @ DCNO<<<<

任何人都可以帮我解决这个问题



<<<< there is,,, How i pass Variable Value for @Dcno (SP)
in Crystal Report

in Crystal Report >>>>>>> where = @ DCNO <<<<
can anyone help me about this

推荐答案





如果您正在使用Report Builder 3.0,然后按照以下步骤使用



1)打开Report Builder 3.0,然后添加一个DataSource。

2)之后创建一个DataSet,右键单击DataSet选项卡,然后选择新的数据集选项,然后在这里显示一个弹出框,您选择数据源名称并选择您的查询类型为存储过程,然后在下面它显示你之前准备的所有SP',请选择你的SP然后点击确定按钮。



3)之后在右侧选择参数选项,然后在此处展开​​参数选项卡,它会自动显示您在SP中创建的参数。





在编码方面,你使用这行代码调用这些参数

Hi,

If you are using Report Builder 3.0 , then you follow the below steps

1) Open your Report Builder 3.0 and then add a DataSource.
2) After that create a DataSet, for this right click on DataSet tab and then select new dataset option then it''s showing one pop up box here you choose your datasource name and select your query type is "stored Procedure" then below of that it''s displaying the all SP''s you prepared in previously , please select your SP in that and then click on OK button.

3) After that in right hand side you choose the option Parameters , then expand that parameters tab here it''s automatically displayed the parameters whatever your create in your SP.


In your coding wise you call that parameters using this lines of code
string ReportPath = "Report path";
string ReportParameters_XML ="<Parameters>" +
               "<StaticParam Name='DCNO' Value='" + DCNo + "' Type='Varchar' />" +
                              "</Parameters>";


这篇关于如何在命令行将参数传递给晶体报告......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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