Printing RequestFilterFields on Report Header

  • Printing RequestFilterFields on Report Header

    Posted by Steve Simon on May 18, 2020 at 8:21 pm
    • Steve Simon

      Member

      May 18, 2020 at 8:21 PM

      #Technical #BC/NAVPlus

      Dear Developers,

      I created a BC report of Items sold for each customer. A Request Page allows the BC user to select a document date range from a filter field. How do I pass that active RequestFilterField to the header of the report, so that the report recipient will know the date range or other filter for this report?
      Copy of report page attached.

      Regards,
      Steve Simon

      ——————————
      Steve Simon
      Pres.
      PDG Consultants, Inc.
      Clearwater
      ——————————

    • Kyle Hardin

      Member

      May 19, 2020 at 7:44 AM

      It depends. If the request page field is a simple variable, you can pass that into the report dataset as it is.

      If you have added RequestFilterFields to the data item Sales Invoice Header (or whatever your main Go Get Me Stats data item is), then you can put that into your dataset with GETFILTER or GETFILTERS. I have attached the BC15 report called Sales History. In the data item Item, look at the field called ItemFilter. That’s how it goes into the RDLC data set. Then look farther down in the code in OnPreReport, and you can see that ItemFilter is getting set to Item.GetFilters, which (after the Request Page has done its part) creates a text string of all of the filters the user set on the Item Record with the request page.

      ——————————
      Kyle Hardin
      NAV Developer
      ArcherPoint Inc.
      Duluth GA
      ——————————
      ——————————————-

    • Steve Simon

      Member

      May 20, 2020 at 4:18 PM

      Kyle,
      Thanks so much for the expert reply.
      I am trying to understand how to use the GetFilter method against the Request Filter fields to capture whatever filters have been set if any for this report. So I’ll review the code attachment and see how to integrate it into my report.
      Thanks again.
      Steve Simon

      ——————————
      Steve Simon
      Pres.
      PDG Consultants, Inc.
      Clearwater
      ——————————
      ——————————————-

    • Steve Simon

      Member

      May 21, 2020 at 12:23 AM

      Kyle,
      I copied the relevant lines of the code snippet you sent – into my existing report. It worked (sending the Request Filter to the Report Header and today’s date to the Report Footer.) Picture attached.It’s so simple when you know.
      Thank you very much..

      Sincerely,
      Steve Simon

      ——————————
      Steve Simon
      Pres.
      PDG Consultants, Inc.
      Clearwater
      ——————————
      ——————————————-

    Steve Simon replied 4 years ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Printing RequestFilterFields on Report Header’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for people  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!