1
Answer

Crystal Reports: To insert new field into the report.

akbhattacharya

akbhattacharya

20y
2.3k
1
Hi All, I need a liitle help here. I have been working with VB.Net + Crystal reports, for past few months. Everythings working fine. But now I had to modify the database and added one more field into it. Eventually I need to change my report, in other words I need to add that field in my report. I could do it with Report Expert. but it will ultimately destroy the total format of my current report. I want to know if anybody has a way to insert a new field into the report without changing the format of my report.(Just like we do for inserting special fields). Thank you...
Answers (1)
0
Vikram N
NA 66 14.7k 11y
thank u Sanjeeb...Lemme try it out...:)
0
Sanjeeb Lenka
NA 22.1k 1.3m 11y
check this code:

public int SaveEmp(Emp objEmp)
{
using (SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"))
{
 string query = "Emplyentry";  //stored procedure name
using (SqlCommand cmd = new SqlCommand(query , con))
{
cmd.Parameters.AddWithValue("@EmpName", objEmp.EmpName);
cmd.Parameters.AddWithValue("@EmpSal", objEmp.EmpSal);
con.Open();
int a = cmd.ExecuteNonQuery();
con.Close();
return a;
}

}
}
0
Vikram N
NA 66 14.7k 11y
Thanx a lot for ur kind reply Sanjeeb,That linkhelped me a lot...
But in dat example, database tables are used... But i need stored procedures usage... kindly help:)