LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: Mucip on February 29, 2020, 03:27:56 PM

Title: Sript language tutorial?
Post by: Mucip 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:)
Title: Re: Sript language tutorial?
Post by: Arin Alex 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;
}


Title: Re: Sript language tutorial?
Post by: Mucip on March 01, 2020, 05:49:21 PM
Hi,
Work like a charm. Thanks. ;)

Regards,
Mucip:)