Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable 'x' is not found
Message
 
 
À
19/03/2002 16:51:40
Jorge Haro
Independent Consultant
Juarez, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00632243
Message ID:
00634743
Vues:
18
>Well, now it actually happened to me in a real scenario, I thought I had understood the part about creating a separate data session, but it didn't quite work the way I expected, as soon as the following line exewcuted:
>
>set datasession to loSession.DataSessionID
>
>the grid lost it's recordsource, (documentation does warn about using "set datasession to" when a form is active ) The preview worked correctly, the grid's recordsource still existed, but the records just wouldn't show on the grid.
>
>Anyway, I looked at another one of my forms, that had a grid and had no problems with the preview, and the only difference was that the grid was inside a pageframe, so I put my grid inside a pageframe and the problem went away, which I find a bit odd.
>

That's very weird. May be in the second case the focus was not on grid while invoking a preview? In my case, when I first discovered this problem, the grid was on a pageframe, but it has a focus. The grid was a Job Viewer, I press the Run button on a form, then it moves focus back on the grid (in a code) and then executes steps for each job. I found the offending code and was trying to suggest my colleague to look at it, but it was very hard to convince her to look at this problem, so I just changed the special app. I created a session class for this app and this solved the problem. It also was a good idea, because originally all tables were opened in the same session, as a form, and it caused some problems. I had weird problems with another application, where the scan on the table didn't work (again the grid alias was selected instead), so I solved this problem the same way - I've created a session class for this application too.

If you want, send me a request to my work address (click on the envelope) and I will send you the program, which I use for creating session class. It's simple. Once I invented this approach, I used it successfully in at least 3 applications so far.

>
>>The report is based on another table (or cursor), not the RecordSource for the >grid table. This is the condition, the error will show its ugly face. If you >can not replicate it, I would say: "Lucky you!" :)
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform