i want a group of hours from 1 to 24 in following format
01 - 02
02-03
04-05
..
.
.
.
.
.
21-22
22-23
23-24
24-01
and as per this group i want to give different running total.On create new group form select "Use formula as group" option and write down your's desire formula.
you can write formula as
if{@.Cond}='1' then
'01 - 02'
else if {@.Cond}='2' then
'02 - 03'
...
...
and so on|||thanks Anand
but i want to create a group with 01-02 , 02-03, 03-04 and so on up to 23-24, 24-01. and there not a single field in database which can represent this type of group
so plz let me know as eairly as possible|||?
Do you mean you want to group like this:
01 - 02 // or may be 00 - 01 ?
03 - 04
05 - 06
.
.
24 - 00 ?
I don't really understand what do you mean by '01 - 02' and '02 - 03' ?
The hour 02 can be included just into one group.
OK, if {your_table.date_time_field} you want to group by, returns date_time or time, create a formula @.Hour:
hour({your_table.date_time_field})
then you will be able to create another formula @.Groupping_by_Hour:
if {@.Hour} in [0,1] then '0 - 1' else
if {@.Hour} in [2,3] then '2 - 3' else
.
.
if {@.Hour} in [20,21] then '20 - 21' else '22_23'|||i want report as follows
time! No of person came for interview
01 am: 02 am 1
02am : 03am 1
03am : 04am 2
04am : 05am 1
.
.
.
21 pm : 22 pm 1
22 pm : 23 pm 1
23 pm : 24 pm 1
24 pm : 01 am 1
i don't have any field which i an get time. but i want a group as per time. and i have a field of noof person came for interviw and their time|||You had to post a such info in your first post. When you say you need to group the records by hour, it sounds (at least for me) that you have some {table.date_time} field, otherwise how you can get an hour to group your records on, if you don't have a such field.
So, from your last post I understand that you have 2 fields:
the 1st one is time the person came for his/her interview at, again, it sounds like it's a date_time field, but you didn't say anything about your field formats;
the 2nd one is 'their time';
Which time? Is that a numeric field which containes a number of hours/minutes the person had been interviewing for or the time when he/she left (date_time field)... or :) their time they had an appointment at?
Can you post an example of these fields?|||sorry friend, for providing inproper information, i have a form in which i accept name of person, addres and other details of a person who came for interview and his timing of arrival. and thus the information is stored in the database with timing of arrival as datetime. now i want a report which shows count of person arrived for interview between
01:00 to 02:00 am
02:00 to 03:00 am
03:00 to 04:00 am
04:00 to 05:00 am
.
.
.
.
.
.
..
.
.
.21:00 to 22:00 pm
22:00 to 23:00 pm
23:00 to 24:00 pm
24:00 to 01:00 am
if the information is still in proper plz let me know|||:) it's OK.
So why did you say you 'don't have any field which u can get time' if you have info 'stored in the database with timing of arrival as datetime' ?
Use that field, this is the one you need.
I probably understood you wrong about how you want to group your records (I really need my vacation :)).
I guess you actually want to group by hour
01:00 to 02:00 am // this is time from 1:00:00 am to 1:59:59 am
02:00 to 03:00 am // that is time from 2:00:00 am to 2:59:59 am
.
.
but in your GF you would like to have a note like these
01-02
02-03
.
.
Right?
You can group your records on {your_table.timing_of_arrival} field by hour, which you said was datetime field;
for 'The section will be printed' select 'for each hour'.
Count how many people came for interview each hour. You might have a person ID field or something so, right click on it -> insert -> summary;
for calculate this summary select 'Count'
for summary location select group based on that field.
Suppress GH and Details sections
then create a formula @.Groupping
local numbervar HH:=hour({your_table.timing_of_arrival});
if HH=1 then '01 - 02' else
if HH=2 then '02 - 03' else
if HH=3 then '03 - 04' else
.
.
.
if HH=22 then '22 - 23' else
if HH=23 then '23 - 24' else
if HH=0 then '24 - 01'
Place it in the Group Footer|||thanks,
but one small problem. i am getting group of hours only if the person came within that range of hours and if no one came for interview withing that hour then the group is not shown. eg
if 2 person came for interview between 11:00 - 12:00 then group is shown
and if no one came between 2:00 - 3:00 then group of 2:00-3:00 is not shown
and i want that all hours must be displayed.|||Ah, that old chestnut - used to be a common question but I haven't seen it for a while.
I believe the concensus was that you need a table containing all of the values that you want to display, and use this as the main table for the report with either
1) a left join to your table containing the times
or
2) running a subreport for each record in the main table, i.e. you'll run a subreport 24 times, once per hour period.
No comments:
Post a Comment