Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error when not Browsing first
Message
De
11/12/2020 16:26:03
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01677526
Message ID:
01677533
Vues:
43
>>>>>Hi,
>>>>>
>>>>>I am troubleshooting the following situation.
>>>>>
>>>>>When I call a procedure that creates a cursor and then prints a report based on this cursor, I get error:
>>>>>
>>>>>cannot find variable 'rec_type'
>>>>>
>>>>>REC_TYPE is actually a column in the cursor based on which the report is created.
>>>>>
>>>>>But when - right before I call REPORT FORM .... - I have the command BROWSE (which shows that the column REC_TYPE does exist), I have no problem/no error.
>>>>>
>>>>>The procedure is called from a click on a check box in a grid.
>>>>>
>>>>>Where do you suggest I look for the solution?
>>>>>
>>>>>TIA
>>>>
>>>>Can you access REC_TYPE like ?REC_TYPE w/o browsing?
>>>>Can you access like ?cursorAlias.REC_TYPE and cursorAlias.REC_TYPE in your frx?
>>>>
>>>>If you rename REC_TYPE, just for testing, does it help? At least the ReportBuilder uses this field name.
>>>
>>>I just tried and no problem getting the alias.rec_type value (in a messagebox). But then error again when executing REPORT FORM
>>>So far, I don't want to rename this from REC_TYPE to something different. I get an error, also missing a field, when I run a different report procedure from this check box Click in a Grid.
>>
>>If the form you're doing this from has a grid, make sure to keep the grid from having focus when you run the report. If the grid gets focus, it changes the workarea to its underlying table.
>>
>>Tamar
>
>I think you are on to something. But I need to figure how to "keep the grid from having focus." I am not doing anything to set the focus into the grid. So, how do I keep the focus out?
>Thank you.

force the focus to some other element THISFORM.exitbutton.SETFOCUS() for example. Anything that can receive focus but a grid.
Then SELECT your cursor
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform