Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi I m creating a new Report using Stored Procedure and I have call the stored procedure for call the data set and the data set have data but not fill in the crystal report and at the running time report take the input parameter value so pls have any solution for this problem

Thanks in Advance
Posted
Comments
Hiren solanki 11-Jan-11 8:31am    
can we have a code please ?
NBajaj 11-Jan-11 23:43pm    
This is the code i use to call the report

Reports.rptProductPurch rptpur = new BillingSystem.Reports.rptProductPurch();
SqlCommand mycmd = new SqlCommand();
mycmd = new SqlCommand("proc_prdDetails", Program.con);
mycmd.Parameters.AddWithValue("@typeQue", 1);
mycmd.Parameters.AddWithValue("@startdate",App_Code.clsglobal.strt_date);
mycmd.Parameters.AddWithValue("@enddate",App_Code.clsglobal.lst_date);
mycmd.CommandType = CommandType.StoredProcedure;
Program.da = new SqlDataAdapter(mycmd);
Program.ds = new DataSet();
Program.da.Fill(Program.ds);
rptpur.SetDataSource(Program.ds);
CRV.ReportSource = rptpur;

AS Hiren said you without code we can't predict what is going wrong.
whatever I will suggest you to read given two blogs to learn basic of using Crystal Report with stored procedure.
Loading Crystal Report reports which use Stored Proc[^] and Crystal Report And Parameter Passing Using StoredProc[^]
 
Share this answer
 
Oh man at least you should have posted your code for the quick solution. Anyway look at this one, enquirer solved the issue himself.

Using Parameter Stored Procedure in Crystal Report[^]

Let us know.
 
Share this answer
 

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