Friday 20 June 2008

Converting Reporting Services (SSRS) rdl from 2005 into 2000

If you want to convert a SSRS rdl from 2005 to 2000, you can try the following

1) Open the .RDL file in a text editor and change the XML.
2) Change the first node to look like this

Report xmlns=”http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition” xmlns:rd=”http://schemas.microsoft.com/SQLServer/reporting/reportdesigner”


3) Do a search for “Interactive” You should find 2 nodes InteractiveWidth and InteractiveHeight. You need to delete these nodes.

4) The XML in the RDL file is different between 2005 and 2000 when you want to pass parameters to a SQL procedure.
In 2000 they pass parameters this way in the RDL file(note I used &lt for the symbol:

&lt Query&gt
&lt CommandType&gt StoredProcedure&lt /CommandType&gt
&lt CommandText&gt =”procGetInvMovement”&lt /CommandText&gt
&lt QueryParameters&gt
&lt QueryParameter Name=”@BegDate”&gt
&lt Value&gt =Parameters!pBegDate.Value&lt /Value&gt
&lt /QueryParameter&gt
&lt QueryParameter Name=”@EndDate”&gt
&lt Value&gt =Parameters!pEndDate.Value&lt /Value&gt
&lt /QueryParameter&gt
&lt /QueryParameters&gt
&lt DataSourceName&gt JLG SQL&lt /DataSourceName&gt
&lt /Query&gt

and in 2005 they do it this way:

&lt Query&gt
&lt rd:UseGenericDesigner&gt true&lt /rd:UseGenericDesigner&gt
&lt CommandText&gt =”Execute procGetInvMovement ‘” & Parameters!pBegDate.Value & “‘, ‘” & Parameters!pEndDate.Value & “‘”&lt /CommandText&gt
&lt QueryParameters&gt
&lt QueryParameter Name=”pBegDate”&gt
&lt Value&gt =Parameters!pBegDate.Value&lt /Value&gt
&lt /QueryParameter&gt
&lt QueryParameter Name=”pEndDate”&gt
&lt Value&gt =Parameters!pEndDate.Value&lt /Value&gt
&lt /QueryParameter&gt
&lt /QueryParameters&gt
&lt DataSourceName&gt JLG SQL&lt /DataSourceName&gt
&lt /Query&gt

Notice how they don’t include the parameters in the commandtext tag in 2000

5) In to the 2000 version of the .RDL file. You will need to add this line:
&ltCommandType&gtStoredProcedure&lt/CommandType&gt
after the first &ltQuery&gt tag.

THIS IS NOT SUPPORTED SO I WOULD BACKUP YOUR REPORTS BEFORE ATTEMPTING THIS AND USE THIS ADVICE AT YOUR OWN RISK.


3 comments:

Anonymous said...

Hi, thank you vewry much for that workaround.

There's one more thing to change.
If there is a node "custom properties" you have to delete this node as well.

TY Again,
Christopher

Amar said...

Hi,

i have a tool that converts 2008 rdl to 2005 to provide backward compatibility. Please contact on my email : amarsale@gmail.com

Thanks & Regards,

Amar Sale

Amar said...

Please visit the downloads section of APPLYBI.COM to get information about the tool for converting 2008 rdl (SSRS Report) to 2005