Page 1 of 2

Parser error: ) expected on VB report

Posted: Sat Aug 04, 2018 5:58 pm
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

Re: Parser error: ) expected on VB report

Posted: Mon Aug 06, 2018 8:00 am
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.

Re: Parser error: ) expected on VB report

Posted: Mon Aug 06, 2018 9:14 am
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

Re: Parser error: ) expected on VB report

Posted: Mon Aug 06, 2018 10:02 am
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.

Re: Parser error: ) expected on VB report

Posted: Mon Aug 06, 2018 10:32 am
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

Re: Parser error: ) expected on VB report

Posted: Fri Aug 10, 2018 7:23 am
by mrapi
any answer there?
thanks

Re: Parser error: ) expected on VB report

Posted: Mon Aug 13, 2018 11:18 am
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.

Re: Parser error: ) expected on VB report

Posted: Mon Aug 13, 2018 11:23 am
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

Re: Parser error: ) expected on VB report

Posted: Tue Aug 14, 2018 9:51 am
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.

Re: Parser error: ) expected on VB report

Posted: Tue Aug 14, 2018 6:35 pm
by mrapi
Hi,I've tried

Code: Select all

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