Forum Discussion

HeidiBeach's avatar
HeidiBeach
Qrew Member
5 years ago

Exact Forms - Include a report ONLY IF there is related data?

I have an exact form that has an embedded report. Right now, my form needs are pretty simple, so I just use the ~ThisIsMyReport~ syntax.

There will be times when the related report does not contain any data though and I would like for the table to be completely excluded in that case. As of right now, it prints the table headings and says "no data found."

Is there a way to conditionally omit the entire table?

------------------------------
Heidi Beach
------------------------------

5 Replies

  • DonLarson's avatar
    DonLarson
    Qrew Commander
    Heidi,

    I recommend Exact Forms Plus from Juiced

    https://www.juicedtech.com/exact-forms-plus

    It is very flexible and lets you customize the messaging when the subtable in your document has no data.

    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------
  • KirkTrachy1's avatar
    KirkTrachy1
    Qrew Assistant Captain
    Hi Heidi:

    You can do this by copying your exact form so you have one with the embedded report and one without the embedded report.  You then create a summary field that counts the number of child records you have for the embedded report.  You then edit your "Print Exact Form" button so it has a formula something like the following:

    If([# of Orders]=0,
    
    URLRoot() & "db/" & Dbid() & "?a=dbpage&sfid=23&pagename=" & URLEncode("IntroLetter2.html") & "&clist=a&rid=" & [Record ID#],
    
    URLRoot() & "db/" & Dbid() & "?a=dbpage&sfid=23&pagename=" & URLEncode("IntroLetter.html") & "&clist=a&rid=" & [Record ID#])​

    Here is a video that goes over the whole process.


    We cover things like this in our daily "Office Hours" webinars held M-F at 1pm Eastern time.  Register



    ------------------------------
    Kirk Trachy
    ------------------------------
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      What is sfid? In the ABC app the formula uses sfid=23 and I do not know what this is doing.

      ------------------------------
      Adam Keever
      ------------------------------
      • AustinK's avatar
        AustinK
        Qrew Commander
        I know sfid must be a numeric value and it is used when you want to save the output of the exact form in a file attachment field. The number you use would be the field id of the file attachment field. Not sure if it has other uses but that is one I have seen. Hopefully someone else can chime in here.