Skip to Content
0
Jun 08, 2020 at 09:00 AM

Showing user prompt dates on main report title

172 Views

Hi,

When user runs webi report, prompt asks for two dates:

1). Specify COB From
2). Specify COB Till

I want to show these dates in my report title. So far I have done this formula. I want to add the "st/rd/th" to the dates so YYYY/MM/DD translates to DDth/st/rd Mmm YYYY

My formula is too long and I think I am doing the wrong approach.

="For the period " + If(Right(Right(UserResponse("Specify COB From");2);1)="1") Then Right(UserResponse("Specify COB From");2) + "st" ElseIf(Right(Right(UserResponse("Specify COB From");2);1)="3") Then Right(UserResponse("Specify COB From");2) + "rd" Else Right(UserResponse("Specify COB From");2) + "th " + FormatDate(ToDate(Substr(UserResponse("Specify COB From");5;2);"MM");"Mmm") + " " + Left(UserResponse("Specify COB From");4) + " to " + If(Right(Right(UserResponse("Specify COB Till");2);1)="1") Then Right(UserResponse("Specify COB Till");2) + "st" ElseIf(Right(Right(UserResponse("Specify COB Till");2);1)="3") Then Right(UserResponse("Specify COB Till");2) + "rd" Else Right(UserResponse("Specify COB Till");2) + "th " + FormatDate(ToDate(Substr(UserResponse("Specify COB Till");5;2);"MM");"Mmm") + " " + Left(UserResponse("Specify COB Till");4)

Also I noticed when I export the report to PDF, these dates are missing in my report and just show up blank.

Attachments

capture.png (271.0 kB)