I would like to allow user to modify report layout.
How could I add format and report menu into my top level menu?Somebody asked this same question yesterday. Here is what I do:
Is there any way by which we can include system toolbars (for reports) in the application ?
Hello,
1.) Create a new menu -- and then use the quick menu option from the "menu" bar.
2.) Delete all bars except for File, Edit, View and name the menu something like ReptMenu.
3.) In your application you can then run the following code when somebody selects to modify a report:
cReport=alltrim(cReportname)+'.frx'
IF file(cReport)
** need to put view menu up for adding text etc to report.
PUSH Menu _msysmenu
DO ReptMenu.mpr
MODIFY report (cReport)
** now go back to system menu when editing is done
POP Menu _msysmenu
ELSE
=dialog('Warning','Can not file file '+alltrim(cReport)+' to modify.','Report File Not Found')
ENDIF
4.) It is not perfect (there are dome options on the view menu which you don't want and I have run into errors if the user does exit the report modify screen by using the "proper" closing method (X box), but all in all seems to work.
Kevin