Forum Discussion
Alignment issue in Paginated report
Hi All,
I am trying to achieve correct alignment in Powerbi paginated report. As shown in below image the percentage value are not straight aligned . I want that multiple values for single expression to aligned in straight line. Can we achieve this.
Expression used for above textbox is below.
=Code.GetFormatElections(LookupSet(Fields!ActiveElectionsId.Value, Fields!electionid.Value, Fields!CusipShort.Value & "~" & Fields!value.Value, "Elections"))
And custom code used in report properties is :
Public Function GetFormatElections(ByVal items As Object()) As String
Dim str as String
str = ""
For Each line As Object In items
Dim fund as string = split(line, "~").GetValue(0)
Dim percent as integer = split(line, "~").GetValue(1)
Dim percentF as string = format(percent, "F2") & "%"
if (percent > 0) then
str = str & fund & space(20) & percentF & vbCRLF
end if
Next
return str
End Function