Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report works the second time
Message
 
To
28/01/2014 19:30:46
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Mobile
Miscellaneous
Thread ID:
01592505
Message ID:
01592531
Views:
47
Likes (1)
>>Hola Héctor,
>>
>>Are you calling the report from a form with a grid in it? If it is the case, before calling the report take the focus away from the grid, to any object but a grid.
>>
>>Saludos,
>>Hugo
>
>Oh, yeah, Hugo!!! That's exactly the question someone has to ask!
>
>Well, agree with me it is not a honourable way for explaining such behaviour...
>
>Yes, in fact grid is the only control I need... I chose a record (mouse or keyboard) and try to re print a sale note.
>
>I think "try catch" will stay but now I know why my program failed. Now I'll be able to sleep tonight!
>
>Muchísimas gracias, Hugo!

No problem Héctor, Just put myCommandButton.SetFocus() right before REPORT TO and it should solve the problem. You probably have an exit button but if there is nothing at all you could put an invisible (I think it should be visible = .t. but outside the boundaries of the form, like left=-100 to get the focus, as I think visible = .f. will prevent the button to get focus) one just so you can set the focus
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform