How to Display a Report on a Form from the Same Table

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have a time entries form and would like to display a table report showing the employee's other time entries from that day at the bottom of the form. I don't want people to have to fill out a timesheet, per se.

I tried a record link field but couldn't figure out how to get it to display anything when adding a record.

I tried the API GenResultsTable, but even when I append the qdbWrite() to a <div> tag at the bottom of the form, it overwrites the whole page with the results.

I'd be happy for any help that can be provided.

Photo of Phillip

Phillip

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,664 Points 50k badge 2x thumb
Is your real issue that you have the Report Link working in View mode but not Add mode?
Photo of QB_Support_Brian

QB_Support_Brian

  • 20 Points
Hi Phillip,



Unfortunately it would not be possible to show a report from the same table on an add form. The reason for this, is that report link fields require a matching pair of values to determine which records to show in the embedded report. However, no data is saved in a record until you hit Save. So, if you were to display that report link on the add version of the form, it would not be able to find any matches. I'm sorry for the inconvenience.

However, it might be possible to use some custom code to simply display the report, outside of a report link field, which some of the developers here on the forum may be able to speak to.



Thanks,

Brian
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Navigate to Add a New Timesheet and select a Stooge. Screenshot attached.

Stooges' Timesheets
https://haversineconsulting.quickbase.com/db/bj339nb32

Add New Timesheet
https://haversineconsulting.quickbase.com/db/bj3394kgw?a=nwr

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=412

Notes

(1) I just listed all Timesheets for the selected Stooge. I can't crate a demo that relies on data created the day the demo is used.