Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jabin
Starting Member
3 Posts |
Posted - 2007-04-18 : 10:32:08
|
I have a need to repeat many times in a given report an action where I can jump to report with a set of parameter values supplied. Rather than cut and paste dozens of times I thought I'd set this up as a function. I'm having trouble doing this. Would appreciate any help.Here's where I call the custom code<ReportName>CTRecDetail</ReportName><Parameters>=Code.GetEmbeddedSetUp(Parameters!FldName2.Value)</Parameters></Drillthrough>I want it to return the series of xml tabs that would insert the code needed, e.g. I need to have it look like:<Parameter Name="ID"><Value>=Fields!ID.Value</Value></Parameter><Parameter Name ="FromDateTime"><Value>=Fields!FromDateTime.Value</Value></Parameter>.........and many more, some of which would involved the IIF(Parameters!SortBy.Value="MRN", "Fields!SortBy.Value, "") ....etc.Here's the custom function. ---Note I have tried three versions of creating a variable called ParameterSet to return. None seem to work. I keep getting an error message in Visual Studio that the element Parameters in namespace......has incomplete content....list of possible elements expected parameter. Shared Function GetEmbeddedSetUp(ByVal ColumnLoc As String)Dim ParameterSet As String'ParameterSet = <Parameter Name="ID"><Value>=Fields!ID.Value</Value></Parameter>'ParameterSet = "<Parameter Name="ID"><Value=Fields!ID.Value></Value></Parameter>"ParameterSet = "<Parameter Name="'ID'"><Value>=Fields!ID.Value</Value></Parameter>"Return ParameterSetEnd FunctionAppreciate any help. Thanks, Jim |
|
|
|
|