Switch statement causes exception. Why?

Stimulsoft Reports.NET discussion
Post Reply
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Switch statement causes exception. Why?

Post by EDV Gradl »

I the new version 2008.1.206 the switch statement causes an exception.

When I do this i the report code:

Code: Select all

switch (Daten.Abrechnungszyklus)
{
  case 1 :
  	MyLine.Append("wöchentlich");
    break;
  case 2 :
  	MyLine.Append("2 x im Monat");
    break;
  case 3 :
  	MyLine.Append("alle 3 Wochen");
    break;
  case 4 :
  	MyLine.Append("monatlich");
    break;
  case 5 :
  	MyLine.Append("quartalsweise");
    break;
}
I get an an exception ; expected after Abrechnungszyklus)

What do I do?????
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Switch statement causes exception. Why?

Post by EDV Gradl »

The version 2008.1.200 compiles without a poblem

Marco
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Switch statement causes exception. Why?

Post by Edward »

The issue is confirmed. There was a conflict with a built in function Switch:

Code: Select all

object  Switch (condition1, value1, condition2, value2, ...)

The Switch evaluates the expressions from left to right, and returns the value associated with the first expression to evaluate to True. If all of the expressions are False, then Switch returns null.

Parameters 
Condition1, condition2, and so on are Boolean expressions. value1, value2, and so on are the possible values that may be returned.

Return Value
One of the values in the value list value1, value2, and so on.
Next prerelease build will contain a patch for this.

Thank you.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Switch statement causes exception. Why?

Post by Vital »

Prerelease build from 31 March will be solve this problem.

Thank you.
Post Reply