Topic: How to pass variables to sql report queries
Hi to all,
I have a grid that displays the data from an attached database.
On the same form that the grid resides I also have some drop down boxes to select values to build queries on the displayed data. Everything works of and the data are filtered and displayed on the grid based on the drop down selections.
Now this is the problem that I have:
I wish to create a report on the displayed data (which belong to an attached database).
I have build a button that is setup as an SQL report.
How do I setup the sql query so that I can pass variable data to it and get results from an attached database?
for example: I have a variable names 'make' where I store the name of the make of the car that I want to get data for from the attached table.
The attached table has a name 'products' and the attached database has a name of 'Test'.
How would the sql query be setup?
for example : SELECT * FROM "PRODUCTS" WHERE "Feature:Μάρκα"= '+make+' ORDER BY "Feature:ΕίδοςΑνταλλακτικού" AND "Feature:Θέσηανταλλακτικού"
What am I doing wrong?
Thank you