Solved

Missing Parameter Values - Passing to Stored Procedure

Posted on 2011-03-16
2
1,055 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 101

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

627 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