Create report object in ssrs

I have rdl

a runtime generation requirement . so I converted the http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition

xsd class to a class and I need to create an object for the Report class so that it has many classes. I am struggling in generating a report using objects

I don't 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.

-1


a source to share


1 answer


It is something like

List<object> items = new List<object>();
List<ItemsChoiceType37> itemChoices = new List<ItemsChoiceType37>();



//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();

      



Hope this helps you.

0


a source







All Articles