configuring environmentsettings in code
Hi,
I currently try to configure the EnvironmentSettings in my code before I open the ReportDesigner, unfortunately it does not work as intendend.
1.) I only have to configure it once on startup and the settings will be applied whenever I open the designer. Is this correct?
ShowInTaskbar doesn't work, the designer is not shown there and when minimized it still won't appear there.
Edit: I called settings.PreviewSettings.ShowInTaskbar = true; instead of settings.DesignerSettings.ShowInTaskbar = true; so this works now, so only the question below is relevant any longer.
2.) I have my own report format which contains the fastreport report. I load the data from database and open the designer from memory. When the designer gets closed I don't want it to ask me if i want to save the data instead I wan't it to pass the new report back to my program so I can handle the rest.
I hope you can help me thanks in advance.
I currently try to configure the EnvironmentSettings in my code before I open the ReportDesigner, unfortunately it does not work as intendend.
1.) I only have to configure it once on startup and the settings will be applied whenever I open the designer. Is this correct?
var settings = new EnvironmentSettings();
settings.ReportSettings.ShowProgress = true;
settings.ReportSettings.ShowPerformance = true;
settings.DesignerSettings.DefaultFont= new Font("Segoe UI", 10);
settings.PreviewSettings.ShowInTaskbar = true;
settings.CustomSaveDialog += SettingsOnCustomSaveDialog;
settings.CustomSaveReport += SettingsOnCustomSaveReport;
ShowInTaskbar doesn't work, the designer is not shown there and when minimized it still won't appear there.
Edit: I called settings.PreviewSettings.ShowInTaskbar = true; instead of settings.DesignerSettings.ShowInTaskbar = true; so this works now, so only the question below is relevant any longer.
2.) I have my own report format which contains the fastreport report. I load the data from database and open the designer from memory. When the designer gets closed I don't want it to ask me if i want to save the data instead I wan't it to pass the new report back to my program so I can handle the rest.
I hope you can help me thanks in advance.
Comments
I solved the problem: