aquatecit
Posts: 6
Joined: Wed Feb 06, 2013 5:05 am
Location: Australia

Report Weekly period

Wed Feb 06, 2013 5:14 am

I'd like to change the 'week' period for reports to start on a Wednesday and end on a Tuesday (rather then Sunday to Saturday)

I've created a report and modified to QEventReport SQL

Code: Select all

DATE_ADD(CAST([PeriodStart] AS DATETIME),INTERVAL 2 DAY) AS PeriodStart,
DATE_ADD(CAST([PeriodEnd] AS DATETIME),INTERVAL 2 DAY) AS PeriodEnd,
and

Code: Select all

EventProvider01.SamplingStart BETWEEN DATE_ADD([PeriodStart],INTERVAL 2 DAY)  AND DATE_ADD([PeriodEnd],INTERVAL 2 DAY) OR 
EventProvider01.SamplingEnd BETWEEN DATE_ADD([PeriodStart],INTERVAL 2 DAY) AND DATE_ADD([PeriodEnd],INTERVAL 2 DAY)
But it'd be nice to have the period on the report interface be adjusted to match the same dates. Is this possible?

aquatecit
Posts: 6
Joined: Wed Feb 06, 2013 5:05 am
Location: Australia

RE: Report Weekly period

Wed Mar 13, 2013 3:24 am

I assume because it's been moved to developers, it's not a simple fix?

with this SQL it seems the report still only presents data starting on the Wednesday and ending on the Saturday. Is it even possible what I'm asking for?
Cheers, Jake

User avatar
Bjorn_Andersson
GpsGate
Posts: 461
Joined: Wed Jun 28, 2006 5:20 pm
Location: Sweden
Contact: Website

RE: Report Weekly period

Wed Mar 13, 2013 11:46 am

The start of the week is determined by the Culture settings. This cannot be changed.

You cannot change the period in the SQL either since the period parameter is used internally to reduce the result set which the SQL you have written executes over.

Please use the custom period parameter instead!

Just set start = previous Wednesday, end = this Wednesday, and it will behave exactly as the weekly parameter, except it will start and end on Wednesday.

Regards,
GpsGate Support
Bjorn Andersson

Return to “GpsGate for Developers”