开发者

generation of report

开发者 https://www.devze.com 2023-03-12 18:42 出处:网络
I\'m doing report line shift report I have 3 shifts: shift1 starts at 7am and ends at 3pm shift2 starts at 3pm and ends at 11pm

I'm doing report line shift report I have 3 shifts:

shift1 starts at 7am and ends at 3pm
shift2 starts at 3pm and ends at 11pm
shift3 starts at 11pm and ends at 7am

I have to generate report based on shift. For example, if the user selects shift1 from dropdownlist the report should display all data from 7am to 3pm.

I'm able to fetch data for shift1 and shift2 but shift3 data I'm not able to fetch because in shift3 after 12am the date will change.

So how to fetch data for shift3 and fetching data based on date in these 4 tables

my first table contains following data(shift3(11-7)):

Name       Shiftname     Operatorname  Date        plant    Line   Machine
---------  ------------  ------------  ----------  -------  -----  -------
Deepali    Shift3(11-7)  Operator 3    2011-06-07  Plant 1  Line1  mc1
Ashwini    Shift3(11-7)  Operator 3    2011-06-07  Plant 1  Line1  mc2
Antra      Shift3(11-7)  Operator 3    2011-06-07  Plant 1  Line2  mc3
Harshitha  Shift3(11-7)  Operator 3    2011-06-07  Plant 1  Line2  mc4
Pradeep    Shift3(11-7)  Operator 3    2011-06-07  Plant 2  Line3  mc5
Madhu      Shift3(11-7)  Operator 3    2011-06-07  Plant 2  Line3  mc6
Meena      Shift3(11-7)  Operator 3    2011-06-07  Plant 2  Line4  mc7
Suhas      Shift3(11-7)  Operator 3    2011-06-07  Plant 2  Line4  mc8

this is my temperature table (shift3(11-7)):

