cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify field values at runtime

former_member347100
Discoverer
0 Kudos

Hi,

We have a Crystal Report Viewer inside a .NET web application. Is there a way to iterate through the fields in a generated report document and modify the displayed field value at runtime?

Here is pseudo code example of what I am trying to achieve:

MyMethod(ReportDocument report)
{
	var allReportFields = report.getAllFields(); //???

	//Add “some_text” suffix to all fields starting with “*”
	Foreach(var field in allReportFields)
	{
		If(field.value.beginsWith(“*”)
		{
			//Change the field value
			field.value += “some_text”;
		}
	}
}

Regards,

Georgi

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

No, that is what the refresh button is for, it updates the data coming from the DB.

If you want to modify Static text that is easy, see KBA 2281780 for samples or try searching or look in the SDK help file or in Inteli-sense withing VS.

Don

Answers (1)

Answers (1)

0 Kudos

Oh, another way is to insert a text object and then drop the field into that object, now you can append text onto it.

Don