473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Getting error on RDLC parameter not defined in this report

dbrewerton
115 100+
Does anyone know what causes this problem? I have a winforms report viewer and I have declared the variables on the report. There are three, StartDate, EndDate, and PatientID. Here is my code:

Expand|Select|Wrap|Line Numbers
  1.         public BPReport()
  2.         {
  3.             InitializeComponent();
  4.             DateTime StartDate = DateTime.Today.AddDays(-30);
  5.             DateTime EndDate = DateTime.Today.AddDays(0);
  6.             BaseForm BForm = new BaseForm();
  7.             string PatientID = BForm.PatientIDVal.ToString();
  8.             reportViewer1.Clear();
  9.             ReportParameter[] Param = new ReportParameter[3];
  10.             Param[0] = new ReportParameter("StartDate", StartDate.ToString());
  11.             Param[1] = new ReportParameter("EndDate", EndDate.ToString());
  12.             Param[2] = new ReportParameter("PatientID", PatientID.ToString());
  13.             this.reportViewer1.LocalReport.SetParameters(Param);
  14.             this.reportViewer1.RefreshReport();
  15.         }
  16.  
Any ideas?
Oct 16 '13 #1
0 1546

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Raj | last post by:
hi, How to pass a Two Date parameter to a report at runtime using VB .NET 1. How do we pass multiple values eg. Startdate, EndDate to crystal reports parameter. 2. I have a report to...
7
by: Gil | last post by:
trying to use a template in a vector, in Visual Studio 6 on Windows 2000 #include <vector> using namespace std; template <typename T> class AnyValue { T val;
1
by: Marius Rus | last post by:
Could anyone tell me please how to write from the c# code in an parameter? For example I have an report that it is asking for a client code as the parameter. Now it is showing the interface from...
12
by: karanj | last post by:
Hi all, I'm facing an issue with Access that I haven't been able to find a solution for, despite hours of googling, so I hope someone here can help! I've got a report - rptClientsByCountry -...
2
by: =?Utf-8?B?R3lhbmVuZHJh?= | last post by:
I am using Ajax control(Update Panel) in my web page(ASP.Net 2.0) and putting Report Viewer(Sql Server Reporting Services 2005) Control in it. When I am displaying any report it is coming...
0
by: grego9 | last post by:
When I run the following macro in Excel (using VBA) I get the run time error 1004 application defined or object defined error. I get the usual debug message and when I click end I actually get the...
6
by: gonella123 | last post by:
I am getting #Error while generating report, after converting the database from 2003 to 2007. The "#Error" when run the report. On this you have report elements use nested if-statements as...
0
by: Hema Suresh | last post by:
Hi all I am trying to create a database using vb6 and excel I created few controls on the vb form and coded to get the details from the user I code in the way to pass the data which i got from the...
3
by: ponnu123 | last post by:
FORM SECTION Private Sub command1_click() tsql$ = "SELECT empname From employee" tsql$ = tsql$ & "where empid = 1 " Set rs = cn.Execute(tsql, openstatic, LockReadonly) While Not (rs.BOF Or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.