Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confirm and fix expression builder bug using dtoc(datefi
Message
De
25/11/2005 15:47:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/11/2005 15:35:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Divers
Thread ID:
01072049
Message ID:
01072154
Vues:
27
>>Create your own expression builder, or use mine... which is the same old, but reverts to default datasession before actually showing:
>>
* Proc GetEx
>>*[2002/02/14 23:21:02] dragan -  replace the regular expression builder
>>* with one that works in a default datasession, so it sees the open tables
>>Lparameters cExpressionType, cErrorMessageText,  cDefaultExpression, cCaptionText
>>Local lcGetEx, lcTemp, nDS
>>nDS=set("datasession")
>>set datasession to 1
>>IF EMPTY(cErrorMessageText)
>>	cErrorMessageText=""
>>ENDIF
>>IF EMPTY(cDefaultExpression)
>>	cDefaultExpression=""
>>ENDIF
>>IF EMPTY(cCaptionText)
>>	cCaptionText="Pick a field or compose expression"
>>ENDIF
>>
>>
>>lcTemp=""
>>lcGetEx=_Getexpr
>>set datasession to (nDS)
>>_Getexpr=""
>>
>>* 2002.04.24 kicked out the type, because any type can go into a report.
>>Getexpr cCaptionText To lcTemp Default cDefaultExpression
>>* restore old
>>_Getexpr=lcGetEx
>>Return lcTemp
>>
>>
>>Save this to a .prg and set _getexpr to it.
>
>Dragan, how to add your code to VFP 9 report builder source code (to panelfieldexpr method?)

Don't know the innards of that builder, never used it :).

I don't think you have to do anything to it, though - just set

_getexpr="{full path to your getexpr.prg}"

before you run the builder. You may just add that somewhere at the top of the builder.

A caveat, though - I usually don't use this for reports, but rather for forms, and for that I have a DE object which goes with the form, and which will be instantiated once the form runs. It has its own datasession, so in my private version of this getexpr.prg I don't set the DS to 1, but to this object's DS. If you have something similar, you may need to change that line to suit your environment.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform