Advertisement

04.18.2008 at 08:12AM PDT, ID: 23334413
[x]
Attachment Details

How to Pass Parameters using an RDLC report

Asked by milimol in Microsoft Visual Basic.Net, Microsoft Visual C#.Net, .NET Framework 2.0

Tags: Microsoft, SQL Server Reporting Services 2005, .NET 2.0, Local Reports (.rdlc) and Parameters

Experts;

My first post in three years, so please bear with me!

I have a client based report (RDLC) which uses a dataset based on a stored procedure.  I'm presenting the report to the client through the ReportViewer control for WinForms.  

The dataset is properly defined and when I view it in the designer, I see the Fill method with the appropriate signature for the stored procedure (i.e. it contains the parameter in the definition).  However, when I set the parameter for the local report via the .LocalReport.SetParamters() method, nothing is returned and the report contains no data (although it is rendered).  In watching the execution of the call to the stored procedure in SQL Server Profiler, the stored procedure is being called without any parameters.

I've also attempted to call the stored procedure locally within the code and then apply the dataset returned (with the correct contents) through the .LocalReports.DataSources.Add() method.  The subsequent call to .LocalReport.Refresh() method results in nothing at all (the report isn't even rendered!).

Does anyone have any experience with this issue?  I'm fighting to get this completed quickly - I have other fish to fry in this project!

We're using SQL Server 2005 (sp2) and VB.NET 2005 (.NET 2.0).  I can use C# if necessary, but would like to avoid that, if possible, since the balance of the solution is written in VB.NET.

Thanks!Start Free Trial
[+][-]04.18.2008 at 08:17PM PDT, ID: 21391020

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, Microsoft Visual C#.Net, .NET Framework 2.0
Tags: Microsoft, SQL Server Reporting Services 2005, .NET 2.0, Local Reports (.rdlc) and Parameters
Sign Up Now!
Solution Provided By: anuragal
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628