Select parameters and QR 
Author Message
 Select parameters and QR

>  Using D3 and a .dbf file, I want to leave a QuickReport form with 4
> blank text fields and then let the user choose whatever four fields of
> the database he would like to put in the QR by choosing from a listbox
> (or similar) of the fieldnames....Is there a way I can say SELECT X,Y
>FROM MYDATABASE by passing the values to X and > Y? Thanks,

 Since no one else has answered you, let me try. :)

 Your problem is that you are focusing on the Select statement variables
and forgetting that the whole Select statement can be put into a string
variable. Here's how you can do it:

 1) Put the fields in a CheckListBox with controls so that the user
doesn't choose more than four
 2) Feed the choices into a ListBox
 3) Put the ListBox index values into a string array
 4) Put the string values into the DataField property:  
repForm.QDBText0.DataField := Value[0], etc.
 5) Concantenate the string, something like: 'Select ' + Value[0] + ' '
+Value[1] (etc.) + 'from Database)'
 6) run the report

 Hope this helps. :)
Brad Blanchard

Thu, 26 Apr 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. To use QR or not to use QR that's the question

2. Using parameters in SELECT

3. Invalid Parameter after xxx select queries


5. List of the SET parameters (in .BAT file) to parameter DPMI

6. QR memory leak

7. How can I save a QR report in qrp format via CODE

8. Searching for QR-Barcode-Component

9. QR 2 to 3 Problems

10. Help needed with QR and JPEG images

11. Best End-User ReportEditor???QR/RS/CR?

12. Bands order in QR


Powered by phpBB® Forum Software