Click here to Skip to main content
15,896,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
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


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

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

1 solution

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
C#
string ReportPath = "Report path";
string ReportParameters_XML ="<Parameters>" +
               "<StaticParam Name='DCNO' Value='" + DCNo + "' Type='Varchar' />" +
                              "</Parameters>";
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900