or
To prevent possible data loss before loading the designer, the following errors must be resolved:
Value cannot be null. Parameter name: instance
this
.compareCityAvgReport.PlotArea.YAxis.AutoScale =
false
;
this
.compareCityAvgReport.PlotArea.YAxis.LabelStep = 1;
this
.compareCityAvgReport.PlotArea.YAxis.AddRange(0, 100, 10);
this
.compareCityAvgReport.PlotArea.YAxis.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.ChartValueFormat.Percent;
this
.compareCityAvgReport.PlotArea.YAxis.Appearance.CustomFormat =
"#%"
;
this
.compareCityAvgReport.PlotArea.YAxis2.Visible = Telerik.Reporting.Charting.Styles.ChartAxisVisibility.True;
this
.compareCityAvgReport.PlotArea.YAxis2.AutoScale =
false
;
this
.compareCityAvgReport.PlotArea.YAxis2.AddRange(0, 100, 10);
this
.compareCityAvgReport.PlotArea.YAxis2.Appearance.Color = System.Drawing.Color.Black;
this
.compareCityAvgReport.PlotArea.YAxis2.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.ChartValueFormat.Percent;
this
.compareCityAvgReport.PlotArea.YAxis2.Appearance.CustomFormat =
"#%"
;
Instances of this error (1) | |||
|
|||
at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes) at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner) at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo) at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host) |
private
void
detail_ItemDataBound(
object
sender, EventArgs e)
{
var item = sender
as
ReportItemBase;
var foo = ((
string
)item.DataObject[
"Foo"
]);
var subReport = item.ChildElements.Find(
"SubReport1"
,
true
).FirstOrDefault()
as
SubReport;
if
(foo==
"Bar"
) {
var fooReport =
new
FooReport();
subReport.ReportSource = fooReport;
}
else
{
// etc...
}
}