I would like to know if I can declare an array for time field, for suppose I would like to store a part of table "time" in array timeIn and another part of table "time" in array timeOut, and how would I go about calling these two arrays from a formula?
if ({DUPTIMRPT4.CPPCTM} <> 999999) then
TimeValue(hours, mins,secs );
I have a <@test> formula that counts to 1 for I's and 2's for O's:
if {DUPTIMRPT4.CPTRST} = "I" then
(numberVar countS := 1;
timeVar array timeS0 := [{@TIME}]
)
else if {DUPTIMRPT4.CPTRST} = "O" then
(
timeVar array timeS01 := {@TIME};
countS := countS +1)
else if {DUPTIMRPT4.CPTRST} = "1" then
(countS := 3);
countS;
To display my columns in my desire format, i.e. when <@test> =2, I will display using <@display> formula:
numbervar i := 1;
numbervar j := 1;
if {@TEST} = 2 then ({DUPTIMRPT4.CPTRDN}&" "&{@DATE}&" "&timeVar array timeS0&" "&timeVar array timeS01[j]&" "&{DUPTIMRPT4.CPINHR}&" "&{@RUNTOTAL};
);
Output should look like:
days date timeS0 timeS01
sun 1/2/2005 10:22:34AM 3:45:33PM
sun 1/2/2005 11:23:59AM 3:43:40PM
sun 1/2/2005 09:60:38AM 09:50:38PM
mon 1/3/2005 12:00:32AM 3:33:33PM
mon 1/3/2005 09:30:67AM 09:00:32PM
tues 1/4/2005 5:40:00AM 5:40:00PM
But I get:
days date timeS0 timeS01
sun 1/2/2005 5:40:00AM 5:40:00PM
sun 1/2/2005 5:40:00AM 5:40:00PM
sun 1/2/2005 5:40:00AM 5:40:00PM
mon 1/3/2005 5:40:00AM 5:40:00PM
mon 1/3/2005 5:40:00AM 5:40:00PM
tues 1/4/2005 5:40:00AM 5:40:00PM
But the above formula only takes in the last values for time i.e. timeS0 and timeSO1, i.e. the last two records of time, I want to have all the times just like any other fields, could you please show me some light?
days date CPTRST TIME
sun 1/2/2005 I 10:22:34AM
sun 1/2/2005 O 3:45:33PM
sun 1/2/2005 I 11:23:59AM
sun 1/2/2005 O 3:43:40PM
sun 1/2/2005 I 09:60:38AM
sun 1/2/2005 O 09:50:38PM
mon 1/3/2005 I 12:00:32AM
mon 1/3/2005 O 3:33:33PM
mon 1/3/2005 I 09:30:67AM
mon 1/3/2005 O 09:00:32PM
tues 1/4/2005 I 5:40:00AM
tues 1/4/2005 O 5:40:00PM
This is what I need:
days date timeS0 timeS01
sun 1/2/2005 10:22:34AM 3:45:33PM
sun 1/2/2005 11:23:59AM 3:43:40PM
sun 1/2/2005 09:60:38AM 09:50:38PM
mon 1/3/2005 12:00:32AM 3:33:33PM
mon 1/3/2005 09:30:67AM 09:00:32PM
tues 1/4/2005 5:40:00AM 5:40:00PM
I dont see any suppress when i right click details, but there is one suppress when i right click details and that is in section expert->suppress no drill down, when i put the formula in there and follow as you said, it does not make any difference to the values.
If you clicked the x 2 and placed the formula in there, then it should be suppressing every odd numbered record providing you have not sorted the rows.
Another solution would be to use formulas to do the same.
In the report header place:
whileprintingrecords;
numbervar Row:= 0;
In the details use:
whileprintingrecords;
numbervar Row:= Row+1;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.