# Reports and recordset

**URL:** <https://forum.xojo.com/t/reports-and-recordset/13633>\
**Category:** General\
**Created:** [January 15, 2014, 1:16pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633 "2014-01-15T13:16:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_van\_der\_Linden](https://forum.xojo.com/user_avatar/forum.xojo.com/alexander_van_der_linden/32/323_2.png) [@Alexander\_van\_der\_Linden](https://forum.xojo.com/u/Alexander_van_der_Linden)\
**Post date:** [January 15, 2014, 1:16pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633/1 "2014-01-15T13:16:02Z")

</div>

I want to print a report with some values but the values are not stored in a recordset, but in a class.  
I tried to construct a recordset and bind the values from the class to fields in the recordset but I got an NilObjectException, because obviously the recordset does not exist. How can I bind the class values to report fields?

Thanks

---

<div class="post-metadata">

**Author:** ![Dirk\_Cleenwerck](https://forum.xojo.com/user_avatar/forum.xojo.com/dirk_cleenwerck/32/533_2.png) [@Dirk\_Cleenwerck](https://forum.xojo.com/u/Dirk_Cleenwerck)\
**Post date:** [January 15, 2014, 1:27pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633/2 "2014-01-15T13:27:44Z")

</div>

I guess you could try an in memory database. Look in the language reference for SQLiteDatabase and scroll down to find an example that shows you how to use an in memory database.

---

<div class="post-metadata">

**Author:** ![Alexander\_van\_der\_Linden](https://forum.xojo.com/user_avatar/forum.xojo.com/alexander_van_der_linden/32/323_2.png) [@Alexander\_van\_der\_Linden](https://forum.xojo.com/u/Alexander_van_der_Linden)\
**Post date:** [January 15, 2014, 1:38pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633/3 "2014-01-15T13:38:46Z")

</div>

Looks like a complicated solution. It must be possible to manually construct a recordset though?

---

<div class="post-metadata">

**Author:** ![Paul\_Lefebvre](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_lefebvre/32/3152_2.png) [@Paul\_Lefebvre](https://forum.xojo.com/u/Paul_Lefebvre)\
**Post date:** [January 15, 2014, 2:02pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633/4 "2014-01-15T14:02:29Z")

</div>

> [@59152:@Alexander van der Linden](#):
>
> It must be possible to manually construct a recordset though?

No, it is not.

However if you want to populate a report with values from a class, you don’t need a RecordSet. Just have your class implement the [Reports.DataSet](http://documentation.xojo.com/index.php/DataSet) interface. This is covered in User Guide Book 3: Framework, Chapter 5: Printing and Reports, Section 3: Displaying Data and Printing Reports.

Also see:

- Examples/Printing and Reports/Reports/GasReport shows how to use a class that gets its data from a CSV file.
- Examples/Printing and Reports/Reports/ReportDataListBox for an example of how to use the Interface so that a ListBox can be the source of data for a report.

---

<div class="post-metadata">

**Author:** ![Alexander\_van\_der\_Linden](https://forum.xojo.com/user_avatar/forum.xojo.com/alexander_van_der_linden/32/323_2.png) [@Alexander\_van\_der\_Linden](https://forum.xojo.com/u/Alexander_van_der_Linden)\
**Post date:** [January 15, 2014, 2:15pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633/5 "2014-01-15T14:15:34Z")

</div>

Hi Paul,

found them already. Thanks. I first try an in-memory database/table.

---

<div class="post-metadata">

**Author:** ![Harrie\_Westphal](https://forum.xojo.com/letter_avatar_proxy/v4/letter/h/7feea3/32.png) [@Harrie\_Westphal](https://forum.xojo.com/u/Harrie_Westphal)\
**Post date:** [January 15, 2014, 6:23pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633/7 "2014-01-15T18:23:43Z")

</div>

Alexander, I have a demo of reporting from the contents of a Listbox that I have sent to a number of RS/Xojo folks. It includes a text document that thoroughly explains how it was done. Seeing how it was done using a Listbox it is a simple matter to report from arrays, data classes or any other non-database entity. Just e-mail me at harriew at frontiernet dot net and I will fire it off to you if you would like to see it.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:01pm UTC](https://forum.xojo.com/t/reports-and-recordset/13633/8 "2020-10-29T17:01:48Z")

</div>


