Hi All,
I have a built an application to manage the report-subscription on my ReportServer.
I'm having some troubles with retrieving the subscription properties.
My problem:
I can retrieve all my propertie except the schedule definition, when I deserialize it, the Sceduledefenition.Item always returns null.
I use the next code to deserialize it:
//////////////////////////////////////////////////////////////////////////////////////////////////////
private XmlAttributeOverrides GetSchedule()
{
XmlAttributeOverrides xmlAttrOverride = new XmlAttributeOverrides();
XmlAttributes XmlAttr = new XmlAttributes();
XmlAttr.Xmlns = false;
xmlAttrOverride.Add(typeof(ScheduleDefinition), XmlAttr);
xmlAttrOverride.Add(typeof(MinuteRecurrence), XmlAttr);
xmlAttrOverride.Add(typeof(DailyRecurrence), XmlAttr);
xmlAttrOverride.Add(typeof(WeeklyRecurrence), XmlAttr);
xmlAttrOverride.Add(typeof(MonthlyRecurrence), XmlAttr);
xmlAttrOverride.Add(typeof(MonthlyDOWRecurrence), XmlAttr);
xmlAttrOverride.Add(typeof(DaysOfWeekSelector), XmlAttr);
xmlAttrOverride.Add(typeof(MonthsOfYearSelector), XmlAttr);
return xmlAttrOverride;
}
private ScheduleDefinition DeserializeScheduleDefenition(string MatchData)
{
XmlAttributeOverrides xmlAttrOverride = GetSchedule();
XmlSerializer ser = new XmlSerializer(typeof(ScheduleDefinition),xmlAttrOverride);
Stream stream = new MemoryStream(System.Text.Encoding.Default.GetBytes(MatchData));
stream.Position = 0;
return (ScheduleDefinition)ser.Deserialize(stream);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I'have tried almost everything, but could not find the solution.
Please, this is very important for me, so every tip or shared thought could be very helpfull.
Thnx in advance
I have done some of investigation on this problem again and came up with the next weird thing:
When I create the subscription with my own application everything works well, so the subscription is added to the list in REPORTMANAGER.
when I use my own application to retrieve the properties of the subscription everything goes well also.
But now it comes:
When I update the subscription with my own application, the subscription is updated well also. (I use the SetSubscriptionProperties() method of reportingservices2005)
If I go to the reportmanager to edit my subscription I can see that my function updated the subscription well.
BUT when I retrieve the susbscription properties with my own application I get the Problem I wrote about in the original post.
AND when I edit the susbscription with the reportmanager and I retrieve the properties again, it goes all OK again. AND VICE VERCA If I update it with my OWN application, I get the problem again.
This is very weird for me to understand, am I doing something wrong with the SetSubscriptionProperties() method
OR am I doing something wrong with the GetSubscriptionProperties() method.
Hopefully somebody can help now with this issue.
|||This posting is about same problem and has some suggestions: http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/e2df8bbce14df692/b9276e2c55fca249
No comments:
Post a Comment