Solved

Missing Parameter Values - Passing to Stored Procedure

Posted on 2011-03-16
2
1,053 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
ID: 35148183
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
ID: 35149397
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 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