Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compute many operations
Message
 
 
To
09/09/2004 14:26:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00939290
Message ID:
00940765
Views:
24
>hi,
>
>i'll try now,
>
>but i'll try to print the result at myreport,but he get in loop;
>i need to print the result before i make random(choice) , at the end or any location.
>and i want to show at my report how many records i must get before *4,
>becuse "NumToFetch " mean records * 4.
>
>
>scan
>     ? AreaCode, Team, TeamCount, Percentage,,number of record befor multiple 4, NumToFetch ,
>report form rpt1 preview
>
>
>
>thanks

1) Add one more field to your select statement, say, NumToFetchNoMultiply (or came up with a better name, because that's too long).

2)
local lnArea, lnTeamCount, lnPercentage, lnNumToFetchNoMultiply, lnNumToFetch

lnAreaCode = AreaCode 
lnTeam = Team
etc. 
* E.g. do first assignation before the loop

scan
     
    if  curPercentage.AreaCode<>lnAreaCode && we're changing areas now
         * Print your information - will print from the prev record, as we want
          ?  lnAreaCode, lnTeam, ln TeamCount, lnPercentage, lnNumToFetchNoMultiply, lnNumToFetch 
         report form ...
        lnAreaCode = curPercentage.AreaCode && re-assign this temp variable to a new value
   endif 
   * now re-assign all other vars, e.g. Team, Percentage, etc.
   * continue with the rest of your code
report form rpt1 preview
  endscan
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform