Forum Discussion

FrancescoGallar's avatar
FrancescoGallar
Qrew Member
3 months ago
Solved

Button to print embedded report without showing the report on the form

I have a Projects table and a Tasks table.  We would like to have a button inside the Projects record to be able to print a report from the Tasks table without actually showing the report itself on ...
  • MarkShnier__You's avatar
    3 months ago

    Yes you can do with in one Formula URL button, but it's a two step process to make the button.

    You can make a URL formula button to run any report.
    A report link field is just a built in feature to run a report with one extra filter - that being how the Report Link field is configured, typically but not necessarily where the Record ID# field on the parent matches the field [Related Parent] on the child record.

    So, first step is to make your perfect report with an <ask the user>  for [Related Parent]
    Run the report, answer the question and observe the URL.

    Now make a formula URL to mimic that URL

    URLRoot() & "db/" & [_DBID_of the child table found in advanced properties] & "?a=q&qid=99&nv=1&v0=" & [Record ID#]

    So translated that says:
    Go to my Realm and then to the child table and run report #99 which has 1 question and the answer to the zeroth question (don't ask me why but computers sometimes like to start to count from zero) is [Record ID#] of the parent record.

    OK so first get that button working to run a report of the child records.

    Then once that is working add this to the end of the code

    &dlta=pr

    That will cause the report to print.