473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Deserialize matchData in sql reporting services 2005

I have a XML string that was part of a subscription's matchdata... this is
serialized as XML and I need to deserialize it back to a scheduledefinition
object, I tried the following but it doesnt work! It returns a schedule
definition object that has a start date of 1/1 and a null item recurrence...
any idea why this doesnt work? I saw a lot on SQL 2000 having problems with
this but the ones I tried also didnt work! Thanks!

here is the code I used... this is in VB.NET 2005

Private Shared Function GetScheduleOverrides() As
Xml.Serialization.XmlAttributeOverrides

Dim Attoverride As New Xml.Serialization.XmlAttributeOverrides

Dim Attrs As New Xml.Serialization.XmlAttributes()

Attrs.Xmlns = False

Attoverride.Add(GetType(ReportServer.ScheduleDefin ition), Attrs)

Attoverride.Add(GetType(ReportServer.MinuteRecurre nce), Attrs)

Attoverride.Add(GetType(ReportServer.WeeklyRecurre nce), Attrs)

Attoverride.Add(GetType(ReportServer.MonthlyRecurr ence), Attrs)

Attoverride.Add(GetType(ReportServer.MonthlyDOWRec urrence), Attrs)

Attoverride.Add(GetType(ReportServer.DaysOfWeekSel ector), Attrs)

Attoverride.Add(GetType(ReportServer.MonthsOfYearS elector), Attrs)

Return Attoverride

End Function

''' <summary>

''' Deserializes match data back into a scheduled definition

''' </summary>

''' <param name="matchData"></param>

''' <returns></returns>

''' <remarks></remarks>

Public Shared Function DeserializeMatchData(ByVal matchData As String) As
ReportServer.ScheduleDefinition

' deserialize schedule

matchData = matchData.Replace("True", "true")

Dim buffer As New
IO.MemoryStream(System.Text.Encoding.Default.GetBy tes(matchData))

buffer.Position = 0

Dim xmlDeSerializer As New
Xml.Serialization.XmlSerializer(GetType(ReportServ er.ScheduleDefinition),
GetScheduleOverrides)

Return DirectCast(xmlDeSerializer.Deserialize(buffer),
ReportServer.ScheduleDefinition)

End Function
Mar 14 '07 #1
0 1979

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Woody Splawn | last post by:
I am asking this question here because I asked this question in the Reporting Services Newsgroup and did not get an answer. Does anyone know if Reporting Services is intended to work in a...
1
by: iThinkData | last post by:
Should these 3 items, .Net 2.0 Website, SQLServer 2005, Reporting Services 2005. all reside on the same computer? I know that the website issues a configuration error saying it can't find...
1
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio...
3
by: joeB545 | last post by:
I am an Access developer considering using vb.net 2005 to develop a database application. What options are available for creating reports in vb.net 2005 in the various versions, such as Stardard...
1
by: Roy | last post by:
Hey all, This came up in a meeting and I can't find any firm answers online, so I figured I'd come to you. :) Essentially, what's the difference between VS 2005 Crystal Reports and SQL Server 2005...
1
by: yhafeez1 | last post by:
We are in the process of doing a side by side installation of the SQL server 2000 and SQL server 2005 on the same server. To install the Reporting services feature of SQL server 2005 requires IIS....
3
by: =?Utf-8?B?Sm9uIEphY29icw==?= | last post by:
We use SQL Server 2000 We user VS 2005 How can we use SQL Server reporting Services? Thanks,
3
by: Blasting Cap | last post by:
I'm using VS 2005, SQL 2005 reporting services. SQL reporting services is working, and I have it both on my local computer, as well as on a server. I've created a report in the SQL Business...
0
by: Michael Burgess | last post by:
Hi there, I have a problem that's beginning to do my head in and hope someone can help!!! I've got a SQL Server 2005 database which is partly encrypted (certain columns per table are...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.