Control print setting

Hi Guys,

 

this Question is continuation of this thread How to disable print button when report already printed.

 

      

 

 

As image shows above.

 

What i want to happen is  upon clicking the "OK" button in the 3rd image to print the reports, then it will tells report is printed and automatic close the 1st and 2nd image/window. Please view the link above to understand.

 

hoping your quick response..

 

Thank you.

  • What's the point of printing something to screen and immediately closing the window? And if you print it to e-mail, as your configuration shows, there shouldn't be the window shown in your second image, should it?
    Also, closing the journal form looks like a really strange experience. How do you know that users doesn't want to continue working there? But if you insist, calling close() method of the form should be easy.
  • In reply to Martin Dráb:

    Ok martin i get your point.

    • But i want to close the Image 2 after i click the ok button in the 3rd image, then
    • instead of closing journal form, i want to refresh it. How to do that?

     

    this thread is the continuation of my concern in the link above.

    My main concern is how to put my code in OK Button image 3 above..

    see below image.

     

     

       

  • In reply to JEMT:

    Unfortunately you didn't answer my question. Why would you print something to screen and then immediately closing it? Isn't it completely useless? If you don't want to show it, don't print it to screen.

    To learn how to refresh forms, I recommend this tutorial.

    It's not clear to me how the code above is related to your questions.

  • In reply to Martin Dráb:

    you didn't get me either.. I'am not telling you that i want to close right print screen, no is not. what i want is after they print, the reason is restrict reprint process ..

     

       

     

     

    About my code, there is code that tells that is print already. this happen when i print something on the screen. -existing.

     

    what i want to happen right after they print the print on screen if will update the field is_print to 1 that tells print already.

     

    then close the print on screen window and refresh the journal form to disable the button DR Print

  • In reply to JEMT:

    You're saying the "I'am not telling you that i want to close right print screen" and "then close the print on screen window" and "i want to close the Image 2 after i click the ok button in the 3rd image", which either is a contradiction, or you're talking about different things there. Please clarify it.
    Preventing repeated prints has nothing to do with closing the report, in my opinion.
  • In reply to Martin Dráb:

    haays..

    • Problem statement:

    -Double Printing of Delivery Receipt.

    • Solution:

    -To disable the Button DR Print in Journal Form.

    • Instruction:

    -After Print Disable Button DR Print in Journal Form.

    ------------------------------------------------------------------------------------------

    in developer side.

    I already done this, please see this Thread to understand.

     

    But after taking several test, i saw a logical problem.

     

    • Upon Initialize of the Report the field is_print is update to YES, which is not yet printed. What i want to happen is after the user print to paper the report, then it will update the field is_print to YES.
    • the 2nd problem is to close the Print On screen window after the user print to paper, the reason is they can print again.
    • last one, i need to refresh the Journal form so that the user will see that the button DR Print is disable .

     

    you get it?

     

     

  • In reply to JEMT:

    The middle point is still unclear to me, but I think I'm starting to decrypt the use case you mean.

    Normally reports are printed by choosing printer as the print destination, while it seems that you're talking about printing the report to screen and *then* sending it to a printer from there. And you believe that you prevent users to print the report multiple times if you close the report viewer window after the first print to a printer and you won't allow users to see the report again. Did I explain your thinking correctly?
  • In reply to Martin Dráb:

    yes .
  • In reply to JEMT:

    I already told you how to close a form - by calling its close() method. A trickier part may be getting a reference to the form. I wonder if you have already tried it and got into a problem, or you don't even know how to get a caller form in general.
    Nevertheless I would look again at the business requirement and dispute this suggested solution. You're spending time (= money) to make the system less useful (e.g. trying to prevent people from reprinting the report if sent to a wrong printer, printed incorrectly because of running out ink etc.) while not achieving your goal. For instance, anybody can print the report to PDF and then print it as many times he wants.
  • In reply to Martin Dráb:

    (e.g. trying to prevent people from reprinting the report if sent to a wrong printer, printed incorrectly because of running out ink etc.) - it's not your problem now. 

     

    For the mean time, our work around is they send email request reprint and we update through backend, until iam not done making the module to Uncheck the printed status..

     

     

    honestly, i don't know how to use the close() method..

  • In reply to Martin Dráb:

     A trickier part may be getting a reference to the form. I wonder if you have already tried it and got into a problem, or you don't even know how to get a caller form in general. - can you please help me on this?

     

    i need to learn a lot things in ax..

    please understand..

  • In reply to JEMT:

    There is not much to say about it; simply call the method. Like this: formRun.close();

  • In reply to Martin Dráb:

    where do i put that? in my report?
  • In reply to JEMT:

    No, putting such logic to a report makes no sense. Reports are for printing, not for manipulating UI. I think you want to do it after printing.
    I'm sorry, I have to go now. Will be here again on Monday.
  • In reply to Martin Dráb:

    yes after printing.
Related
Recommended