Automatically pop up the Data Tab New Items Dialog
RB7.02 D6 End User report explorer
On a new report my users would like the designer to default to the
Data tab with the "New Items" dialog automatically displayed since in
end user reporting that is almost always what they do first.
I assume I have to modify ppdesigner (already have for other
purposes). Where would I be best to put this?
Many thanks,
Rick Matthews
Dartek Systems Inc.
On a new report my users would like the designer to default to the
Data tab with the "New Items" dialog automatically displayed since in
end user reporting that is almost always what they do first.
I assume I have to modify ppdesigner (already have for other
purposes). Where would I be best to put this?
Many thanks,
Rick Matthews
Dartek Systems Inc.
This discussion has been closed.
Comments
Whenever a template is loaded, the active page is set to Design.
Use the Report.Template.OnLoadEnd event to select a different page. The
TppDesigner.NoteBook property provides access to the Delphi TPageControl
object. The PageControl.SelectNextPage method can be used to navigate
forward and backward.
ppDesigner1.Notebook.SelectNextPage(True); // forward
ppDesigner1.Notebook.SelectNextPage(True); // backward
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I am using the report explorer and the OnLoadEnd event doesn't fire on
a new template - but the OnNew does.
However doing that gives me the following issues and questions:
1) If in OnNew I do 'ppDesigner1.Notebook.ActivePageIndex := 0;' then
the designer opens up at the data tab but if I close without saving
and then do it again I get a cannot focus a disabled or invisible
window exception. If I change tabs first everything is fine.
2) I also want to pop up the new items dialogue automatically (to
choose query wizard or query designer)- but only on first activation
of the designer for a new report. I have a custom copy of ppDsgner
for other purposes but if I add an OnActivate I get the version issue
(Unit raClcDlg was compiled with a different version of
ppDsgner.TppDesignerWindow).
Any help would be appreciated.
Cheers,
appreciated.
Cheers,
Please do not wait 3 weeks between posts and please do not assign deadlines
to me. I do not typically look at old threads, just happended to see this
one today.
Please keep in mind that you are trying to implement something that
ReportBuilder was not designed or tested to do. I am not saying it cannot be
implemented, I honestly do not know - it is unkown territory.
User interface programming is extremely timing sensitive. I think that is
primarily what you are encountering here. There are only two ways I know to
change the active page of a TPageControl - set the ActivePageIndex or use
the SelectNextPage method. I recommended using the SelectNextPage method
because I think I recall that it fires the OnChange and OnChanging events -
which the designer uses internally to configure the workspace.
Timing wise, you might need to use the OnShow event to configure things.
The TppDesigner object supports OnActivate and OnShow events. I do not
recommend using OnActivate, because this fires usually fires too
frequently - it fires if the window becomes inactive and then active again.
If you prefer modifying the source code you can use the WMActivate or
WMShowWindow methods - these are the Window message equivalents of the
OnActivate and OnShow events. Internally the TppDesignerWindow in general
does not use the Delphi TForm events, it leaves these available for the
component user (i.e. you).
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I was not aware that there was a time limit on threads. My news
reader highlights all threads with new unread posts. After a pause of
how many days should I start a new thread?
I didn't (mean to) assign a deadline to you - I told you of my
deadline and asked for help
Thank you for your pointers, I will give them a try.