Exception: StiVariablesCollection.Contains(String name)

Stimulsoft Reports.Silverlight discussion
Locked
StepTK
Posts: 30
Joined: Fri Oct 25, 2013 10:22 am

Exception: StiVariablesCollection.Contains(String name)

Post 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
StepTK
Posts: 30
Joined: Fri Oct 25, 2013 10:22 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post 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>
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post 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.
StepTK
Posts: 30
Joined: Fri Oct 25, 2013 10:22 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post by StepTK »

Hello Aleksey,

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

Stephan
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post by Alex K. »

Hello,

Please check the attachment. It is empty.

Thank you.
StepTK
Posts: 30
Joined: Fri Oct 25, 2013 10:22 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post by StepTK »

Hello Aleksey,

just checked the attachement and downloaded it successful!

Thanks

Stephan
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post 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.
StepTK
Posts: 30
Joined: Fri Oct 25, 2013 10:22 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post by StepTK »

Hello Aleksey,

why is the attachement is removed?

Thanks

Stephan
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Exception: StiVariablesCollection.Contains(String name)

Post by Alex K. »

Hello,

Your attachment contains licensed assemblies and has been removed.

Thank you.
Locked