Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Show Data Tab and firing menu option on New Report from Explorer

edited August 2003 in End User
I was wondering if it is possible (preferrably via one of the ppDesigner
events) to set the active page to the Data and firing of the New menu option
to display the data wizards and templates dialog box first when a user
creates a new report from the explorer.

I would like to prompt my users to create (or select) their data before they
go into the design page of the report.

Regards,

Jarrod

Comments

  • edited August 2003
    Here is an example which launches the query designer before the designer is
    shown and assign the query the user just created:
    http://www.digital-metaphors.com/tips/CreateQueryBeforeShowDesigner.zip

    In the OnShow event of this demo, you should also be able to access the DADE
    menu items and trigger the click event for file new. You can access the
    designer menu directly with TppDesigner.Menu at runtime.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2003
    Thanks Jim, very handy... but isn't quite what I am looking for. Let me
    explain myself a little better.

    I have an end-user reporting tool using the report explorer. Very similar to
    your end-user demos and tutorials with a custom explorer used.

    I would like to show the data tab (not the data designer) and popup the "New
    Items" dialog that contains the data wizard, query designer and my custom
    data templates tab.

    I only want to show this when creating a new report not when re-designing or
    changing an existing report. In this case I want it to function as normal
    and go to the report design tab.

    Is there a flag I could use on the OnShow Event of the ppDesigner that will
    let me know if it is creating a new report from scratch or not?

    Any ideas?

  • edited August 2003
    In the example I sent, use only the OnShow event handler code and then
    change the code in the button click to do this too:

    ppDesigner1.Show;

    ppDesigner1.Menu.Items[0].Items[2].Click;


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2003
    But how do I know in the OnShow event if the user is creating a new report
    or not? Is there a flag I can check?

  • edited August 2003
    If the designer is being shown, then that is going to be each time the user
    launches the designer. The designer is going to load the report that gets
    connected through the Designer.Report property. If you have multiple report
    components on the form and you are letting the user hook the report to the
    designer, then you can determine if they are loading a report or showing it
    for the first time with an empty report. You can force a new report by
    calling Report.Template.New. You could also determine if the user loaded a
    template by using the Report.Template.OnLoadEnd public event.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.