Pass value to report from codeunit

Is it possible to pass multiple values from codeunit to reports?

yes, it’s quite easy. create a function that has some parameters. the only thing that this functions does is to assign the parameter values to global variables.

Just to elaborate a little on this: To be able to access a report’s functions, you need to call the report as a separate report type variable in your codeunit. So, instead of using the REPORT.RUN(No) command, you declare a report type variable. Before running the report (i.e. using the RUN command), you call the report’s new custom function to set the variables inside the report, like this: MyReport.SetParameters(FirstParameter,SecondParameter); MyReport.RUN; There are some other methods/parameters/options for the RUN command that you will need to take care of, like whether or not you want the user to see the request form, or whether or not you want to run the report modally. Read the help file for these options.

Thanks…[:)]