Knowledge Base

Our Knowledge Base covers a wide variety of technical topics, from the basic to the complex.

How can I embed a QuickBase report into a Web page on my own site?

1. Create the report that you want to embed (To learn more, please see our Create a Table Report help topic.)

2. In the HEAD section of your Web page, add the following <script> block:

<script lang="javascript" src="https://mycompany.quickbase.com/db/dddddddd?a=API_GenResultsTable&qid=n&jht=1">
</script>

where mycompany is your account URL, dddddddd is the database ID (dbid) and n is the ID for the report (qid) that you want to embed (To learn more, please see our How do I find the database ID (dbid) of a QuickBase table? and How do I find the query identifier (qid) of a particular report? Knowledgebase articles).

Next you'll need to open your application up to the group "Everyone on the Internet". If you're not familiar with this group, our Share an Application with Everyone on the Internet help topic explains how to open an application up to the public. Be aware that you do not have to open the entire application up to the group "Everyone on the Internet", only those tables whose data you are trying to display.

3. In the HEAD section of your Web page, add the following style information:

<style>
td.m { font-family:verdana; font-size:70%; }
td.hd { font-family:verdana; font-size:70%; font-weight:bold; color:white; }
</style>

By changing the attributes of these CSS tags, you can modify the format of the resulting table.

4. In the BODY section of your Web page where you want the HTML table to display, add the following JavaScript code:

<script lang="javascript">
qdbWrite();
</script>

--------------------------------------
Here's a more complete example:

<html>
<head>
 
<script lang="javascript" src="https://mycompany.quickbase.com/db/5rh82jcq?a=API_GenResultsTable&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 QuickBase table<br>embedded in a<br>page of HTML</td>
<td>
<script lang="javascript">
qdbWrite();
</script>
</td>
</tr>
</table>
 
</body>
</html>

To learn more, please see our GenResultsTable API Guide page.

NOTE: QuickBase recommends that you use application tokens when working with API calls (To learn more, please see our Application Tokens help topic.

Comments

Doesn't pull the total/average

This report doesn't pull the average/total for the columns. Is there a way to add this in?

Hi Chrissy, In order to

Hi Chrissy,

 

In order to display the totals and averages, you would need to first build the report within QB to show the totals and averages, and then call GenResultsTable with the QID for your report.

 

Thanks,

Brian

It won't display

So I followed all the instructions, but unless I am logged in on that browser it will not display the report.  When I went to my web page I embeded the report on a different browser that I had not logged into quickbase, the report would not display.  It gave me an error saying "error creating report"

Hello,Yes, for security

Hello,

Yes, for security purposes you would need to authenticate to the QuickBase app in order to display the information. Most developers do this by creating a separate user only used for the api call, and use that email/password combo in an API_Authenticate call. If you make that call earlier in your code than GenResultsTable, the report will display.

You can read more about API_Authenticate in our API Guide.

 

Thanks,

Brian

Database hosting by quickbase

How can I remove the "database hosting by quickbase" statement that is shown after the table?

Hi Andrew, The 'Database

Hi Andrew,

 

The 'Database hosting by quickbase' is a standard part of the report display, so unfortunately it can't be removed. I'm sorry for the inconvenience.

 

Thanks,

Brian

Didn't work for me

I followed the directions using the second user method. I am getting:

Error in call to API

Invalid Application TOden (API Error)

Any ideas how to fix this? Also, is there not a contact number to call someone for help? I tried to reach my "coach" but have as of yet to hear back from him regarding some quickbase questions.

Thanks.

some debugging ideas to try

Hi Wendy --

Sometimes API calls take a couple of tries to get all the details right. Here are some things to check:

The "src" attribute of the first <script> tag is very important. It should contain:

  • the name of the database you want to get the data from (5rh82jcq in the example; you will need to fill in a value from a QuickBase you have access to)
  • the name of the API call you're making (should be correct in the sample, no need to change)
  • a valid authentication ticket returned by API_Authenticate
  • a valid application token (if your application requires them)
  • the identifier for the query (report) you're running (5 in the example)
  • jht=1 (this makes the call return the HTML needed to make the qdbWrite() call work)

Also, it's important to give the user that you use in API_Authenticate access to the table and report that you're embedding. If possible, log in as the user and run the report manually to make sure that all the permissions are correct and the report contains the data you think it will.

If none of these things work and you're still having issues with getting the report to run, please contact QuickBase Support directly to work through this issue: http://quickbase.intuit.com/support.

Regards,

--Sybil

Question: View/Edit Buttons

I noticed that this does not add the "edit" or "view" buttons.  Does anybody know of a way to do that?

 

View/Edit Buttons

Hi Vanessa,

 

Unfortunately, the View/Edit did'nt really show on the report but you can do a work around by creating a new field with a field type Formula -URL and put the right formula on it. After that you may add those field to your report.

 

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.

© 1997-2014 Intuit Inc. All Rights Reserved.

Online Database VeriSign Secured Web Based Software TRUSTe Certification Online Database SSAE Audit