What do you do when...
Bruno Del Sol
bruno.delsol at bydesign.fr
Tue Dec 1 00:38:59 EST 2020
HI Das,
Here's a sample of a Transmit text to print file method
Close print or export file
Prompt for print or export file
If flag false
Quit method
End If
Calculate list.$line as 0
While list.$next(0,kTrue)
Begin text block
Text:grant select on [list.Objname] to [Username] ;(Carriage
return,Linefeed)
Text:(Carriage return,Linefeed)
End text block
Get text block Texte
Transmit text to print file [Texte]
End While
Close print or export file
Regards
Bruno
By Design
[1]http://www.bydesign.fr
Bruno Del Sol
[2]bruno.delsol at bydesign.fr
46, rue de La Tour d'Auvergne
75009 Paris (France)
Le 30/11/2020 à 20:25, Das Goravani a écrit :
What do you do when stepping through your code works, and letting it run normall
y doesn’t work?
I have this simple report print to file code.. and it works if I just stop on on
e line in it.. it’s as if giving it that time to think makes it work.
Here it is, in entirety… if I stop on the Prompt for print or export file line..
and then Go after that… it works fine.. the logic is solid.. but if I try to ru
n it without stopping on some line.. it produces an empty file.. normally it’s p
acked with about four pages of text.
On evClick
Send to file
Prompt for print or export file
If flag false
Quit method
End If
Set export format One field per line
Calculate #S1 as con('Transit Readings for ',date,chr(13),chr(13))
Transmit text to print file [#S1]
Set report name rcTranReadDay
Prepare for print
Calculate date as ivMainDate
Calculate TranPlanReadDropList.$line as 0
Calculate #50 as 0
Repeat
Calculate TranPlanReadDropList.$line as TranPlanReadDropList.$line+1
Calculate #50 as #50+1
Calculate #S1 as con(chr(13),chr(13))
Transmit text to print file [#S1]
Calculate ivTranReadShowText as pick(#50,'',ivTranReadTextsRow.TSUN_READ,ivTranR
eadTextsRow.TMOON_READ,ivTranReadTextsRow.TMARS_READ,ivTranReadTextsRow.TMERC_RE
AD,ivTranReadTextsRow.TJUP_READ,ivTranReadTextsRow.TVEN_READ,ivTranReadTextsRow.
TSAT_READ,ivTranReadTextsRow.TRAHU_READ,ivTranReadTextsRow.TKETU_READ)
Calculate #S1 as ivTranReadShowText
Transmit text to print file [#S1]
Until #50=9
End print
Close print or export file
_____________________________________________________________
Manage your list subscriptions at [3]http://lists.omnis-dev.com
Start a new message -> [4]mailto:omnisdev-en at lists.omnis-dev.com
References
1. http://www.bydesign.fr/
2. mailto:bruno.delsol at bydesign.fr
3. http://lists.omnis-dev.com/
4. mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list