Report on Desktop vs on Connect Dashboard

Dear SMART

I designed complex report template, which compares data between the current month and the previous month.

The script I created runs fine in SMART Desktop, but it gives an error in SMART Connect.

Error message

  • A BIRT exception occurred. See next exception for more information.
    ReferenceError: “BirtDateTime” is not defined.

and

Invalid javascript expression: ReferenceError: “BirtDateTime” is not defined.

Is there a solution for this error?

Hi Lili

Can you share the script.

Regards

Hi Lili,
As it turns out, there is a bug in the Connect BIRT code, so it seems that none of the BirtDateTime functions are working properly in our Connect 7 version. We’ve fixed this in Connect8 development going on now, so you can either use the reports on desktop only for now until smart 8 is out and you can upgrade, or you could probably find alternative date functions in the “native javascript” sections and if the report is re-written with those then it shouldn’t fail on Connect like you are seeing now.

Not a immediate fix, but hopefully that helps a bit!

Thanks for your clarification.

Native javascript is not working on SMART Desktop.

Regard

Can you share the specifics of what isn’t working? I just did a quick test and saw the javascript Date() function was working to create new date values on desktop.

1 Like

Hi Jeff & Jval

Here the script

BirtDateTime.addMonth(params[“Start Date”].value, -1)

RER_Monthly_Report_000012.zip (100.0 KB)

Regard

Lili Sadikin

Sorry, I meant the “Native Javascript” version that doesn’t work on Desktop. I’m trying to figure out if there is a separate issues with that as well.
Thanks!

Hi jeff

My bad, I make a mistake when use native javascript. My Native javascript is working when I revise the script.

Here the working script:

Native javascript:
startDate = new Date(params[“Start Date”].value);
firstDayOfYear = new Date(startDate.getFullYear(), 0, 1);

BIRT Functions:
BirtDateTime.firstDayOfYear(params[“Start Date”].value)

Regard

Lili Sadikin

1 Like

Ok, that’s good to hear. Just the one issue, the BirtDateTime… functions don’t work on Connect V7. This will be fixed in Connect V8.
Thanks,

Hi Jeff,
I’m having a similar issue running reports in Connect for the Nunavut CA. The reports (all mirrors of one another with slight variations) run fine in Desktop but generate the following error message in Connect:

Table (id = 856):

  • Fail to compute value for computed column “Greater Than”.
    A BIRT exception occurred. See next exception for more information.
    Invalid javascript expression: ReferenceError: “BirtComp” is not defined.

Based on this thread, I’m guessing the “BirtComp” function simply isn’t working in Connect 7?

@jeffloun Was wondering whether the errors I’m encountering are the same you flagged above RE BirtDateTime function…? I’m trying to run a report that has a basic incident query in it - just return all incidents. On desktop it works fine, but running from connect, I keep getting the below error and it won’t generate the table.

The following items have errors:
Table (id = 1804):
+ Cannot get the date value from column: 13.
IResultSet.getDate( int index )

Thanks!

Hi Drew,
Yes, that seems likely, you could download a Test-copy of SMART 8.1 and double-check that it works in the new version if you want to be sure. I’ll send a link in a moment, as I say, not for production usage yet!
Cheers,
Jeff

@jeffloun Thanks for the link to the test copy. Haven’t been able to check it specifically yet, but am wondering - the isssue is running the report in connect specifically, so I think I would need a test version of Connect to ensure functionality? Please confirm. thanks!

Right, Oliver should have a test version of Connect 8 setup, it might only be 8.0.3 or 8.04 at the moment? Maybe let me know what version of Connect he has setup that you can use, and I can link to a desktop version of SMART for that version.

I currently can’t run SMART 8 on my computer (State IT issue), but I’ve flagged this to James S RE v8 testing. He’s going to see about these issues within the testing group. Thanks @jeffloun !