Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Reports Quit working today

Questions related to nuBuilder Forte Reports and the Report Builder.
Post Reply
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Reports Quit working today

Unread post by BoydG »

Starting getting this today, reports quit working today, they have been working for months with no problem.

substr(): Passing null to parameter #1 ($string) of type string is deprecated in /core/nurunpdf.php on line 399
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /core/nurunpdf.php on line 670

PHP Warning: Undefined array key "obj1005" in /core/nurunpdf.php on line 534
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /nurunpdf.php:534
Stack trace:
#0 /core/nurunpdf.php(383): nuSECTION->chopSectionOverPages()
#1 /core/nurunpdf.php(232): nuSECTION->buildSection()
#2 /core/nurunpdf.php(68): nuBuildReport(Object(TCPDF), Object(stdClass), '___nu163e54fed4...')
#3 /core/nurunpdf.php(23): nuRunReportId('63e54fecbb897ee', '', true)
#4 {main}
thrown in /core/nurunpdf.php on line 534


PHP Version 8.1.14
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Reports Quit working today

Unread post by kev1n »

Did you update your PHP version?
Are you using the latest from Github? (It contains some PHP 8.x fixed)
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Reports Quit working today

Unread post by BoydG »

I tried version 8 and 7.4.33 of php and it's still doing it.
it's a running on a hosted server so i'm not sure what else changed.
I tried creating a new report using the same sql query as the broken one and I can't even get report designer to work.
I just get a blank page, so it might be a sql problem ?
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Reports Quit working today

Unread post by kev1n »

Are you using the latest from Github? (It contains some PHP 8.x fixed)
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Reports Quit working today

Unread post by BoydG »

I had a case statement in the SQL query, once I removed that, I was able to get into SQL designer to figure out what obj1005 was.
I found several objects with a minimum rows of -1
this was causing the
PHP Warning: Undefined array key "obj1005" in /core/nurunpdf.php on line 534
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /nurunpdf.php:534

I'm still investigating why the case statement causes the report designer not to display

If I find anything i'll let you know.
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Reports Quit working today

Unread post by BoydG »

i'm not using the the latest on git because initially i thought that was the problem and upgraded to that version, then it cause even more errors so i rolledit back to V.4.5-2022.10.29.04

so i'm currently running V.4.5-2022.10.29.04 and PHP 8.0

once i get this back and running i'll try to upgrade to the latest git and php 8.1
BoydG
Posts: 35
Joined: Mon Dec 31, 2018 10:31 am

Re: Reports Quit working today

Unread post by BoydG »

Fixed the case statement.
Issue: Duplicate column name.

even though my select statement did not include the column name, my case statement used a column name that did exist as a column in the database.


Example:
Table 1 contains columns A,B,C,D

SQL Query
Select A,B,C
case ......
end as D

the end as statement (end as D) contained column D which existed in the database.
Even though I didn't specifically select it, it caused a duplicate.

Fix
SQL Query
Select A,B,C
case ......
end as E
Post Reply