Page 1 of 1

problem in using variables!

Posted: Sun Nov 08, 2009 1:28 am
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.

problem in using variables!

Posted: Mon Nov 09, 2009 8:04 am
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.