Print Runtimefilters Values in Report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arrestthepresident
    Member
    • Jun 2021
    • 44

    Print Runtimefilters Values in Report

    Hey, how can i output not only the runtimefilters as attributes but also the values when running a report and printing it to pdf?

    nothing i try works :-(

    HTML Code:
    {{#each runtimeFilters}}
    {{this}}
    {{this_RAW}}
    {{/each}}
    also RAW does not output anything and i cant seem to get any contents from the attributes...
  • victor
    Active Community Member
    • Aug 2022
    • 796

    #2
    Runtime Filters attribute is quite non-standard; this field has the Json Array type. At the same time, the situation with it is not as simple as, for example, with the Item List field, which is available in Quote, Sales Order, Invoices entity types. We cannot get the value in the PDF document that we selected for this or that Runtime Filter because this value does not include in the JSON file, which we can view in the browser console when sending a request, but this value is included in the request itself, for example:
    HTML Code:
    GET http://localhost/espocrm/api/v1/Report/action/run?id=003&where%5B0%5D%5Btype%5D=lastSevenDays&wh ere%5B0%5D%5Battribute%5D=dateStart&where%5B0%5D%5 Bvalue%5D=&where%5B0%5D%5BdateTime%5D=true
    This request starts filtering records by Date Start in the last seven days when we click on the Run button on the report detail view. Here we can see the selected Runtime Filter value, but we cannot use it in placeholders in any way because it is not present when sending a
    HTML Code:
    GET http://localhost/espocrm/api/v1/Report/003 request
    (this request is triggered when we open the report). In the browser console we can see that the response contains the following attribute:
    HTML Code:
    "runtimeFilters": [
    "dateStart"
    ]
    Exclusively this attribute: and no information about what exact Date Start we chose.

    Such a functionality is available at the moment, and we cannot offer you any workaround yet. As we advised earlier, for now, for reports in PDF, it is best to use the instructions from the following article: https://docs.espocrm.com/user-guide/...rinting-to-pdf.

    Comment

    Working...