Temperature  Time                     Date
-----------  -----------------------  ----------
27           1900-01-01 23:34:56.000  2011-06-07
27.3         1900-01-01 23:36:56.000  2011-06-07
27.6         1900-01-01 23:38:56.000  2011-06-07
27.9         1900-01-01 23:40:56.000  2011-06-07
28.2         1900-01-01 23:42:56.000  2011-06-07
28.5         1900-01-01 23:44:55.000  2011-06-07
28.8         1900-01-01 23:46:55.000  2011-06-07
29.1         1900-01-01 23:48:55.000  2011-06-07
29.4         1900-01-01 23:50:55.000  2011-06-07
29.7         1900-01-01 23:52:55.000  2011-06-07
30           1900-01-01 23:54:55.000  2011-06-07
30           1900-01-01 23:56:55.000  2011-06-07
30.3         1900-01-01 23:58:55.000  2011-06-07
30.6         1900-01-01 00:00:55.000  2011-06-08
30.9         1900-01-01 00:02:55.000  2011-06-08
31.2         1900-01-01 00:04:55.000  2011-06-08
31.5         1900-01-01 00:06:55.000  2011-06-08
31.8         1900-01-01 00:08:55.000  2011-06-08
32.1         1900-01-01 00:10:55.000  2011-06-08
32.4         1900-01-01 00:12:55.000  2011-06-08
32.7         1900-01-01 00:14:55.000  2011-06-08
33           1900-01-01 00:16:55.000  2011-06-08
33.3         1900-01-01 00:18:55.000  2011-06-08
33.6         1900-01-01 00:20:55.000  2011-06-08
33.9         1900-01-01 00:22:55.000  2011-06-08
34.2         1900-01-01 00:24:55.000  2011-06-08
34.5         1900-01-01 00:26:55.000  2011-06-08
34.8         1900-01-01 00:28:55.000  2011-06-08
35.1         1900-01-01 00:30:55.000  2011-06-08
35.4         1900-01-01 00:32:55.000  2011-06-08
35.7         1900-01-01 00:34:55.000  2011-06-08
36           1900-01-01 00:36:55.000  2011-06-08
36.3         1900-01-01 00:38:55.000  2011-06-08
36.6         1900-01-01 00:40:55.000  2011-06-08
36.9         1900-01-01 00:42:55.000  2011-06-08
36.9         1900-01-01 00:44:55.000  2011-06-08
37.2         1900-01-01 00:46:55.000  2011-06-08
36.9         1900-01-01 00:48:55.000  2011-06-08
36.6         1900-01-01 00:50:55.000  2011-06-08
36.3         1900-01-01 00:52:55.000  2011-06-08
36           1900-01-01 00:54:55.000  2011-06-08
35.7         1900-01-01 00:56:55.000  2011-06-08
35.4         1900-01-01 00:58:55.000  2011-06-08
35.1         1900-01-01 01:00:55.000  2011-06-08
34.8         1900-01-01 01:02:55.000  2011-06-08
34.5         1900-01-01 01:04:55.000  2011-06-08
34.2         1900-01-01 01:06:55.000  2011-06-08
33.9         1900-01-01 01:08:55.000  2011-06-08
33.6         1900-01-01 01:10:55.000  2011-06-08
33.3         1900-01-01 01:12:55.000  2011-06-08
33           1900-01-01 01:14:55.000  2011-06-08
32.7         1900-01-01 01:16:55.000  2011-06-08
32.4         1900-01-01 01:18:55.000  2011-06-08
32.1         1900-01-01 01:20:55.000  2011-06-08
31.8         1900-01-01 01:22:55.000  2011-06-08
31.5         1900-01-01 01:24:55.000  2011-06-08
31.2         1900-01-01 01:26:55.000  2011-06-08
30.9         1900-01-01 01:28:55.000  2011-06-08
30.6         1900-01-01 01:30:55.000  2011-06-08
30.3         1900-01-01 01:32:56.000  2011-06-08
30           1900-01-01 01:34:55.000  2011-06-08
29.7         1900-01-01 01:36:56.000  2011-06-08
29.4         1900-01-01 01:38:55.000  2011-06-08
29.1         1900-01-01 01:40:55.000  2011-06-08
28.5         1900-01-01 03:03:02.000  2011-06-08
28.2         1900-01-01 03:05:02.000  2011-06-08
27.9         1900-01-01 03:07:02.000  2011-06-08
27.6         1900-01-01 03:09:02.000  2011-06-08
27.3         1900-01-01 03:11:02.000  2011-06-08
27           1900-01-01 03:13:02.000  2011-06-08
27           1900-01-01 03:15:02.000  2011-06-08
27           1900-01-01 03:17:02.000  2011-06-08
27           1900-01-01 03:19:02.000  2011-06-08
27           1900-01-01 03:21:03.000  2011-06-08
27           1900-01-01 03:23:02.000  2011-06-08
27           1900-01-01 03:25:02.000  2011-06-08
27           1900-01-01 03:27:02.000  2011-06-08
27           1900-01-01 03:29:02.000  2011-06-08
27           1900-01-01 04:33:06.000  2011-06-08
27.3         1900-01-01 04:35:07.000  2011-06-08
27.6         1900-01-01 04:37:06.000  2011-06-08
27.9         1900-01-01 04:39:07.000  2011-06-08
28.2         1900-01-01 04:41:06.000  2011-06-08
28.5         1900-01-01 04:43:06.000  2011-06-08
28.8         1900-01-01 04:45:06.000  2011-06-08
29.1         1900-01-01 04:47:07.000  2011-06-08
29.4         1900-01-01 04:49:06.000  2011-06-08
29.7         1900-01-01 04:51:06.000  2011-06-08
29.7         1900-01-01 04:53:06.000  2011-06-08
30           1900-01-01 04:55:06.000  2011-06-08
30.3         1900-01-01 04:57:06.000  2011-06-08
30.6         1900-01-01 04:59:07.000  2011-06-08
27           1900-01-01 05:33:04.000  2011-06-08
27.3         1900-01-01 05:35:04.000  2011-06-08
27.6         1900-01-01 05:37:04.000  2011-06-08
27.9         1900-01-01 05:39:04.000  2011-06-08
28.2         1900-01-01 05:41:04.000  2011-06-08
28.5         1900-01-01 05:43:04.000  2011-06-08
28.8         1900-01-01 05:45:04.000  2011-06-08
29.1         1900-01-01 05:47:04.000  2011-06-08
29.4         1900-01-01 05:49:04.000  2011-06-08
29.7         1900-01-01 05:51:04.000  2011-06-0开发者_Go百科8
29.7         1900-01-01 05:53:04.000  2011-06-08
30           1900-01-01 05:55:04.000  2011-06-08
30.3         1900-01-01 05:57:04.000  2011-06-08
30.6         1900-01-01 05:59:04.000  2011-06-08

