Darren DICK
darrend at nimble.com.au
Mon Jan 23 20:18:50 CST 2006
Hello all I have a nice little function (from DBA Archives :0(( here 'tis Function GetPath(aPath) As String ' Strips the path name from the supplied file and path name ' leaves the trailing slash on there Dim foo As Integer, aSlash As Integer aSlash = 0 foo = InStr(aPath, "\") While (foo > 0) aSlash = foo foo = InStr(aSlash + 1, aPath, "\") Wend If aSlash > 0 Then GetPath = Left$(aPath, aSlash) Else GetPath = aPath End If End Function I have a field on a reporting services report that I want to use this function on So I paste my little function inside a Macro By going to... Macro Explorer MyMacros RightClick Select New Module Enter name of say...modUtils Paste my little function in between Public Module ModUtils and End module Save it all - no obvious errors So far so good Back to RepServices Designer Then for the value of the text box "txtFileName" I put =f_getPath(Fields!FileName.Value) (Originally the value for the text box "txtFileName" was Fields!FileName.Value - all working fine) So when I go to preview I get the error.... C:\Documents and Settings\darrend\My Documents\Visual Studio Projects\Report Project1\Report1.rdl The value expression for the textbox 'Filename' contains an error: [BC30451] Name 'GetPath' is not declared. So...any suggestions? O have I totally gort the RepServices placemet of modules and associated syntaxes wrong? See ya