Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Controls Toolbar and Report Designer

Status
Not open for further replies.

androidc

Programmer
May 27, 2003
13
CA
Using our software, users can modify their own reports. However, it seems some of our users have decided to close their Report designer and/or report controls toolbar. If they go back into another report (or the same), the toolbar and the designer are going to be still missing. We've found a solution where we turn off their resource, and it seems by default the designer is displayed.

I'm still curious tho, is there a way to open the Report designer and/or the report controls toolbar programmatically? acti wind something-or-other? :)


 
you could set the entries in your resource file for these toolbars to ReadOnly before you distribute...that way no matter what the user does to those toolbars the preferences won't be saved and the next time they go in the toolbars will be where you put them originally...alternate method is to set the entire Resource file to readonly, but then none of the user's preferences will be saved...not always a bad thing I guess.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Thanks slighthaze

We actually just turn the resource file off while editing the report. What scared me was that then the resource file could be deleted, which, when we do SET RESOURCE ON again, the program crashes because it can't find its resource file. So we USE the resource while editing :)

__resource = SYS(2005)
SET RESO OFF
USE ( __resource ) EXCL IN 0
** edit report
USE IN ( __resource )
SET RESO ON

This way, i suppose, their toolbar locations would not be saved. boo hoo hoo. like you said, not necessarily a bad thing and I won't lose any sleep over that..

But my question remains, as much a curiosity than anything; is there a way to programmatically open the report controls toolbar, or even the report designer, using code? Is it like a VIEW or COMMAND window that can just be activated?

 
I know the code below will work if the system toolbars are up in memory, but if they have already been released I don't know right off hand what you would do to get them to be reinstantiated and shown...not even the system toolbar class provided with VFP (_systoolbars in _app.vcx) has that worked out.

HIDE WINDOW "Report Designer"
HIDE WINDOW "Report Controls"
HIDE WINDOW "Print Preview"

SHOW WINDOW "Report Designer"
SHOW WINDOW "Report Controls"
SHOW WINDOW "Print Preview"


Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top