Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 Report - Subscript out of bounds
Message
De
04/08/1999 10:04:34
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
03/08/1999 13:17:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00249309
Message ID:
00249711
Vues:
21
>I am trying to print a list report based on the contents of a two-dimensional array which
>is populated from calculations on fields from a table. The problem is, I am getting the
>message 'Subscript out of bounds' after the report is executed. The report is printing
>out correctly but I want to avoid this error message.
>In my report I have a bunch of fields in the Details section containing:
>
>current(nCounter,1)
>current(nCounter,2)
>and so on...
>
>As you can see I am using the Report Designer's nCounter variable because the report
>will not be printing a fixed number of records.
>Any ideas how I can avoid this error?

I've burned my fingers on using arrays in reports - when some dirty data come in. Since then, I'm calling an UDF for that, and it performs some range checking first, and it returns a "???" if the range is out, else it retrieves the proper array element. The only things to watch out for is some dimension checking (i.e. is alen(array)=alen(array,1) to see if its 1- or 2-dimensional), and not to forget to pass the array by reference.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform