TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pravin Ghadge
562
2.1k
586.6k
Missing Parameterfield currrent value
Mar 2 2013 6:43 AM
Dear all,
I have created crystal report.
In that i have used command to fetch records from sql.
But When i am calling report through code. its giveing me runtime error "Missing Parameterfield currrent value"
string reppath = "";
rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
string DOCENTRY = "";
ParameterFields myparam = new ParameterFields();
ParameterField param1 = new ParameterField();
ParameterField param2 = new ParameterField();
ParameterDiscreteValue dv1 = new ParameterDiscreteValue();
ParameterDiscreteValue dv2 = new ParameterDiscreteValue();
param1.ParameterFieldName = "@FromDate";
param2.ParameterFieldName = "@ToDate";
string dtpFrom = Convert.ToDateTime(DateTime.Today.Date.ToShortDateString()).ToString("yyyy/MM/dd");
dv1.Value = dtpFrom;
dv2.Value = dtpFrom;
param1.CurrentValues.Add(dv1);
myparam.Add(param1);
param1.CurrentValues.Add(dv2);
myparam.Add(param2);
crystalReportViewer2.ParameterFieldInfo = myparam;
reppath = ReportName;
rd.Load(reppath);
oDAL.OpenConnection();
crystalReportViewer2.ReportSource = rd;
crystalReportViewer2.ShowCloseButton = true;
Reply
Answers (
0
)
Rich Text Formatting in Reports
how to customize page size in crystal report in c#