zahj


i've ben trying to solve this thing for quite some time now, can't seem to figure it out.

here's the scenario

i'm working with 4 tables.
table1 - personal data (first name, middle name, last name, file no.)
table2 - stations/branches of the company (division1, division2, division3, file no.)
table3 - physical exam (date_evaluation, examiner, date_evaluation_submitted, file no.)
table4 - psychological exam(date_evaluation, examiner, date_evaluation_submitted, file no.)

the file no. in the 2nd, 3rd and 4th tables are based on the file no. from the first table.

the user input will be
1. option1 : as of date (will be compared with date_evaluation of physical exam)
option2 : period covered - from date a to date b (will be compared with date_evaluation of physical exam)

2. option1 : Alphabetical
option2 : by division

it would have been easier to use sql query but i can't seem to insert the values in a cursor. i need to grab the data from the cursor for the report.

here's how it goes... user will choose from the first options (this will decide which data will be retrieved)
the second options will determine the order by which data will be displayed.

hope you can help me out guys... thank you.




Re: report generation

dni


You may insert calclations in cursor for example:

SELECT field1+field2,filed1,field3,field*var1.....

and you may modify any data from cursor (like in any table) if you have:

SELECT .....FROM....WHERE.....INTO CURSOR <CURSOR NAME> READWRITE ...

(this will overwrite <CURSOR NAME>).







Re: report generation

Tamar E. Granor

You can build variables based on the user's input and then use them in a query. Here's the basic idea:

cWhere = "AND "
IF <user choose option1>
cWhere = "Date_Evaluation >" + m.AsOfDate
ELSE
cWhere = "BETWEEN(Date_Evaluation, " + transform(m.DateA) + ", " + transform(m.DateB) + ")"
ENDIF

In your query, use a macro to include this:

WHERE <the unchanging conditions> &cWhere

Tamar