LimeReport Forum

General Category | Основное => Requests | Пожелания => Topic started by: steros on February 27, 2020, 02:00:12 PM

Title: Data source query from dialog
Post by: steros on February 27, 2020, 02:00:12 PM
I have to set sql of datasource based on dialog form input, like:
 ... where [db_field]=$S{Dialog.lineEdit.text}

How can I do ?

Thanks
Title: Re: Data source query from dialog
Post by: Arin Alex on February 27, 2020, 02:59:58 PM
Hi!
You can create a query with a variable like this:
Code: [Select]
Select * from customers where CustomerId = $V{CustomerID}
then create some dialog with the line editor for example.
In the init script you can write something like this:
Code: [Select]
Dialog.lineEdit.text = getVariable("CustomerID")
Dialog.exec();
setVariable("CustomerID",Dialog.lineEdit.text)
 
Title: Re: Data source query from dialog
Post by: steros on February 27, 2020, 03:12:30 PM
Perfect, it works ! Thank you very much !