Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report preview issue
Message
From
30/07/2007 13:34:48
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244625
Message ID:
01244664
Views:
18
>>Yes, indeed, I have an error in the calling procedure:
>>
>>TRY
>>EXECSCRIPT(EVALUATE(THIS.AliasName + ".reSettings"),THIS.oFormInfo)
>>CATCH TO loError
>>FINALLY
>>ENDTRY
>>
>>There is an error, and even I don't display the error (it's not crucial), the program writes to the screen. This is awkward. What can I do about this?
>
>Christian,
>
>Try in Execscript to add SET TALK OFF + CHR(13) + Chr(10) + the rest of the command. EXECSCRIPT is running in its own environment and the SET TALK may be ON as well as some other settings may be different from your current settings.
>
>Also why you're not reporting the error? Are you sure evaluate produces a correct string?

"SET TALK OFF" inside the execscript does not change the behavior. If EXECSCRIPT runs in its own environment, why would the report preview see settings of that environment? I am not sure what is happening here.

The execscript contains a dynamic procedure that is created during closing of the form and contains all value settings on the form. It is a report form class that automatically restores the last user settings. The approach is very generic.
The code looks like this:
LPARAMETERS toFormInfo
toFormInfo.Cntoptionsoutput.cbo.VALUE = [Preview]
toFormInfo.ItemsOrUsers.cbo.VALUE = [Report items per user or group]
toFormInfo.UserOrGroups.cbo.VALUE = [Users]
toFormInfo.SelectGroups.SetRecord(62500938)
toFormInfo.SelectUsers.SetRecord(-1)
toFormInfo.SelectItems.SetRecord(-1)
So it may happen that either the first opening of the screen does not have any code in it, hence the error "Parameter statement not found", or when we remove a control on the form for example, the old settings may not all be valid anymore.

So any errors in that procedure are of no concern.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform