LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: Paul on August 09, 2021, 09:27:27 PM

Title: Border thickness based on variable
Post by: Paul on August 09, 2021, 09:27:27 PM
Is it possible to change textitem border according variable value?
For example like:
if(dataset.border == 1)
{
  border-top = 1;
}
else
{
  border-top = 0;
}
Title: Re: Border thickness based on variable
Post by: Arin Alex on August 11, 2021, 05:35:58 PM
Hi!
You can do something like this:

$S{
Borders = {
  "top":1,
  "bottom":2,
  "left":4,
  "right":8,   
  "all": 15
}

if (borderOn){
   THIS.borders = Borders.top // it could be THIS.borders = Borders.all or THIS.borders = Borders.top + Borders.bottom
} else {
   THIS.borders = 0
}
}