Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Showing data from a shift that covers two days
Showing data from a shift that covers two days [message #1837827] Mon, 08 February 2021 11:16
Chris Percival is currently offline Chris PercivalFriend
Messages: 1
Registered: February 2021
Junior Member
Hello Experts,

I have a problem with filtering data to display. In the factory where I work, we have 8 robot welding cells which have their production figures collected and synced to an sql server 2017 database. I am attempting to setup a report so that when the user selects a shift (Morning, Afternoon, Night) and a date, they have exactly that in the report.

The problem lies in the night shift, from 22:00 to 06:00 which means for any given date the data consists of the last six hours of the previous days shift (00:00-06:00) and the first two hours of the shift being asked for.

The parameter for choosing which shift is a static radio list of three entries (Morning, Afternoon, Night). So the query takes the shift and the date like so:

SELECT * FROM redlion_CELLS Where ? like ActiveShift And ? like [TimeDate]

Which is fine for Morning and Afternoon shifts, but for night shift, I would need a query such as:

SELECT * FROM redlion_CELLS where activeshift = ? and [DateTime] between '2021-02-01 22:00:00.000' and dateadd(hh,8,'2021-02-01 22:00:00.000')

Which sums up what I am trying to achieve. Ultimately though, I want the user to be able to select a shift and a date and get the correct data no matter what shift is choasen and without any further user input.

Could anyone put forward a suggestion to help me reach my goal please


Previous Topic:EXCELRenderOption exported xls file cannot open in MS Excel
Next Topic:Duplicate class definition in Birt runtime 4.2
Goto Forum:
  


Current Time: Thu Mar 28 08:04:58 GMT 2024

Powered by FUDForum. Page generated in 0.02875 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top