Esempio n. 1
0
        private void InitValues()
        {
            ICustomReportItem cri = null;

            try
            {
                cri = RdlEngineConfig.CreateCustomReportItem(_Type);
                object props = cri.GetPropertiesInstance(_Draw.GetNamedChildNode(_ReportItems[0], "CustomProperties"));
                pgProps.SelectedObject = props;
            }
            catch
            {
                return;
            }
            finally
            {
                if (cri != null)
                {
                    cri.Dispose();
                }
            }
        }
Esempio n. 2
0
        private void SetCustomReportItem(PropertyDescriptorCollection pdc)
        {
            ICustomReportItem cri = null;

            try
            {
                string t = _Draw.GetElementValue(this.Node, "Type", "");

                cri = RdlEngineConfig.CreateCustomReportItem(t);

                _custom = cri.GetPropertiesInstance(_Draw.GetNamedChildNode(this.Node, "CustomProperties"));
                TypeDescriptor.CreateAssociation(this, _custom);

                PropertyDescriptorCollection bProps =
                    TypeDescriptor.GetProperties(_custom, true);

                foreach (PropertyDescriptor p in bProps)
                {
                    // create our custom property descriptor and add it to the collection

                    pdc.Add(p);
                }
            }
            catch
            {
            }
            finally
            {
                if (cri != null)
                {
                    cri.Dispose();
                }
            }

            return;
        }