Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New User, Expression question
Message
De
24/07/2002 17:03:11
 
 
À
24/07/2002 16:34:53
Darrin Hughes
Chena-Don Textiles and Armory
Jacksonville, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00682288
Message ID:
00682303
Vues:
14
Darrin,

I found this in another thread of yours. Is this the code the program uses to print the report?
IF This.Parent.chkPrint.Value = 1
    This.Parent.txtStatus.Value = "...Printing Report..."
    SELECT finalinventory
    INDEX ON IN_STOCK TAG IN_STOCK
    SET ORDER TO IN_STOCK
    REPORT FORM CDIPIU TO PRINTER
ENDIF
Put this code in its place, and you can leave the report as it was originally:
IF This.Parent.chkPrint.Value = 1
    This.Parent.txtStatus.Value = "...Printing Report..."
    select * from finalInventory ;
        where left(in_stock,2)<>"LP" ;
            and iutotal<>0 ;
        order by in_stock ;
        into cursor finalInventoryCursor
    REPORT FORM CDIPIU TO PRINTER
ENDIF
You can try the SELECT statment from the command window to make sure it is returning the correct records. You can also run the REPORT FORM statement from the command window to check the output.

As you have heard, you can also use the PRINT WHEN expression inside of the report. However, you would have use the PRINT WHEN on every field in the report. It is much more flexible to simply use a SQL-Select statement to get only the records you need.

>Yep, get ready for it, I'm gonna say and ask some stupid things :-)
>
>I need to build an expression in a report but I don't know how to implement it. The program I have, mostly developed by a third party, prints out several reports from Cougar Mountain Accounting data files. The problem with the actual report is I need it NOT to print some entire entries, specifically any IN_STOCK numbers begining with "LP" and any entry that has a 0 total in iutotal. So the questions are:
>
>1: I know I need to modify the form to include the expresion to exclude, but do I need to place that expression in every field across the page, or just in the fields in question?
>
>2: How do I build said expression in the first place? Will logical functions work? Do I need to build it using some type of INLIST command, or somthing else?
>
>3: Did I just have thick for breakfast, or are these questions making any kind of sense?
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform