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
umut çelik
NA
4
5.3k
c# Reportviewer Parameter
Dec 5 2018 5:50 AM
I want to show the textbox values on Form1 that I have placed in Form 2 for Reportviewer. I get an example on the Internet or I can help you get an error as shown in the picture below in the code I wrote in my application. Thanks.
Form1 frm =
new
Form1();
private
void
Form2_Load(
object
sender, EventArgs e)
{
this
.reportViewer1.RefreshReport();
}
private
void
PassReport()
{
ReportParameter[] allPar =
new
ReportParameter[3];
// create parameters array
ReportParameter parSum =
new
ReportParameter(
"Sum"
,
"195"
);
ReportParameter parDiscount =
new
ReportParameter(
"discount"
,
"19"
);
ReportParameter parTotal =
new
ReportParameter(
"total"
,
"176"
);
allPar[0] = parSum;
//assign parameters to parameter array
allPar[1] = parDiscount;
allPar[2] = parTotal;
reportViewer1.LocalReport.SetParameters(allPar);
// set parameter array
}
private
void
reportViewer1_Load(
object
sender, EventArgs e)
{
PassReport();
}
Reply
Answers (
5
)
Explain what would be the output from the code segment:
C# add(), delete(), update() Inventory Console App Help