/// <summary>
 ///
 /// </summary>
 /// <param name="templatePath"></param>
 /// <param name="templateName"></param>
 /// <param name="templateDescription"></param>
 /// <param name="generationType"></param>
 /// <param name="configureHandler"></param>
 public ReportGenerationItem(string templatePath,
                             string templateName,
                             string templateDescription,
                             IStaticReportTranslation reportTranslation,
                             ReportGenerationType generationType,
                             ReportGetDataSourceEventHandler getDataHandler,
                             ReportFillParameterEventHandler fillParameterHandler)
     : this(templatePath, templateName, templateDescription, null, null, null, reportTranslation, generationType,
            getDataHandler, fillParameterHandler, null)
 {
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="templatePath"></param>
        /// <param name="templateName"></param>
        /// <param name="templateDescription"></param>
        /// <param name="reportPath"></param>
        /// <param name="reportName"></param>
        /// <param name="reportDescription"></param>
        /// <param name="generationType"></param>
        /// <param name="configureHandler"></param>
        /// <param name="createExportStreamHandler"></param>
        public ReportGenerationItem(string templatePath,
                                    string templateName,
                                    string templateDescription,
                                    string reportPath,
                                    string reportName,
                                    string reportDescription,
                                    IStaticReportTranslation reportTranslation,
                                    ReportGenerationType generationType,
                                    ReportGetDataSourceEventHandler getDataHandler,
                                    ReportFillParameterEventHandler fillParameterHandler,
                                    ReportStreamEventHandler createExportStreamHandler)
        {
            this.templatePath              = templatePath;
            this.templateName              = templateName;
            this.templateDescription       = templateDescription;
            this.reportPath                = reportPath;
            this.reportName                = reportName;
            this.reportTranslation         = reportTranslation;
            this.reportDescription         = reportDescription;
            this.generationType            = generationType;
            this.getDataHandler            = getDataHandler;
            this.fillParameterHandler      = fillParameterHandler;
            this.createExportStreamHandler = createExportStreamHandler;

            if (templatePath == null)
            {
                throw new ArgumentNullException("templatePath", "templatePath cannot be null");
            }

            if (getDataHandler == null)
            {
                throw new ArgumentNullException("configureHandler", "configureHandler cannot be null");
            }

            if (fillParameterHandler == null)
            {
                throw new ArgumentNullException("fillParameterHandler", "fillParameterHandler cannot be null");
            }

            if (generationType != ReportGenerationType.ShowReportInDlg)
            {
                if (reportPath == null)
                {
                    throw new ArgumentNullException("reportPath", "reportPath cannot be null for an export generation type");
                }

                if (createExportStreamHandler == null)
                {
                    throw new ArgumentNullException("createExportStreamHandler", "createExportStreamHandler cannot be null for an export generation type");
                }
            }
        }