Is it possible to use for (int i=1;i>0;i++)variable + "aaa"; in the stimula report?

Stimulsoft Reports.NET discussion
Post Reply
user
Posts: 5
Joined: Sun Aug 29, 2010 6:06 am

Is it possible to use for (int i=1;i>0;i++)variable + "aaa"; in the stimula report?

Post by user »

or is there a function similar replicate (aString, 5 ) in FoxPro ?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Is it possible to use for (int i=1;i>0;i++)variable + "aaa"; in the stimula report?

Post by Alex K. »

Hello,

You can add function replicate in code of report:

Code: Select all

public string Replicate(string var, int n)
{
	string originalVar = var;
	for (int i=1; i<n; i++)
	{
		var += originalVar;
	}
	return var;
}
And use {Replicate(StringValue, Count)}

Thank you.
Post Reply