# Unable to open spiReport

**URL:** <https://speciforum.org/t/unable-to-open-spireport/1390>\
**Category:** Get Help\
**Created:** [November 2, 2023, 3:36pm UTC](https://speciforum.org/t/unable-to-open-spireport/1390 "2023-11-02T15:36:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![willem](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@willem](https://speciforum.org/u/willem)\
**Post date:** [November 2, 2023, 3:36pm UTC](https://speciforum.org/t/unable-to-open-spireport/1390/1 "2023-11-02T15:36:10Z")

</div>

I am having difficulty opening SpiReport. Even when I was still able to open it, it would take several hours to open a simple label design. Has anyone else struggled like this, and do you know how to solve the problem?

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [November 2, 2023, 5:57pm UTC](https://speciforum.org/t/unable-to-open-spireport/1390/2 "2023-11-02T17:57:08Z")

</div>

To echo my reply via email to your inquiry 😉

> It sounds like it could be a device-specific issue– could you provide some information about the system (operating system, memory, etc.) you are using?
> 
> Is the app not opening or is the report opening very slowly?
> 
> When working with a local version of Specify 6, you should be able to edit reports and labels quickly. However, if you’re connecting to a remote server via SSH, slow speeds can be expected. Have you tried to edit reports/labels using SpiReport on a local copy of your database?

Thank you for posting it here as well! 🖖

---

<div class="post-metadata">

**Author:** ![willem](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@willem](https://speciforum.org/u/willem)\
**Post date:** [November 3, 2023, 1:33pm UTC](https://speciforum.org/t/unable-to-open-spireport/1390/3 "2023-11-03T13:33:30Z")

</div>

I’m using Windows 10 Pro on a machine with plenty of RAM (in any case, I can open all the other Specify apps). I have always struggled to open SpiReport and to open label designs (they always take several hours to open).

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [November 27, 2023, 10:27pm UTC](https://speciforum.org/t/unable-to-open-spireport/1390/5 "2023-11-27T22:27:02Z")

</div>

_From our e-mail conversation, but sharing here so others can see it as well if needed in the future. ⚡_

Thank you for sharing a copy of the database! This allowed me to debug the issue and find a solution.

In your database, there are three queries that have invalid `ContextTableIdent` IDs.

When running the application from the terminal, I found the following error:

```auto
15:23:32 DEBUG specify.dbsupport.RecordTypeCodeBuilder:138 - retrieving TypeCode Fields for edu.ku.brc.specify.datamodel.Locality
15:23:32 ERROR core.db.DBTableIdMgr:527 - Couldn't find tableId[0] java.lang.NullPointerException at edu.ku.brc.specify.tasks.subpane.qb.QueryBldrPane.getColumnInfoSp(QueryBldrPane.java:2649)

```

The `Couldn't find tableId[0]` error indicated that the table ID being read by iReport was invalid, so I then investigated where the table ID came from. After reviewing all of the queries in the database and recognizing that the table IDs were valid, I checked several other places before finding that there were a handful of query field records that had invalid table IDs associated with them (contained in the `ContextTableIdent` field).

To resolve this, I ran the following SQL statement on the database:

```SQL
update spqueryfield set ContextTableIdent = NULL where ContextTableIdent = 0;

```

The `ContextTableIdent` is set to NULL by default when created in Specify 7, as it is not necessary for queries to function.

After testing each of the queries that previously had fields with a `ContextTableIdent` of 0, I was able to run and use them without any issue.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/7/7d252f4ba478120f868df4ca5e0e5cc038f95304.png)

iReport is now functioning properly for me!
