Navision, Emailing report with parameter for request form

dianecandicedianecandice Member Posts: 11
Hi,

I have a report that shows a particular section via a checkbox (l_checkbox) in the report's request form.

I want to convert this report to pdf and email it using this line

runmodal(reportid, FALSE, TRUE, table)

my question is, how do i pass a value to the checkbox in the requestform before runmodal is called, if the requestform should not be opened in the first place?

diane

Comments

  • ara3nara3n Member Posts: 9,255
    You shouldn't use runmodal instead create a global variable for that report.
    In the report create a function to set the value of that bolean.


    Myreport.setvariable(true)
    Myreport.setrequestform(false);
    Myreport.settableview(mytable);
    Myreport.runmodal;
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • dianecandicedianecandice Member Posts: 11
    Hi,

    thanks for the reply, but without using runmodal(,,,)

    how do you sendthe report directly to the system printer (as the third parameter in the runmodal does) instead of the printer selected through the Printer Selection table?

    diane
  • kinekine Member Posts: 12,562
    Because in this example you can set to not use the requestform, the report will be send to the printer directly. Which printer it will be depend on printer selection table or on your default printer selection in Windows...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dianecandicedianecandice Member Posts: 11
    ok, got it! thanks to you both :D
  • Senthil1212Senthil1212 Member Posts: 1
    can you please tell me , how to Pass Report ID to "MyReport" variable. In My case I am using Data item as Integer, so I cant use Report. Run(ReportID,False,true,RecInteger).

    Data item :
    Integer
    Integer

    Calling report :
    MyReport.USEREQUESTFORM(FALSE);
    MyReport.RUN();

    Question : how to Pass Report ID from setup to "MyReport" variable. ](*,)

    Thanks
    Senthil
Sign In or Register to comment.