Page 1 of 1

Exception: StiVariablesCollection.Contains(String name)

Posted: Wed Feb 19, 2014 12:00 pm
by StepTK
Hello,

i get the following exception when i call the method "StiVariablesCollection.Contains(String name) 2014.1.1811.0:

Main System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Stimulsoft.Report.Dictionary.StiVariable'.
at Stimulsoft.Report.Dictionary.StiVariablesCollection.Contains(String name) in d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report\Dictionary\StiVariablesCollection.cs:line 180
Enclosed you will find my VisualStudio2010 source code. The problem seems to be the "Test.mrt" file, which is loaded....

Thank you!!

Stephan

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Wed Feb 19, 2014 12:43 pm
by StepTK
The problem seems to be the variable 3 below (from the mrt-file). Variable 1 and 2 do work but variable 3 is causing the cast exception!!!

<Variables isList="true" count="3">
<value>REQUESTVARS,Language,Sprache,System.String,Language,True,False</value>
<value>REQUESTVARS,StartTime,Startzeit,System.DateTime,_x0032__x002F_19_x002F_2014_x0020_1:08:31_x0020_PM,True,False</value>
<value>REQUESTVARS,StartTime,Startzeit,System.DateTime,_x0031_9.02.2014_x0020_10:23:36, True,False</value>

</Variables>

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Thu Feb 20, 2014 7:46 am
by Alex K.
Hello,

Can you please send us a detail step by step guide how to add and set value for this variable.

Thank you.

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Thu Feb 20, 2014 8:53 am
by StepTK
Hello Aleksey,

please check the attached project and use button1 and button2 to reproduce the error. Thank you.

Stephan

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Fri Feb 21, 2014 6:49 am
by Alex K.
Hello,

Please check the attachment. It is empty.

Thank you.

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Tue Mar 25, 2014 8:55 am
by StepTK
Hello Aleksey,

just checked the attachement and downloaded it successful!

Thanks

Stephan

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Tue Mar 25, 2014 12:14 pm
by Alex K.
Hello,

We couldn't reproduce this bug.
Also please clarify how you save your report Test.mrt. We could not open this report in designer.

Thank you.

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Mon Apr 07, 2014 12:21 pm
by StepTK
Hello Aleksey,

why is the attachement is removed?

Thanks

Stephan

Re: Exception: StiVariablesCollection.Contains(String name)

Posted: Mon Apr 07, 2014 12:46 pm
by Alex K.
Hello,

Your attachment contains licensed assemblies and has been removed.

Thank you.