Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print from preview selects wrong area
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00909045
Message ID:
00909067
Views:
15
Thanks Sergey, could you look at the answer to Borislav - we are in the process of renewing our PUTM and it looks like I can't even CC until then.

>Check Forms with Grids and printing reports FAQ #15515
>
>>VFP 8, SP1, Windows XP
>>
>>I can't search now, but I seem to recall there is a problem (and a work around) with the following syntax when the focus is on a grid:
>>
>>select (pcTable)
>>report form (lcReport) to printer prompt preview
>>
>>The form has a pageframe with 10 pages. On each page there is a grid, 9 of them have a local view as a record source, one has a cursor (cursor is created in Load using create cursor...). The cursor is populated by users exporting selected records from the 9 views.
>>
>>To print, users select any numbers of records in the grid, then right click to get a shortcut menu, and select the print option. Selecting records and shortcut menu are part of a gridselect class, essentially a shape covering the grid.
>>The above code to run the report is actually a procedure in the Cleanup of the shortcut menu.
>>
>>The sequence is this:
>>1. the preview is displayed - which means we are on the corect area at this point
>>2. click on the printer in the print preview toolbar
>>3. the print prompt is displayed
>>4. click on OK to print
>>5. we get the error 'Variable XXX is not found' (where XXX is actually a field name in the cursor that is used in the report)
>>
>>We log the error and environment at the time of error, and we can see that the pcTable contains the correct alias name, but the currently selected table is NOT the pcTable. It is significant that the selected area is correct at the time of preview, but it is changed between preview and print.
>>
>>We only get the error on the page having the cursor as grid record source.
>>We do NOT get the error when:
>>- preview/print from the 9 pages on local views
>> or
>>- step through the code in Debug
>>
>>There is no timer, and no filter on any table.
>>The report calls one UDF which only formats the date to a specific format, it does not change work areas.
>>
>>TIA
Doru
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform