Parser error: ) expected on VB report

Stimulsoft Reports.JS discussion
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Parser error: ) expected on VB report

Post by mrapi »

Hi.
I have a report based on language VB,that uses in some expression conditional IIF().report works on .NET winforms(no error on compile),but after publish it to Angular and use it I got in browser console:

Code: Select all

Parser error: ) expected    Expression in Text property of 'Text3' can't be evaluated! [object Object] 
(inside Text3 is used IIF() )
thanks
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Parser error: ) expected on VB report

Post by HighAley »

Hello.

The VB.NET language is not supported by our JavaScript engine.
If you are creating a report in .Net Framework, please, set the Report Language to C# and Calculation mode to Interpretation.

Thank you.
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Re: Parser error: ) expected on VB report

Post by mrapi »

thanks.I've swithed report to C#,but I have some scripts inside report,tried to convert but got error:

Code: Select all

 PageFooter1.BeforePrint event error: Parser error: Syntax error - unprocessed lexemes remain
vb code:

Code: Select all

  
  if tbfc.CUCH=2 then Panel1.top=0
If tbfc.COTATVA=0 And Not(wMutate)
  wMutate=true
  Dim wDeplas As Decimal=0.97

  VerticalLinePrimitive14.left=7.6
  VerticalLinePrimitive4.left=7.6
  
  VerticalLinePrimitive10.left+=wDeplas
  VerticalLinePrimitive11.left+=wDeplas  

converted c#:

Code: Select all

if (tbfc.CUCH==2)
  Panel1.top=0;

If (bfc.COTATVA==0 && !wMutate)
  wMutate=true;
var wDeplas=0.97;

  VerticalLinePrimitive14.left=7.6;
  VerticalLinePrimitive4.left=7.6;
  

  VerticalLinePrimitive10.left+=wDeplas;
  VerticalLinePrimitive11.left+=wDeplas;
  VerticalLinePrimitive12.left+=wDeplas+0.14;
  VerticalLinePrimitive13.left+=wDeplas;
  
  Text40.left+=wDeplas;
  Text25.left+=wDeplas+0.09;
  Text9.left+=wDeplas+0.09;
  Text38.left+=wDeplas;
  Text15.left+=wDeplas;

  Text24.left+=wDeplas;
  Text62.left+=wDeplas;
  Text18.left+=wDeplas;
  Text60.left+=wDeplas;
  Text47.left+=wDeplas;
  Text67.left+=wDeplas;
  Text12.width+=wDeplas;
}

thanks
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Parser error: ) expected on VB report

Post by HighAley »

Hello.

In the Interpretation mode all expressions are processed by our interpreter.
It has limited support of the C# expressions. That's why I wrote about the Interpretation mode.
If you get such message in the Interpretation mode this means that this code is not supported.

Thank you.
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Re: Parser error: ) expected on VB report

Post by mrapi »

k.the above VB code works fine for couple years inside report,it conditionally moves some elements in report increasing the .left property
how can I achieve now the same effect?thanks
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Re: Parser error: ) expected on VB report

Post by mrapi »

any answer there?
thanks
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Parser error: ) expected on VB report

Post by Lech Kulikowski »

Hello,

In the JS version, is limited supporting of code in events. Your code is not supported in the JS version not for VB, not for C#.

Thank you.
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Re: Parser error: ) expected on VB report

Post by mrapi »

Hi. is there any way of moving (changing .Left property) a element from the code outside the report,just directly from the js code,similar to setting variable reports from outside

Code: Select all

 report.dictionary.variables.getByName("myVariable").valueObject = ...
thanks
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Parser error: ) expected on VB report

Post by Lech Kulikowski »

Hello,

You can use the getComponentByName() for the report to get the necessary components in your code and then set properties:
https://admin.stimulsoft.com/documentat ... nentbyname

Thank you.
mrapi
Posts: 277
Joined: Sat Dec 20, 2008 1:08 am

Re: Parser error: ) expected on VB report

Post by mrapi »

Hi,I've tried

Code: Select all

  report.GetComponentByName('VerticalLinePrimitive14').Left = 7.2;
but got error:
report.GetComponentByName is not a function
Post Reply