Showing Preview in Designer.
Hi
We are trying to show the preview page in the designer window and deny
access to the designer page itself for low level users by hiding the TabSet
and changing the ActivePage of the Notebook page control.
This is not working, the Preview page contains nothing, not even a blank
report. Something that gets fired off between tabs obviously isn't firing.
What do I need to do, or rather what am I doing wrong? Is there a better
way of doing this?
We are trying to show the preview page in the designer window and deny
access to the designer page itself for low level users by hiding the TabSet
and changing the ActivePage of the Notebook page control.
This is not working, the Preview page contains nothing, not even a blank
report. Something that gets fired off between tabs obviously isn't firing.
What do I need to do, or rather what am I doing wrong? Is there a better
way of doing this?
This discussion has been closed.
Comments
creating the object.
--
Ed Dressel
Team DM
still want to show the designer displaying the preview page first. Is this
possible?
In my testing with the following code in the OnShow event of the
TppDesigner, the designer opened with the preview tab selected successfully.
procedure TForm1.ppDesigner1Show(Sender: TObject);
begin
ppDesigner1.Notebook.ActivePage := ppDesigner1.Notebook.Pages[1];
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
nothing, not even a blank report. I need to click the Design tab and then
the Preveiw tab to get it to show the preview. Something that gets fired
off between tabs isn't firing.
for Delphi 2007, the report is generated and displayed properly in the
preview tab using the exact code I gave in my previous post.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'm sorry, I do not have older versions of ReportBuilder available to test
with and this is not a known issue with RB 9.03. You might try taking a
look at the 9.03 source to see the order of opperations before the tab is
changed to Preview and perhaps mimic that in your own code when you change
the tab manually. Or consider upgrading to RB 10.06 for Delphi 6.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Found a solution. Copied ppDsgner.pas, renamed unit and TppDesiignerWindow,
moved the SetPageActive procedure from Private to Public and used
ppRegisterForm. I was then able to modify your OnShow solution as follows:
with MyDesigner, NoteBook do
begin
Allow := True;
TppDesignerWindow(Form).SetPageActive(ActivePage, False, Allow);
ActivePage := FindNextPage(ActivePage,True,False);
TppDesignerWindow(Form).SetPageActive(ActivePage, True, Allow);
end;
However, I do have a fresh problem now in that when I add raIDE to the uses
clause to show the Calc tab it wont compile stating "Unit raClcDlg was
compiled with a different version of ppDsgner.TppDesignerWindow". Any
suggestions how I can get past this last hurdle?
Since we do not provide the source code to RAP, you cannot change the
Interface sections of any of the ReportBuilder source files and still use
the RAP functionality. You will either need to disable RAP or find another
way to call the routines you need without changing the Interface section.
Take a look in the source for public routine that calls SetPageActive that
you could possibly use.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com