Discussions

Expand all | Collapse all

Table Report in HTML

  • 1.  Table Report in HTML

    Posted 6 days ago
    Looking to add a table report to an HTML page. I cannot seem to find any examples and have played with the options that are available with no success. If anyone is willing, looking to add a table report to an HTML page.

    ------------------------------
    Chad
    ------------------------------


  • 2.  RE: Table Report in HTML

    Posted 6 days ago
    Check out the Quick Base University and API guide.

    https://help.quickbase.com/api-guide/gen_results_table.html

    ------------------------------
    Everett Patterson
    ------------------------------



  • 3.  RE: Table Report in HTML

    Posted 6 days ago
    Hi Chad,

    Have you tried making use of the API for API_GenResultsTable that would be the call that is used to embed a table into an HTML page. The documentation I linked would go over what other parts are needed to make the call. I hope that suggestions is helpful.

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------



  • 4.  RE: Table Report in HTML

    Posted 6 days ago
    Evan, Thanks for your help sir! I have, I just cannot seem to get it to actually generate and display the report. I think I am missing a step, and since I have not actually seen a working example, trying to trouble shoot to find the issue.

    ------------------------------
    ProjectsForce
    ------------------------------



  • 5.  RE: Table Report in HTML

    Posted 6 days ago
    Hi Chad,

    Do you have an example of the API set up you are using right now? You would just want to replace any UserIDs, Auth Tickets or App IDs with XXXX and same for something like your app URL. Then we can see if something might be missing from the syntax of the URL. Should be something like the below example. 

    <html>
    <head>
    <script lang="javascript" src="https://quickbase.com/db/5rh82jcq?a=API_GenResultsTable
          &ticket=auth_ticket&apptoken=app_token
          &qid=5&jht=1">
    </script>
    <style>
       td.m { font-family:verdana; font-size:70%; }
       td.hd { font-family:verdana; font-size:70%; font-weight:bold;
        color:white;}
    </style>
    </head>
    <body>
    <h1>Example</h1>
       <table cellpadding=5 bgcolor=lightgreen>
          <tr>
             <td valign=top nowrap><b>A Quick Base table<br>embedded in
                a<br>page of HTML
             </td>
             <td>
                <script lang="javascript">
                   qdbWrite();
                </script>
             </td>
          </tr>
       </table>
    </body>
    </head>
    </html>


    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------



  • 6.  RE: Table Report in HTML

    Posted 6 days ago
    Evan, this is exactly what I was trying to use, but it just returns a green box with the text in it stating a Quickbase table in a page. I do not know how to add the Clist to it or to identify the fields I want to make up the report.

    ------------------------------
    ProjectsForce
    ------------------------------



  • 7.  RE: Table Report in HTML

    Posted 6 days ago
    Hi Chad,

    What could help is to actually build a report that is set up the way you want it to display on your HTML in the table in Quick Base, then you would make sure specifically this part:

    &qid=5


    is set to the correct report qid. You can see the QID of a report when you look at the URL in Quick Base when you have the Report open. So seeing a report URL it would look like https://myaccount.quickbase.com/db/XXXXXXXX?a=q&qid=1. Do you have your qid set to an existing report that has the data you want to pull?



    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------



  • 8.  RE: Table Report in HTML

    Posted 6 days ago
    This is how I have it right now.

    <html>
    <head>
    <script lang="javascript" src="https://xxxxx.quickbase.com/db/xxxxx?a=API_GenResultsTable
    &apptoken= xxxxx
    &qid=5&jht=1">
    </script>

    ------------------------------
    ProjectsForce
    ------------------------------



  • 9.  RE: Table Report in HTML

    Posted 6 days ago
    Hi Chad,

    yeah the QID=5 is where you are dictating what report in Quick Base you want to use. In my example I would change the 5 to a 1 to use the report that URL goes to. So you would want to build the report in Quick Base that you like, then you would look at the URL of that report when viewing it and find the QID, then once you have that reports specific QID you plug it into the API call instead of the 5, so if it was report 23 you would be 23 in instead of 5.

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------



  • 10.  RE: Table Report in HTML

    Posted 6 days ago
    I really appreciate your help. This is what I have and what I get. 

    <html>
    <head>
    <script lang="javascript" src="https://xxxxx.quickbase.com/db/xxxxx?a=API_GenResultsTable
    &apptoken= xxxxx
    &qid=41&jht=1">
    </script>
    <style>
    td.m { font-family:verdana; font-size:70%; }
    td.hd { font-family:verdana; font-size:70%; font-weight:bold;
    color:white;}
    </style>
    </head>
    <body>
    <h1>Example</h1>
    <table cellpadding=5 bgcolor=lightgreen>
    <tr>
    <td valign=top nowrap><b>A Quick Base table<br>embedded in
    a<br>page of HTML
    </td>
    <td>
    <script lang="javascript">
    qdbWrite();
    </script>
    </td>
    </tr>
    </table>
    </body>
    </head>
    </html>

    When I add this, this is what I get:


    ------------------------------
    ProjectsForce
    ------------------------------



  • 11.  RE: Table Report in HTML

    Posted 5 days ago
    Hi Chad,

    So the other part is styling for that example table, I realize I should have taken that out of my example since I was more focused on the formatting for the request. You can instead format your request like this:

    <script src="https://xxxxx.quickbase.com/db/xxxxx?act=API_GenResultsTable&apptoken=dr96jzmbvukuwsckbtrzxc9uqt2x&qid=52&jht=1" lang="text/javascript">
    </script>
    <script lang="text/javascript">qdbWrite();</script>

    so you would just need to make sure your app token, etc was all set with your URL and instead of building that table below with html use the script snippet at the end there. You would also want to make sure in this instance that you have an everyone on the internet role that is set to view the data you are pulling out to that table since it looks like your request isn't using an Auth ticket. The steps would be:

    1. Add the Everyone on the Internet to your target application. Make sure it has "view" role permissions to the data you need to display elsewhere. Alternatively, if you don't want to open your application to everyone in the world you would have to utilize the API_Authenticate command whenever you query your database.
    2. Create a token in your target application
    3. Create a report in your target application and select the appropriate filter, sorting & grouping, and columns to display section you would like to appear in your report. Save this report and mentally or physically note the qid generated.
    4. Paste that code into the site you need your embedded report to appear
    5. Replace the DBID (currently xxxxxx) with your table ID, the report ID (currently 52) with your report ID, and your application token with the token you just created.
      Important: If your code is in a website other than on quickbase.com, make sure to include  before your table ID.


    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------