Running classic report from RTC and passing parameters

TronholmTronholm Member Posts: 22
edited 2009-03-08 in NAV Three Tier
You can run a classic report from RTC. No problem with that.
But what if you want to run the classic report from a page, with some filtering. For instance, printing a partiular invoice from a page, without requeiring the user to enter the filtering manually in the request form?
In other words, how to pass parameters to the classic report from RTC?

Comments

  • ara3nara3n Member Posts: 9,255
    I haven't be able to launch the classic reports from RTC.
    Main reason is that I get an error.

    Cannot find Server COMPUTERNAME.DOMAINNAME.NET



    I can ping COMPUTERNAME.DOMAINNAME.NET


    Starting the classic client and entering the COMPUTERNAME.DOMAINNAME.NET gives me the same error.

    Entering the COMPUTERNAME works fine in classic.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • TronholmTronholm Member Posts: 22
    I haven't had any problemas running Classic Reports from RTC, besides the question in my previous post.
  • ara3nara3n Member Posts: 9,255
    It's very simple to test.

    Run a codeunit to run the report with filters. If they are passed, which I'm sure it will.


    So please test it and let us know.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • TronholmTronholm Member Posts: 22
    ara3n wrote:
    It's very simple to test.

    Run a codeunit to run the report with filters. If they are passed, which I'm sure it will.


    So please test it and let us know.
    Have your tried that? I think you are making assumptions without knowing :oops:
    This is what you get when you try that:
  • ara3nara3n Member Posts: 9,255
    I can't test as I mentioned, because it doesn't work on my pc.


    You mentioned passing filters. In your case you are calling a function? Can I see your code?


    Here is the I was running. It was starting the classic client and filters were passing without error. So classic client is starting without any error.
    Item.SETFILTER(Description,'B*');
    REPORT.RUNMODAL(10143,TRUE,FALSE,Item);
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • TronholmTronholm Member Posts: 22
    ara3n: you are 100% right. Filtering as is your example works fine.
    what you cannot do is to invoke a funcion defined in the classic report from RTC: then you get the error. The case is that in some cases I do some parameter passing thru a function in the report.
  • ara3nara3n Member Posts: 9,255
    you can a dummy dataitem in your report and pass the parameters as filters?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • gerdhuebnergerdhuebner Member Posts: 155
    Tronholm wrote:
    ara3n: you are 100% right. Filtering as is your example works fine.
    what you cannot do is to invoke a funcion defined in the classic report from RTC: then you get the error. The case is that in some cases I do some parameter passing thru a function in the report.

    It seems that you even cannot pass parameters to the report via a SingleInstance codeunit (may be the codeunit is not quite SingleInstance, when the classic report viewer is started... - seems to become DoubleInstance...)
  • gerdhuebnergerdhuebner Member Posts: 155
    ara3n wrote:
    you can a dummy dataitem in your report and pass the parameters as filters?
    But isn't that awesome because the user gets displayed the filters of the dummy dataitem, doesn't he?
Sign In or Register to comment.