Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report preview headache
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00297450
Message ID:
00297460
Vues:
17
One way around this is use SQL statements to select all the report data into one cursor, then use this as the source for the report. Be sure to change (or better yet remove) any aliases in your report fields. Printing from the preview screen will then always work.

An example:
SELECT patient.name, labtest.result ;
 FROM patient, labtest ;
 WHERE patient.id = labtest.fk_patid ;
       AND latest.code = "HEPB" ;
 ORDER by 1, 2 ;
 INTO CURSOR cReport

IF _TALLY > 0
 KEYBOARD '{CTRL+F10}'
 SELECT cReport
 REPORT FORM repHep PREVIEW
ELSE
 WAIT WINDOW "NO DATA"
ENDIF
>Has any seen this behaviour?
>The problem occurs only on user's machine not on my development machine. I'm using (still?) VB5. We are all on NT. There are two command buttons on the form, one is for previewing the current record the other for printing it. There should always be only one page printed (the current record). The print button works fine but if the user clicks the preview button and then clicks the print icon in the preview it cycles thru the entire table not just the current record.
>
>
>My original code was:
>KEYBOARD '{CTRL+F10}'
>REPORT FORM hf_let2 PREVIEW NEXT 1
>
>I then changed it to:
>KEYBOARD '{CTRL+F10}'
>REPORT FORM hf_let2 PREVIEW FOR id_complaint = lcComplaintId
>
>Both behave the same way. Any help would be appreciated.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform