problem in using variables!

Stimulsoft Reports.NET discussion
Post Reply
mosi1380
Posts: 7
Joined: Fri Nov 06, 2009 2:03 pm

problem in using variables!

Post by mosi1380 »

hi,
i need your help please;
i can't write this code in code editor:
public override void SaveState(System.String stateName)
{
base.SaveState(stateName);
this.States.Push(stateName, this, "Name", this.Name);
this.States.Push(stateName, this, "Surname", this.Surname);
this.States.Push(stateName, this, "Email", this.Email);
}
public override void RestoreState(System.String stateName)
{
base.RestoreState(stateName);
this.Name = ((string)(this.States.Pop(stateName, this, "Name")));
this.Surname = ((string)(this.States.Pop(stateName, this, "Surname")));
this.Email = ((string)(this.States.Pop(stateName, this, "Email")));
}



In fact, i declare them in variables dictionary, but when in VS2008 C# i declare:
stiReport1["Name"] = textBoxName.Text;
.
.
.

VS compiler says that "Name" Variable not found.

what you say? Is it depend on SaveState, RestorState? If Yes, How to override?
so, please help me.
Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

problem in using variables!

Post by Jan »

Hello,

You don't need write something in report code. Report generator automatically update this code when you add variables to report dictionary.

Thank you.
Post Reply