How do I send parameters to a function in a report from the RTC?

How do I send parameters to a function in a report from the RTC?

This question has suggested answer(s)

Hi all

 

How do I send parameters to a function in a report from the RTC? It gives me an error telling me I can no longer do that.

 

Any suggestions?

 The code looks like this from the Page button:

Please note:

-Rconfir its the report variable and Pedcompra its sales header variable. "Pasarcabecera" its the function i´d like to call and seems like its no longer supported.


 CLEAR(RConfir);
 PedCompra.RESET;
 PedCompra.SETRANGE("Document Type","Document Type");
 PedCompra.SETRANGE("No.","No.");
 RConfir.PasarCabecera(4);
 RConfir.SETTABLEVIEW(PedCompra);
 RConfir.RUN;

thanks!

 

All Replies
  • What does the error message say?

    I'd suppose you are working in the RTC, but your report does not have a Visual Studio layout. Is that right?

    If so: There is no workaround; if you want to call customized report functions, you have to create a Visual Studio layout.

  • Hi,

    yep, its not the new "layout". I tried it to create a new one but if I do I dont see anything on the report.

    I have another report very similar, I would say its a copy, we also call a function and it works properly with the old layout.

  • Creating a new layout is not an easy thing to do, that's right. There are many ways to provoke an empty report, see e.g. here.

    This similar report, is it also called directly from the RTC? Then, the difference could be between RUN and RUNMODAL (I cannot quite recall the circumstances, but I had encountered them on my own once).

  • Hi,

    Thanks again Natalie for your support.

    Nope, they are called exactly the same way. I checked it.... no cue...

    I will check the manual you linked me.

    It seems not an easy report to build from scratch on the new layout, so i´d like to continue with the old one.

  • You cannot pass parameters when the report has no layout for RTC. It is by design and it is the limitation. You need to understand that the C/AL under RTC is running as C# code,but the report without Layout is using classic client to render the report and it is no C# and there is no way how to "inter-connect" those two world by calling functions of one from other...