mahmood66
asked on
how to user WhilePrintingRecords
Hi Experts
I have attached image of my exiting report and requirement. code is given below which i have written formula. please help me to correct this correct according to my requirement.
************************** ********** *
WhilePrintingRecords;
numberVar i ;
if {WhseMst.Name} = "Yard 02" then
if i+1 = 1 then
20
else
if i+2 = 2 then
40
else if i+3 >= 3 then
55
else
0
Yard-Issue.bmp
I have attached image of my exiting report and requirement. code is given below which i have written formula. please help me to correct this correct according to my requirement.
**************************
WhilePrintingRecords;
numberVar i ;
if {WhseMst.Name} = "Yard 02" then
if i+1 = 1 then
20
else
if i+2 = 2 then
40
else if i+3 >= 3 then
55
else
0
Yard-Issue.bmp
ASKER
thanx for reply,
i appled your formula but its still not fullfilling my requirement, i will explain you.
when 1st time "Yard 02" is found then system must print 20
if 2nd time "Yard 02" found then system must print 40
if 3rd time or more than 3rd time "Yard 02" Found then system must print 55
.eg.
WhseName yard02
yard 03 0
yard 03 0
yard 02 20
yard 01 0
yard 02 40
yard 01 0
yard 02 55
yard 02 55
yard 03 0
yard 02 55
i appled your formula but its still not fullfilling my requirement, i will explain you.
when 1st time "Yard 02" is found then system must print 20
if 2nd time "Yard 02" found then system must print 40
if 3rd time or more than 3rd time "Yard 02" Found then system must print 55
.eg.
WhseName yard02
yard 03 0
yard 03 0
yard 02 20
yard 01 0
yard 02 40
yard 01 0
yard 02 55
yard 02 55
yard 03 0
yard 02 55
what is ur problem after applying this logic. send the updated code and screenshot.
pls upload the screenshot in jpeg format as its small in size.
pls upload the screenshot in jpeg format as its small in size.
ASKER
dear Radcaesar:
below is code and see attached output.
WhilePrintingRecords;
numberVar i=0 ;
if {WhseMst.Name} = "Yard 02" and i=0 then 20
else if {WhseMst.Name} = "Yard 02" and i=1 then 40
else 55
YardIssue1.JPG
below is code and see attached output.
WhilePrintingRecords;
numberVar i=0 ;
if {WhseMst.Name} = "Yard 02" and i=0 then 20
else if {WhseMst.Name} = "Yard 02" and i=1 then 40
else 55
YardIssue1.JPG
ASKER
Dear My Logic is:
My labour having a incentive on loading of container, in each yard, for 1st container bonus is 20 USD and for 2nd contianer in the same yard is having Bonus of 40 USD and for 3rd, 4th,5th ... etc each container is having 55 USD Bonus.
Note: this report is group by ContainerInDate wise field. (may be it will helps you to sort out this issue)
My labour having a incentive on loading of container, in each yard, for 1st container bonus is 20 USD and for 2nd contianer in the same yard is having Bonus of 40 USD and for 3rd, 4th,5th ... etc each container is having 55 USD Bonus.
Note: this report is group by ContainerInDate wise field. (may be it will helps you to sort out this issue)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear mlmcc:
a bundal of Thax, almost 90% work done with your support.
The value of variabe must be reset to 1 in next Next group. for reference see my attachment.
YardIssue2.JPG
a bundal of Thax, almost 90% work done with your support.
The value of variabe must be reset to 1 in next Next group. for reference see my attachment.
YardIssue2.JPG
ASKER
dear mlmmc:
thanx for your support. I am giving you points.
thanx for your support. I am giving you points.
ASKER
its done, greate job of mlmcc
if {WhseMst.Name} = "Yard 02" and {i=0} then 20
else if {WhseMst.Name} = "Yard 02" and {i=1} then 40
else 55