Passing Request Form Parameters to a Report

JohnieGJohnieG Member Posts: 56
Hi to all,
I am new in Navision and I am trying to create a ProcessingOnly Report which I would like to call from a form. I am using the Report.Run function which seems to work pretty well.

The problem is that the report has some parameters in the request form which i want to pass them from the form. The objective is to execute the report without being needed from the user to alter the parameters or to press the OK button. In other words, with a press of a button from the form I want to run the report, pass the request form parameters, submit the request form and execute the report!

My first thought was to create a function in the report that would reset the parameters. I called that function in the form prior the report.run code but that didn't seem to work. Maybe I was doing something wrong or maybe there is a different and easiest way.
Any suggestions are more than welcome!

Thanks in advance...
Always Look On The Bright Side Of Life...

Comments

  • ArhontisArhontis Member Posts: 667
    You could also take a look in the C/SIDE help about REPORT.RUN procedure. A part of it follows:
    Without a Request Window

    This example skips the request window and starts the report immediately and sends the report to the printer selected in the Printer Selection table. The third example does not display a request window and sends the report to the system printer.

    REPORT.RUN(1001, FALSE);

    Welcome to mibuso... :)
    You are the second northern Greece member I have seen the last month here...
  • JohnieGJohnieG Member Posts: 56
    Thank you all for your replies

    I have tried your solution BlackTiger but this didn't seemed to be the problem. No matter how i call the report I am still unable to pass the reports parameters prior to report run. To be more specific: I have a boolean Request Form Variable named ReqVar1. In my report i have a function named ResetParameters which has a parameter(InputPar1)that defines the value of ReqVar1(ReqVar1:=InputPar1).

    From another form i am trying to achieve two things: 1)set the ReqVar1 parameter to TRUE by executing SomeReprt.ResetParameters(TRUE) and 2) Running the report (while ReqVar1 has been set to TRUE) with SomeReport.RUN.

    Finally, i have added a message in the PreReport trigger which confirms that the ReqVar1 variable has NOT been set to TRUE (Even though i have the impression that i did all the steps correctly it doesn't seems to work!) :(

    As for the C/SIDE help, Arxontis, I took a look on it prior to posting here but it didn't helped me a lot but thanks anyway. I was meaning to ask you if you know any Navision forum in Greece. As for mibuso, as far as i know I am the fourth northern Greece member! Its spreading all over the world... :D
    Always Look On The Bright Side Of Life...
  • SavatageSavatage Member Posts: 7,142
    in the How To's section there are two posts on passing parameters - perhaps they can help you.

    http://www.mibuso.com/howto.asp
  • JohnieGJohnieG Member Posts: 56
    Very helpful. =D> Thanks a lot. I am looking forward on trying it...
    Always Look On The Bright Side Of Life...
Sign In or Register to comment.