Same for pressure and ph, only pressure column and ph column value will be changed.

I'm storing data in database, there are 4 tables, date is my primary key in that. I have to link those data based on date.

I'm displaying data in gridview.

I want my output like this:

Temperature  Time                     Date        Pressure
-----------  -----------------------  ----------  --------
27           1900-01-01 23:34:56.000  2011-06-07  30
27.3         1900-01-01 23:36:56.000  2011-06-07  30.1
27.6         1900-01-01 23:38:56.000  2011-06-07  30.2
27.9         1900-01-01 23:40:56.000  2011-06-07  30.3
28.2         1900-01-01 23:42:56.000  2011-06-07  30.4
28.5         1900-01-01 23:44:55.000  2011-06-07  30.5
28.8         1900-01-01 23:46:55.000  2011-06-07  30.6
29.1         1900-01-01 23:48:55.000  2011-06-07    .
29.4         1900-01-01 23:50:55.000  2011-06-07    .
29.7         1900-01-01 23:52:55.000  2011-06-07    .
30           1900-01-01 23:54:55.000  2011-06-07    .
30           1900-01-01 23:56:55.000  2011-06-07    .
30.3         1900-01-01 23:58:55.000  2011-06-07 
30.6         1900-01-01 00:00:55.000  2011-06-08 
30.9         1900-01-01 00:02:55.000  2011-06-08 
31.2         1900-01-01 00:04:55.000  2011-06-08 
31.5         1900-01-01 00:06:55.000  2011-06-08 
31.8         1900-01-01 00:08:55.000  2011-06-08 
32.1         1900-01-01 00:10:55.000  2011-06-08 
32.4         1900-01-01 00:12:55.000  2011-06-08 
32.7         1900-01-01 00:14:55.000  2011-06-08 
33           1900-01-01 00:16:55.000  2011-06-08 
33.3         1900-01-01 00:18:55.000  2011-06-08 
33.6         1900-01-01 00:20:55.000  2011-06-08 
33.9         1900-01-01 00:22:55.000  2011-06-08 
34.2         1900-01-01 00:24:55.000  2011-06-08 
34.5         1900-01-01 00:26:55.000  2011-06-08 
34.8         1900-01-01 00:28:55.000  2011-06-08 
35.1         1900-01-01 00:30:55.000  2011-06-08 
35.4         1900-01-01 00:32:55.000  2011-06-08 
35.7         1900-01-01 00:34:55.000  2011-06-08 
36           1900-01-01 00:36:55.000  2011-06-08 
36.3         1900-01-01 00:38:55.000  2011-06-08 
36.6         1900-01-01 00:40:55.000  2011-06-08 
36.9         1900-01-01 00:42:55.000  2011-06-08 
36.9         1900-01-01 00:44:55.000  2011-06-08 
37.2         1900-01-01 00:46:55.000  2011-06-08 
36.9         1900-01-01 00:48:55.000  2011-06-08 
36.6         1900-01-01 00:50:55.000  2011-06-08 
36.3         1900-01-01 00:52:55.000  2011-06-08 
36           1900-01-01 00:54:55.000  2011-06-08 
35.7         1900-01-01 00:56:55.000  2011-06-08 
35.4         1900-01-01 00:58:55.000  2011-06-08 
35.1         1900-01-01 01:00:55.000  2011-06-08 
34.8         1900-01-01 01:02:55.000  2011-06-08 
34.5         1900-01-01 01:04:55.000  2011-06-08 
34.2         1900-01-01 01:06:55.000  2011-06-08 
33.9         1900-01-01 01:08:55.000  2011-06-08 
33.6         1900-01-01 01:10:55.000  2011-06-08 
33.3         1900-01-01 01:12:55.000  2011-06-08 
33           1900-01-01 01:14:55.000  2011-06-08 
32.7         1900-01-01 01:16:55.000  2011-06-08 
32.4         1900-01-01 01:18:55.000  2011-06-08 
32.1         1900-01-01 01:20:55.000  2011-06-08 
31.8         1900-01-01 01:22:55.000  2011-06-08 
31.5         1900-01-01 01:24:55.000  2011-06-08 
31.2         1900-01-01 01:26:55.000  2011-06-08 
30.9         1900-01-01 01:28:55.000  2011-06-08 
30.6         1900-01-01 01:30:55.000  2011-06-08 
30.3         1900-01-01 01:32:56.000  2011-06-08 
30           1900-01-01 01:34:55.000  2011-06-08 
29.7         1900-01-01 01:36:56.000  2011-06-08 
29.4         1900-01-01 01:38:55.000  2011-06-08 
29.1         1900-01-01 01:40:55.000  2011-06-08 
28.5         1900-01-01 03:03:02.000  2011-06-08 
28.2         1900-01-01 03:05:02.000  2011-06-08 
27.9         1900-01-01 03:07:02.000  2011-06-08 
27.6         1900-01-01 03:09:02.000  2011-06-08 
27.3         1900-01-01 03:11:02.000  2011-06-08 
27           1900-01-01 03:13:02.000  2011-06-08 
27           1900-01-01 03:15:02.000  2011-06-08 
27           1900-01-01 03:17:02.000  2011-06-08 
27           1900-01-01 03:19:02.000  2011-06-08 
27           1900-01-01 03:21:03.000  2011-06-08 
27           1900-01-01 03:23:02.000  2011-06-08
27           1900-01-01 03:25:02.000  2011-06-08 
27           1900-01-01 03:27:02.000  2011-06-08 
27           1900-01-01 03:29:02.000  2011-06-08 
27           1900-01-01 04:33:06.000  2011-06-08 
27.3         1900-01-01 04:35:07.000  2011-06-08 
27.6         1900-01-01 04:37:06.000  2011-06-08 
27.9         1900-01-01 04:39:07.000  2011-06-08 
28.2         1900-01-01 04:41:06.000  2011-06-08 
28.5         1900-01-01 04:43:06.000  2011-06-08 
28.8         1900-01-01 04:45:06.000  2011-06-08 
29.1         1900-01-01 04:47:07.000  2011-06-08 
29.4         1900-01-01 04:49:06.000  2011-06-08 
29.7         1900-01-01 04:51:06.000  2011-06-08 
29.7         1900-01-01 04:53:06.000  2011-06-08 
30           1900-01-01 04:55:06.000  2011-06-08 
30.3         1900-01-01 04:57:06.000  2011-06-08 
30.6         1900-01-01 04:59:07.000  2011-06-08 
27           1900-01-01 05:33:04.000  2011-06-08 
27.3         1900-01-01 05:35:04.000  2011-06-08 
27.6         1900-01-01 05:37:04.000  2011-06-08 
27.9         1900-01-01 05:39:04.000  2011-06-08 
28.2         1900-01-01 05:41:04.000  2011-06-08 
28.5         1900-01-01 05:43:04.000  2011-06-08 
28.8         1900-01-01 05:45:04.000  2011-06-08 
29.1         1900-01-01 05:47:04.000  2011-06-08 
29.4         1900-01-01 05:49:04.000  2011-06-08 
29.7         1900-01-01 05:51:04.000  2011-06-08 
29.7         1900-01-01 05:53:04.000  2011-06-08 
30           1900-01-01 05:55:04.000  2011-06-08 
30.3         1900-01-01 05:57:04.000  2011-06-08
30.6         1900-01-01 05:59:04.000  2011-06-08    .

Can anyone help me on this?


You need to find out the requirements -- when someone selects shift 3 and a date they can mean 3 different things:

  • Report on shift 3s that start on that date.

  • Report on shift 3s that end on that date.

  • Report on the shift 3s from midnight to 7am and 11 to midnight on that date.

If people are really getting reports by date then I would expect they would want the last one.

0

精彩评论

暂无评论...
验证码 换一张
取 消