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.

 All Forums
 Other Forums
 Other Topics
 RDL2

Author  Topic 

OBINNA_EKE
Posting Yak Master

234 Posts

Posted - 2010-12-30 : 06:37:31

Public Shared Function ManageVisibility(ByVal fieldName As String, ByVal xmlParameterValues As String) as Boolean

Dim objXMLDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument()
Dim counter
Dim objNodeList As System.Xml.XmlNodeList
Dim node As System.Xml.XmlNode
objXMLDoc.LoadXml(xmlParameterValues)

counter = 0
objNodeList = objXMLDoc.getElementsByTagName("UserColumn")

If objNodeList.count > 0 then
For each node in objNodeList

if Trim$(objNodeList.item(counter).Attributes.getNamedItem("UserColumnName").value) = Trim$(fieldName)
return False
end IF
counter = counter + 1

Next
return True
End If

End Function


Public Shared Function GetFriendlyHeader(ByVal fieldName As String, ByVal xmlParameterValues As String) as String

Dim objXMLDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument()
Dim counter
Dim objNodeList As System.Xml.XmlNodeList
Dim node As System.Xml.XmlNode
objXMLDoc.LoadXml(xmlParameterValues)

counter = 0
objNodeList = objXMLDoc.getElementsByTagName("UserColumn")

If objNodeList.count > 0 then
For each node in objNodeList
if Trim$(objNodeList.item(counter).Attributes.getNamedItem("UserColumnName").value) = Trim$(fieldName)
return objNodeList.item(counter).Attributes.getNamedItem("UserColumnFriendlyName").value
end IF
counter = counter + 1

Next
return "Not Found"
End If

End Function
**************
<ReportParameter Name="UserColumnFilterBlock">
<DataType>String</DataType>
<Nullable>true</Nullable>
<Prompt>UserColumnFilterBlock</Prompt>
</ReportParameter>


If it is that easy, everybody will be doing it

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-12-30 : 08:46:38
Is there a question here?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

fahim1234
Starting Member

7 Posts

Posted - 2011-01-04 : 12:50:36
WHATS WRONG WITH THE CODE I MIGHT BE ABLE TO HELP ... U LOOK AT MY CODE AND HELP ME TOO

tyutyu
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-04 : 14:00:49
Don't shout.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -