This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.
All right, here's the situation.
I am writing a report that will take a date as its only parameter, unbounded because I'm hitting ancillary tables. BIRT 4.3.1 hitting SQL Server 2012. I'm not as experienced with T-SQL as I am with PL/SQL so it's been a little slower than I'd like.
What I need is a transformation of the date into a week number and year number value for my crazy query.
What I have so far, which doesn't work:
WHERE DATEPART(wk,m.measuredate) = DATEPART(wk,'" + params["inDate"] +"') "
+ " AND DATEPART(yy,m.measuredate) = DATEPART(yy,'" + params["inDate"] +"') "
+ " AND DATEPART(dw,m.measuredate) = 2 "
And so "inDate" is coming from BIRT Report Designer as '2018-01-06' despite the fact that when I run "Preview" I am keying in '2018-06-09'. Also tried '2018-06-06' to no avail.
All I need is to extract the number 23 from the date to use with the week portion, and 2018 to use with the year portion, but I'm all tied in knots debugging it.
Okay, I actually fixed that on my own and it worked all along, just needed to refresh Eclipse. So weird.
I've linked two reports and in Eclipse, they work fine. The summary report runs, generates a link, and clicking on the link launches the second report and shows all the goodness.
When I promote the pair of reports to Maximo, each will run individually just fine. However, the summary will run, and clicking the link results in "Unauthorized to run the report."
Which is weird, since I tried to preview this as MAXADMIN.
Can anyone help?