Solved

Missing Parameter Values - Passing to Stored Procedure

Posted on 2011-03-16
2
1,038 Views
Last Modified: 2012-05-11
I have a report databinded via a stored procedure. I am needing to send an id, begin date and end date. The parameters that the stored procedure has are:

?@id
?@begdate
?@enddate


The report also has several subreports that are each databinded with the stored procedure and then are linked by ?@id.


I am trying to send it via the following code:

report.SetParameterValue("@id", id);
report.SetParameterValue("@begdate", begDateCR);
report.SetParameterValue("@enddate", endDateCR);
 
report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "statement");

Open in new window



However, I am receiving the error:

System.Runtime.InteropServices.COMException: Missing parameter values.

The report looks good and works when I run it within the "Main Report Preview" window and set the values, however, the error at runtime.
0
Comment
Question by:FIM2003
2 Comments
 
LVL 3

Accepted Solution

by:
chrisrbloom earned 250 total points
Comment Utility
just a thought - make sure the dates are actual dates, and not string values.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
Comment Utility
If you change the FALSE to TRUE do you get prompted for parameters?

Are you linking the subreports using the @id parameter from the main report?
Try linking on the actually main report id field.

mlmcc
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now