I am working on C# windows form application,
it has five fields namely ID, NAME, CONTACTNUMBER, EMAIL AND DESCRIPTION (MultiLine)
and in database it has respectively fields,
while saving data for Description
field i use newline(next line) like below:
{XYZ,
1st, STREET,
CITYNAME.}
In database it will save in single line but when i try print using crystal report then also it will print in single line as such:
like{XYZ,1st,STREET,CITYNAME}
but I want output like this:
{XYZ,
1st, STREET,
CITYNAME.}
How to Achieve this?
The following is the code to save to the database:
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into AddCaseSheet values('" +ID.Text + "',
'" + NAME.Text + "','" + CONTACTNUMBER.Text + "','" + EMAIL.Text + "','"+DESCRIPTION.Text+"')";
con.Close();
And the code To Print:
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("Select * from DETAILS where ID= '" + ID.Text + "'", con);
DataSet dst = new DataSet();
sda.Fill(dst, "DETAILS");
crystalReport.Load(@"E:\TrialTest\CrystalReport2.rpt");
crystalReport.SetDataSource(dst);
crystalReportViewer1.ReportSource = crystalReport;
con.Close();
What I want is while printing description column
it should be in new line format, any reference to learn about it or any video or anything, will be good