error in heading

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  reporting services   » error in heading

error in heading

Topic RSS Feed

Posts under the topic: error in heading

Posted: 4/9/2012

Padawan 378  points  Padawan
  • Joined on: 4/3/2012
  • Posts: 189

i m using this 

expression

 

=Code.ReportHeading1(ReportItems!textReportHeading1.value)

 

but when i run report it gives me error like #error

 


Posted: 4/9/2012

Padawan 234  points  Padawan
  • Joined on: 3/3/2011
  • Posts: 62

ssrsnew, when you send a question in like this, without seeing the code that you are referencing, I don't think anyone on the planet can help?


tags code

Posted: 4/10/2012

Jedi Master 2811  points  Jedi Master
  • Joined on: 2/19/2010
  • Posts: 406

And probably the data that ReportItems!textReportHeading1.value represents as well.


Posted: 4/10/2012

Padawan 378  points  Padawan
  • Joined on: 4/3/2012
  • Posts: 189

alright,

 

this is my custome code in report

 

for that expression.

 

Private curTranId As Integer = Int32.MinValue
Private curPortId As Integer = Int32.MinValue
Private ret As String = Nothing
Private cHeading1 as Object


Protected Overrides Sub OnInit()
cHeading1 = nothing
End Sub



Public Function LumpComments(TranId as Integer, PortId as Integer, Comment as String) as String
If curTranId = TranId and curPortId = PortId Then
If Not String.IsNullOrEmpty(Comment) Then ret = ret & CHR(10) & Comment
Else
curTranId = TranId
curPortId = PortId
ret = Comment
'If Not String.IsNullOrEmpty(Comment) Then ret = Comment Else ret = Nothing
End If
Return ret
End Function

Public Function GetReportHeading1(ReportHeading1 as Object) as String
if ReportHeading1 is nothing
return cHeading1
else
cHeading1 = ReportHeading1
return cHeading1
end if
End Function

Dim StyleSheetHash As System.Collections.Hashtable

Public Function InitStyleSheet()

Dim xmlDocument As System.Xml.XmlDocument = New System.Xml.XmlDocument()
xmlDocument.LoadXml(Report.Parameters!StyleSheetXML.Value)
Dim rootNode As System.Xml.XmlElement = xmlDocument.SelectSingleNode("StyleSheetInfo")

StyleSheetHash = New System.Collections.Hashtable()

For Each a As System.Xml.XmlAttribute In rootNode.Attributes
StyleSheetHash.Add(a.Name, a.Value)
Next

End Function


Public Function StyleSheetValue(StyleSheetValueName As String) As String

If (styleSheetHash Is Nothing)
InitStyleSheet()
End If

If (StyleSheetHash.ContainsKey(StyleSheetValueName))
Return StyleSheetHash(StyleSheetValueName)
End If

Return Nothing

End Function

 

 

now let me know why it is not working


Posted: 4/12/2012

Padawan 234  points  Padawan
  • Joined on: 3/3/2011
  • Posts: 62

ssrsnew, you make this call: =Code.ReportHeading1(ReportItems!textReportHeading1.value)

but in your code you have: Public Function GetReportHeading1

Have you tried: =Code.GetReportHeading1(ReportItems!textReportHeading1.value)


Page 1 of 1 (5 items)