Exemple #1
0
        void SetParameters(ReportParameter[] parameters)
        {
            bool changed = false;

            if (parameters != null)
            {
                for (int i = 0; i < parameters.Length; i++)
                {
                    if (grdrpt.Parameters.IndexByName(parameters[i].Name) == -1)
                    {
                        grproLib.IGRParameter parameter = grdrpt.Parameters.Add();
                        parameter.Name = parameters[i].Name;
                        changed        = true;
                    }
                    //else
                    grdrpt.ParameterByName(parameters[i].Name).AsString = parameters[i].Value.ToString();
                }
                if (changed)
                {
                    grdrpt.SaveToFile(FullReportTemplateFileName);
                }
            }
        }