What do you do when...
Wayne Germann
wgermann at PACIFIC.EDU
Tue Dec 1 16:31:55 EST 2020
Try adding a loop testing that the file was created instead of using the "If Flag True" statement. Or try taking out the "If Flag True" statement all together.
Take out the part here and see if it works.
Prompt for print or export file
"If flag false
Quit method
End If"
-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Andrew Stolarz
Sent: Tuesday, December 1, 2020 7:56 AM
To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Subject: Re: What do you do when...
Hi Das,
Try putting your code into "If flag true" after your Prompt for print or export file line to see if that helps.
Andrew
On Mon, Nov 30, 2020 at 4:56 PM Das Goravani <goravanis at gmail.com> wrote:
>
> What do you do when stepping through your code works, and letting it
> run normally doesn’t work?
>
> I have this simple report print to file code.. and it works if I just
> stop on one 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 run it without stopping on some line.. it produces an empty file..
> normally it’s packed 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,ivTranReadTextsRow.TMOON_READ
> ,ivTranReadTextsRow.TMARS_READ,ivTranReadTextsRow.TMERC_READ,ivTranRea
> dTextsRow.TJUP_READ,ivTranReadTextsRow.TVEN_READ,ivTranReadTextsRow.TS
> AT_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 http://lists.omnis-dev.com Start a
> new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list