Forum Discussion

JakeRattner1's avatar
JakeRattner1
Qrew Cadet
5 years ago

Creating reports that show only the columns where values are present

Hi Everyone,

We get bids from vendor on projects (RFPs). For each project we end up having different information submitted. As a result we often end up with an embedded table on the project record where only 10/40 fields have any information

Users are annoyed that they have to look at so many empty fields. Is there a way to display only the columns in a report if values are present?

For example, if the project has no value for "Rent" in any of the projects related "Bid" records, don't show the "Rent" Field in the project's embedded report. 

I realize that we could achieve this by having multiple reports, however, we've come to the conclusion this would require maintaining over 200 reports, so we're looking for another solution. 

Thanks!



------------------------------
Jake R
------------------------------
  • BradLemke's avatar
    BradLemke
    Qrew Assistant Captain
    How well-versed are you with API manipulation?  Have you done an Iframe Embed into a form before?

    I could see there being a way to create an Iframe embedded 'Api_Genresultstable' where the clist (column list) is dynamically generated via formula.    

    Here is the code I would start with in a Rich Text Formula Field in the Parent Record: 

    Customize and manipulate to your needs, of course.  Then create a Report Link field that matches this rich text field exactly to this rich text field:

    Lastly, add that field to your form and see if you like how it works.  


    ------------------------------
    Brad Lemke
    ------------------------------
    • ShaneMiller1's avatar
      ShaneMiller1
      Qrew Cadet

      Hey! A few years late, but is this still possible? I tried it and when I went to save it said "

      There are one or more problems with your entry

      Only text, Quickbase-accepted functions, fields, variables, and certain HTML tags are allowed in this field. JavaScript is not supported.

      Is there a workaround to get a report that only shows columns which have data points on child records?



      ------------------------------
      Shane Miller
      ------------------------------

      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        I skimmed the above - if you're trying the exact same technique as what's referenced you will get blocked - as Quickbase disabled any injection of javascript or iFrame type techniques in 2021 for security reasons. You can try a couple things though perhaps: 

        1. Try and generate the same 'API_GenResultsTable' similar to the above - and put that url into a Formula-URL field and enable it to show as an iframe. That is the only method that would allow you to use the iFrame technique. Essentially it's the same as the rich-text technique, you're just not actually putting the <iframe> tag in, just the URL string.

             2. The other option which might get hairy and very taxing on QB - if you're really just trying to control the columns, you could use 'formula-queries to actually check the fields that you want to show/hide. So you can check for example if fid 7 has values in it, and if it does, include it in your clist, if it doesn't leave it out. If you have 40 fields that will be very taxing on QB though so use with caution. 



        ------------------------------
        Chayce Duncan
        ------------------------------
    • JakeRattner1's avatar
      JakeRattner1
      Qrew Cadet
      Hey Brad, 

      Thanks again for your help.  I've recreated the Rich text field you showed in your screenshot.  Now I'm going to create the Report Link.  I'm a little confused about this part.  I think I need to create another rich text field in my Parent table.  Do I copy paste the same code into that field as well?  If yes, how would I get around the errors (the fields references will not work on the parent record)

      Thanks,
      Jake

      ------------------------------
      Jake R
      ------------------------------
      • BradLemke's avatar
        BradLemke
        Qrew Assistant Captain
        Both the rich text and the report link fields are parent-table only.  When setting up the report link field, you're not pointing it at any other table, you're not telling it to go from 'point-a' to 'point-b' like usual - you're telling it to go from 'point-a' to 'point-a', the same field in the same table.

        ------------------------------
        Brad Lemke
        ------------------------------
    • JakeRattner1's avatar
      JakeRattner1
      Qrew Cadet
      Thanks Brad!  This is exactly what I'm looking for.  I'm not familiar with this technique, but I'll give it a go and let you know how it works out.

      ------------------------------
      Jake R
      ------------------------------
  • Well I have a suggestion and you will be have to be the judge of whether your users find you or this suggestion more annoying than the current report.

    I won't go into the exact formula now but there's an easy formula that would list each field vertically and only the fields which had data in them so for example you would have a column like this

    Job#: 1234
    Vendor Type: Premier
    Rent $1,500

    and if there were 37 other blank columns then that's all you would see. 

    Now I am only half joking to say that they will still dislike you but now they will dislike you for giving them a very vertical report instead of a very wide report.

    So maybe another suggestion to make use of more of the width of the report is to look at your 40 fields and maybe group them into about five or six different categories and then use my technique to make those vertical. That way the width will be used up and the data will be meaningful and the report won't get needlessly vertical or too wide. Goldilocks. 




    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JakeRattner1's avatar
      JakeRattner1
      Qrew Cadet
      Hi Mark,

      Thanks for the feedback!  While I don't think this method will work for my situation, its a pretty cool way to solve it.  I may be using this technique elsewhere.  Much appreciated.  

      Jake

      ------------------------------
      Jake R
      ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      But to answer your question directly no there's not a way to automatically suppress columns without data.

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------