Well it was working....#
John Dowbiggin
Greetings
UniPaas1.9 and Pervasive 11.
I am trying to produce a program that will either direct output to a printer, in which case I want a print dialogue or I want to create the output as separate Pdf’s and attach them to an email. I have had this working (so I thought) until I demo to customer.
I have achieved this by having a parent task which declared and IO file which will be used for printed output and by declaring an IO file in subtask which will be given name of output if PDF or be given Parent print file name as IO file to use if it goes to paper. This gives me the benefit of a single directed print file if printed and separate PDF’s if emailed and for weeks this appears to be working. Now when I go to print a single document I get a dialogue box asking for ourput file name. If I cancel it then program proceeds and email is produced with named PDF attachments produced by sub-task.
I have tried taking all the expressions off the various parts of parent IO file so all will be empty but it still is asking for a file name which again I can cancel and get the correct email.
Any ideas why this main IO is behaving like this?
Regards
John |
|
Hello John.
Why use 2 IOs? Just make 1 and put expressions for that one to behave as a printer or as a pdf output. I am doing exactly that. I have a variable "file_name" which tells me what to do: 1. Open printer dialog if ( file_name = '', 'TURE'log, 'FALSE'log) 2. Exp/Var on IO i have an expression IF ( file_name<> '', file_name, '') 3. Last thing is to put an expression for the Pdf option when alt+enter the IO. Just opposite of expression in 1. point. If (file_name='', 'FALSE'log, 'TRUE'log). Preview i have set to "No". That is it ... Hope you got it working. |
|
Aaaarrrrggghhhh
toggle quoted message
Show quoted text
Why not just put: 1) file_name='' 2) file_name 3) file_name<>'', or NOT(ExpCalc('1'EXP)) Same thing! Best regards, Harry Kleinsmit On Mon, Jan 23, 2023 at 10:07 PM, Adrian Wick wrote: Hello John. |
|
John Dowbiggin
Hi Adrian
toggle quoted message
Show quoted text
Thanks for the reply. I’m not sure that works if I have multiple pdfs to create in the one run. That’s why I have a second one that opens at the start of each header task. I’ll check your method out tho Regards John On 24 Jan 2023, at 06:09, Adrian Wick <adrian.wick2015@...> wrote:
|
|