C1.C1Report Namespace > C1Report Class : InitializeParametersDialog Event |
'Declaration Public Event InitializeParametersDialog As DialogEventHandler
public event DialogEventHandler InitializeParametersDialog
Reports that have a PARAMETERS clause in their DataSource.RecordSource property show a dialog where the user can enter report parameters.
This event fires before the dialog is displayed and allows you to customize the dialog by changing its caption, font, colors, etc.
You can also use this event to inspect and modify parameter values using the DialogEventArgs.Parameters collection.
Finally, you can use the DialogEventArgs.ShowDialog property to prevent the component from showing the parameters dialog.
private void c1Report1_InitializeParametersDialog(object sender, C1.C1Preview.C1Report.DialogEventArgs e) { // change parameter values ReportParameterCollection p = e.Parameters; p["TheString"].Value = "east"; p["TheNumber"].Value = 12; p["TheDate"].Value = DateTime.Now; p["TheBool"].Value = true; // don't show dialog e.ShowDialog = false; }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2