Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a field in the header of the report
Message
De
27/02/2015 13:44:41
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01615930
Message ID:
01615952
Vues:
68
>>>Hi everybody,
>>>
>>>My colleague just sent me this question (I'll quote below) and I am not sure how to do this for the header of the report. I do see a way to use report variable and a footer, but not into the header. Any ideas?
>>>
>>>---------------------------------------------
>>>What the client wants is a field that prints Yes or No based on the presence of at least one of two specific DCIs in a sale. The original expression was just iif(item = ‘xxx’ or item = ‘xxx’, “Yes, “No”). That is fine when it is in the detail band, but they want it to only appear once so they put it in the page header. In that case it only looks at the first record in the csrTrans.
>>>
>>>It seems like it should be simple to count how many records there are with a certain value in the column. Am I missing something simple here?
>>>----------------------------------------------------------------------------
>>>
>>>So, how would I count the specific items and put the info in the header?
>>>
>>
>>First thought is to compute what you need before running the report, and set a relation to the driving table.
>>
>>Tamar
>
>I can not do this as all cursors are created with a separate program which I can not change. However, I think I concocted the following idea:
>
>Add a new report variable with this expression:
>
>
>NVL(_VFP.DoCmd([select COUNT(*) as cnt from csrTest where item = 'Item1' into array laArr]), laArr[1]))
>
>In my quick test in the command window it worked. I hope it will work in VFP report as well.

The report has events, could have own data processing that all will kick in after REPORT FORM ****. There is enough time to calculate anything assign it to a cursor ot a property of _SCREEN and use it.
Since you claim to use VFP 9 you can use the events of a report listener as well.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform