Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Output Order
Message
 
 
To
23/04/2000 10:23:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00362581
Message ID:
00362597
Views:
22
>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
* in the calling PRG
USE patient
USE labresult

* get fields needs and then order the data
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

* ensure the cursor is currently select
SELECT cReport
* run the report
REPORT FORM cReport PREVIEW
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform