Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How to print qr code image and related data to report ?
ahmed salah
Jan 18 2017 6:16 AM
216
Reply
I work in windows form c# visual studio 2015
I make program to generate qr code for :
Name textbox1
Country combobox1
Type MembrShip textbox3
I already do Generate for qr code using Messagetoolkit library
but my main Problem
How to print data of textbox1 and combobox1 and textbox3 and qr code image in report?
I need after generate qr code pass all data found in
textboxes(textbox1,combobox1,textbox3,qr code image generting ) to report ?
but how to do that using c# code
code for generate button click as following :
private
void
Generate_Click(
object
sender, EventArgs e)
{
if
(textBox1.Text ==
""
|| textBox3.Text ==
""
|| Convert.ToInt32(comboBox1.SelectedValue)==0)
{
MessageBox.Show(
"Please Enter Value "
,
"Error"
);
textBox1.Focus();
}
else
{
using
(SaveFileDialog sv =
new
SaveFileDialog() { Filter =
"JPEG|.jpg"
, ValidateNames =
true
})
{
if
(sv.ShowDialog() == DialogResult.OK)
{
MessagingToolkit.QRCode.Codec.QRCodeEncoder encoder =
new
MessagingToolkit.QRCode.Codec.QRCodeEncoder();
encoder.QRCodeScale = 8;
string
encoding =
"Name : "
+ textBox1.Text +
"\r\n"
+
"Country : "
+ comboBox1.Text +
"\r\n"
+
" MemberShip : "
+ textBox3.Text;
Bitmap bmp = encoder.Encode(encoding);
pictureBox1.Image = bmp;
path = sv.FileName;
bmp.Save(path, ImageFormat.Jpeg);
}
}
}
}
private
void
Report_Click(
object
sender, EventArgs e)
{
// what i write here to print values in textbox1 and combox1 and extbox3 and generating qr code to report ?
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
File parse in c#
How to append data to excel from text boxes ?