I want to modify the existing OrderID column in a report to be a hyperlink. So added the following <Action>
code. But it's throwing the following error. Could someone please help with this. I'm fairly new on working with SSRS Reports.
Thanks in Advance.
Error:
Unhandled Exception: System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: The report definition is
not valid. Details: The element 'Textbox' in namespace
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'
has invalid child element 'Action' in namespace
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'.
List of possible elements expected: 'Style, ActionInfo, Top, Left,
Height, Width, ZIndex, Visibility, ToolTip, DocumentMapLabel,
Bookmark, RepeatWith, CustomProperties, Paragraphs, CanGrow,
CanShrink, HideDuplicates, ToggleImage, UserSort, KeepTogether,
DataElementName, DataElementOutput, DataElementStyle' in namespace
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'
as well as any element in namespace '##other'. at
Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateReport(String
Report, String Parent, Boolean Overwrite, Byte[] Definition,
Property[] Properties, Warning[]& Warnings) at
Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String
Report, String Parent, Boolean Overwrite, Byte[] Definition,
Property[] Properties, Warning[]& Warnings) at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.SqlServer.ReportingServices2005.ReportingService2005.CreateReport(String
Report, String Parent, Boolean Overwrite, Byte[] Definition,
Property[] Properties) at
RdlSync.Repository.RemoteRdlRepository.AddRdl(IRdlFile file) at
RdlSync.Controller.RdlReconciler.Sync(Boolean commit, Boolean useMd5,
Boolean force) at RdlSync.Program.Main(String[] args)
.RDL file code:
<Body>
<ReportItems>
<Rectangle Name="RectMain">
<ReportItems>
<Tablix Name="tblMainReport">
<TablixBody>
<TablixCell>
<CellContents>
<Textbox Name="orderID">
<Action>
<Hyperlink>="javascript:window.location='QuickSearch.aspx?searchType=1&amp;searchValue=" & Fields!OrderId.Value & "'"</Hyperlink>
</Action>
</Textbox>
</CellContents>
</TablixCell>
.....</TablixBody>
....
</ReportItems>
</Body>
My links look like this:
This may be your problem, as indicated by this line in the error:
I personally like to limit direct editing of
.rdl
code as much as possible, and use the Design tab in Visual Studio to modify the file instead. I've found that changing the XML can be very error prone if the structure isn't perfect, so I save it as a last resort.To fix the XML structure, you'll have to do something like this:
If you must edit the code directly, you will most likely find the report definition to be very useful, which is linked in the error. It links to this page which tells you the schema, i.e. the rules of how the RDL needs to be structured.