I can't solve problem about showing image into .rdlc
file if datas overflow on 2nd, 3th page.
My .rdlc
file consists of a body and a footer.
Image example :
Red square represent body
, blue square represent footer
and green sqaure represent multiline texbox
(part of body) whoes can overflow to 2nd, 3th page and so on.
In body
I place textbox
(1) which value is base64
string of picture. This textbox is hidden.
Into footer
I place image
(2). Properties of image
which I set are : Select the image source -> Database, Use this MIME type -> image/png and expression for field is =ReportItems!Potpis.Value
.
It's all about signature.
Each record can be signed differently.
Signatures for each record are stored into database
in string
format (converted image
to base64
string
).
The signature (image) is displayed correctly for each record. But, if some record (that multiline text field) has overflowed to the 2nd page, then the image is not displayed onto other pages which are overflowed. Only on the first page of the record.
If I place textbox
(1) into footer
, then signature (image) will be visible on every page, but report
will use only value
from very first textbox
(1), because =ReportItem!FieldName.Value
can't be used for the value
of the textbox
in footer
, but only First(Field!FieldName.Value)
.
That is problem since every record can have different signature, so using ReportParameter
isn't solution.
Report is populated from List(Of MyClass)
.
There is code, in vb, too :
Dim rds As ReportDataSource = New ReportDataSource("rdlcFile", List(Of MyClass))
With rpt1
.LocalReport.DataSources.Clear()
.LocalReport.DataSources.Add(rds) 'datasource -> List(Of MyClass)
.LocalReport.EnableExternalImages = True
Dim nm1 As New ReportParameter("Name1", n1, True) 'value showed on every record, not changeable
Dim nm2 As New ReportParameter("Name2", n2, True) 'value showed on every record, not changeable
Dim tit As New ReportParameter("Tite", t1, True) 'value showed on every record, not changeable
Dim dt As New ReportParameter("DTSada", String.Format("{0:dd.MM.yyyy HH:mm}", DateTime.Now), True) 'value showed on every record, not changeable
.LocalReport.SetParameters(New ReportParameter() {nm1, nm2, tit, dt})
.LocalReport.Refresh()
.SetDisplayMode(DisplayMode.PrintLayout)
.ZoomPercent = 100
.ZoomMode = ZoomMode.Percent
.ShowExportButton = False
.ShowContextMenu = False
.ShowCredentialPrompts = False
.ShowParameterPrompts = False
.ShowFindControls = False
.RefreshReport()
End With
Me.rpt1.RefreshReport()
Does anyone know, or have an idea, how to solve this problem?