Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Percentage calculation in expression of report
Message
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00588031
Message ID:
00588260
Views:
39
Hi Nadya,

Wow that's some code you've written there. I don't think I'd know the first step to changing it. Sorry, I'm not very knowledgeable in coding. :(
Thanks for all your help though
Max

> Glad, I can help.

> I'm working on some application now, which is supposed to be simple, but I'm working on three days already and it still doesn't behave, as it should :(

> For instance, here is the peice of code, which I can not make to work correctly.

> The idea is to check for gaps between two days and report them excluding weekends and holidays. What's wrong with this code or how it should be changed?


* -- Checking for missing data compared against last data received
* -- Check for Friday or Saturday for old and new is Monday date then we're not missing any data
if (dow(Record_fm)=2 and Record_fm - PriorRec_To > 3) ;
or (dow(Record_fm)<> 2 and Record_fm > PriorRec_To+1)
tmpDays = Record_fm - PriorRec_To
if m.tmpDays > 1
for i = 1 to m.tmpDays-1
* -- Check against holiday for each missing record && Sundays & Saturdays
if dow(PriorRec_To+m.i)<>1 and dow(PriorRec_To+m.i)<>7 ;
and !seek(PriorRec_To+m.i,'Holidays')
lcTempStr = "May have Missing Recorded data for "+ dtoc(PriorRec_To+m.i)+"."
if not m.lcTempStr $ m.tmpNotesStr
tmpNotesStr = iif(empty(m.tmpNotesStr),'',m.tmpNotesStr+chr(13)) + m.lcTempStr
endif
llMDFlag = .t.
endif && Missing Data
endfor && Going to the next date to check for missing data
endif
endif
Previous
Reply
Map
View

Click here to load this message in the networking platform