views:

124

answers:

1

I have a requirement of generating the rdl in runtime. so I converted the http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition xsd to class and I need to create object for Report class with that it has lot of classes. I am struggling in the report generation using objects

I dont know how to assign values

[System.Xml.Serialization.XmlAnyElementAttribute()] [System.Xml.Serialization.XmlElementAttribute("Author", typeof(string))] [System.Xml.Serialization.XmlElementAttribute("AutoRefresh", typeof(uint))] [System.Xml.Serialization.XmlElementAttribute("Body", typeof(BodyType))]

private ItemsChoiceType37[] itemsElementNameField;

Please help me.

A: 

It is something like

List items = new List(); List itemChoices = new List();

//Author items.Add("Author name"); itemChoices.Add(ItemsChoiceType37.Author);

items.Add(description); itemChoices.Add(ItemsChoiceType37.Description);

//Width items.Add("11in"); itemChoices.Add(ItemsChoiceType37.Width);

. . .

Report report = new Report(); report.Items = items.ToArray(); report.ItemsElementName = itemChoices.ToArray();

I hope it may help you

Muthu Kuppusamy