Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Sript language tutorial?  (Read 2742 times)

Mucip

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Sript language tutorial?
« on: February 29, 2020, 03:27:56 pm »
Hi,
Is there any tutorial about LimeReport Script Language? I only found this video but not enaugh.

https://www.youtube.com/watch?v=9tVicuuTWFc

I need the function of selecting bigger or smaller value of to int value like below?


int MainWindow::biggerValue(int gelen1, int gelen2)
{
    if(gelen1 == gelen2) return gelen1;

    if(gelen1 < gelen2) return gelen2;else return gelen1;

}

int MainWindow::smallerValue(int gelen1, int gelen2)
{
    if(gelen1 == gelen2) return gelen1;
    if(gelen1 > gelen2) return gelen2;else return gelen1;

}



Can I use same functions in LimeReport Script ,n case of determine bigger or smaller value of two database value?

Ofcourse I can send it with SQL too but I want to diving deep in LimeReport.  ;)


Regards,
Mucip:)

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Sript language tutorial?
« Reply #1 on: March 01, 2020, 12:32:46 pm »
Hi!

Limereport uses JavaScript.

For example:
Code: [Select]
 
var max = function (a,b){
  if (a > b) return a;
  else return b;
}

or

var max = function (a,b){
  return a > b ? a : b;
}


« Last Edit: March 01, 2020, 12:36:23 pm by Arin Alex »

Mucip

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Sript language tutorial?
« Reply #2 on: March 01, 2020, 05:49:21 pm »
Hi,
Work like a charm. Thanks. ;)

Regards,
Mucip:)