>I'm using two tables one client the other payment. I've created a report which includes both tables related by ssnumbers. The Child table (payment) details the payment information, the master table (client) has the client information in it. In my report I have a data Envirement of payment linked to client via relationship of ssnumbers.
>Also in the report the fields are denoted by table name then field(payment.ssnumbar). I was told that in order for me to use a CURSOR IN AN SQL that the DATA ENVERMENT of the report had to be empty, and the data fields could not point to a table. And if I'm using two tables, how do I get the output of my report to be in CLIENT.LASTNAME ORDER ?
First remove the tables from the report Dataenvironment.
Remove the alias from field on the report
In the calling form or prg open all of the tables that you need.
In the calling form, prg or in the init of the report dataenvironment create your SQL statment that will extract the report data into a simple cursor. Order the results of the cursor.
An example
USE patient
USE labresult
SELECT patient.name, labresult.testdate, labresult.testresult ;
FROM patient, labresult ;
WHERE patient.id = labresult.fk_patientid ;
labresult.testdate > date() - 7
ORDER BY patient.name, labtest.testdate ;
INTO CURSOR cReport
SELECT cReport
REPORT FORM cReport PREVIEW