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

Saving a report format with another extension?

edited September 2002 in General
Can I save a report format with another extension.

I would like to let that end users can have option
to save them report format with other extensions.

But when the end user click at save button in Designer report,
open a windown with just one option extension to save (*.rtm)

Are there any way to do this?

Thanks

Cristian

Comments

  • edited September 2002
    Hi Cristian,


    ----------------------------------------------
    Tech Tip: Changing Default Template Extension In Open/Save Dialogs
    ----------------------------------------------

    Use the following code to change the default file extensions which will be
    used when the open and save dialogs are created to load or save a template.

    ppReport1.Template.FileExtension := '.mfe';
    ppReport1.Template.FileFilter := 'My Format Extension (*.mfe)|*.MFE';

    Substitute the desired description and file extension.




    regards,
    Chris Ueberall;

  • edited September 2002

    Thanks!

    Cristian

  • edited September 2002
    Please,

    Another question about this.

    I'm not being able to set default extension.

    I create 3 new extension options and I'll use
    ppReport1.Template.FileExtension := '.mfe' to set
    the default extension, but it don't work.

    I think this problem is not with report printer, but with TSaveDialog.

    I think I would resolve this problem if I would can acess
    the FilterIndex property of the TSaveDialog component.

    Thanks again.

    Cristian


  • edited September 2002
    Cristian,

    I just tried the given example and it works very well for me (I used two
    extensions and called the code in the designer's 'OnCreate' event)!
    What does 'but it don't work' mean?
    Don't you see the extensions or will the report be saved with another
    extension?

    regards,
    Chris Ueberall;

  • edited September 2002
    Sorry, I know my engleshe is poor.

    Ok! Look!

    I'm working with 3 type of extensions,

    FileFilter='Report File Gr?fico(*.rtm)|*.rtm|Report File Texto
    40c(*.r40)|*.r40|Report File Texto 80c(*.r80)|*.r80'

    At the SaveDialog those three options appear to be choise. But the default
    option is always *.rtm.
    Sometimes I would wanna alternate the default options.
    To this, I'm setting FileExtension := '.r80', FileExtension := '.r40' and
    so on.

    But the default option is always *.rtm.

    Using SaveDialog directing I would can set FilterIndex := 0, or = 1 and so
    on.

    Thanks,

    Cristian



  • edited September 2002
    Cristian,

    I don't know what's going wrong on your side.
    When I use the given example my reports will be saved with extension 'mfe'.
    Why do you think the default extension would be anyway 'rtm' (since W2K
    Windows supplies a incremental search assistance in the filename editor,
    which will show you existing files having perhaps 'rtm' as extension)?
    Can you exactly describe every step when saving a report to file?

    regards,
    Chris Ueberall;

  • edited September 2002

    Don't care about this.

    I'm going to do by other way.

    Thanks for your devotion.

    Cristian


This discussion has been closed.