web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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!

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Natalie Karolak - the BC Docs Librarian Profile Picture
    1,955 on at

    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.

  • Community Member Profile Picture
    on at

    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.

  • Natalie Karolak - the BC Docs Librarian Profile Picture
    1,955 on at

    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).

  • Community Member Profile Picture
    on at

    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.

  • Kine_ Profile Picture
    2,053 on at

    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...

  • Suggested answer
    Community Member Profile Picture
    on at

    If you trying to do a function call in page and the function is on the report, you need to set the function as global in the report, hence you will be able to access the function from any object.

    Hope that helps after nearly 5 years :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans