JasperStudio variable for crystal report

0

Hi Everyone,

I need to convert below crystal report formula in Jasper Studio. Please help.

 

dim ary() as string, formatOK as boolean
formatOK = true
ary = split({?dte_book_dt}, "/")
if ubound(ary) <> 3 then
    formatOK = false
elseif not(isnumeric(ary(1)) and isnumeric(ary(2)) and isnumeric(ary(3))) then
    formatOK = false
end if
if formatOK = true then
    if {?dte_book_dt} = "" or isnull({?dte_book_dt}) then 
        formula = ""
    else
        formula = totext(datevalue(tonumber(ary(3)),tonumber(ary(2)),tonumber(ary(1))),"dd-MMM-yyyy")
    end if
else
    formula = "Date Format should be in DD/MM/YYYY"
end if

 

 

Thanks

Navneet

er.navneetverma's picture
Joined: Aug 18 2018 - 7:49pm
Last seen: 1 month 2 weeks ago

Not being familar with crystal reports, this is not much helpful. Can you specify what are you trying to acheive?

As I understand you are trying to build date out of three integers. Is that correct?

prusyn - 3 months 4 weeks ago

1 Answer:

0

JasperReports only supports 1 line in expression.

hozawa's picture
43019
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 week 8 hours ago
Feedback