ArunVashist
asked on
visual C#, Crystal reporting, unbound field
Hi Friends,
I am developing a windows application using C# in VS 2008, now i am creating a Crystal report with unbound field and pass a string value at runtime. now the issue is when I type string directly as shown below it shows report properly :
rpt.DataDefinition.Formula Fields["ub sPatientNa me"].Text = "\"some text to show\"";
but when I pass a value of datarow as given below it never show anything
DataRow dr = dsTemp.Tables["PatientById "].Rows[0] ;
rpt.DataDefinition.Formula Fields["ub sPatientNa me"].Text = dr["FirstName"].ToString() ;
I think its just because of "\" character which is not present in second case, but I don't exactly know the purpose of "\" and how to add this to string. please guide.
thanks.
I am developing a windows application using C# in VS 2008, now i am creating a Crystal report with unbound field and pass a string value at runtime. now the issue is when I type string directly as shown below it shows report properly :
rpt.DataDefinition.Formula
but when I pass a value of datarow as given below it never show anything
DataRow dr = dsTemp.Tables["PatientById
rpt.DataDefinition.Formula
I think its just because of "\" character which is not present in second case, but I don't exactly know the purpose of "\" and how to add this to string. please guide.
thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
I am accepting solution as suggested by James0628 and mlmcc as both solutions works find for me but assigning James0628 for his early reply and mlmcc for making point more clear to me.
thanks
I am accepting solution as suggested by James0628 and mlmcc as both solutions works find for me but assigning James0628 for his early reply and mlmcc for making point more clear to me.
thanks
You're welcome. Glad I could help.
James
James
James