>I have a simple report which runs within an application. The application has a print button and a preview button in the toolbar.
>
>Pressing the print button prints the report correctly to the printer. Pressing the preview button displays the report correctly to the screen. Pressing the print button while previewing the report, returns no lines of data printed on the printer.
>
>Some analysis of the problem shows that the current active cursor changes. I show the active cursor on the report. I have tried to force the active cursor to be correct by adding a function to an object at the beginning of the report. This for some reason still doesn't work.
>
>Does anyone have any ideas? I have two other applications which run the same pre-code leading to the print statement which run fine.
Is the current focus on the form you call this from on a grid? Clicking a button on a toolbar does not remove the focus from wherever the form currently has control.