Jump to content
JasperReports Library 7.0 is now available ×

Convert Crystal report formula to jasper expression


ajith.devendra

Recommended Posts

Hi Dear,

I'm in the process of moving Crystal reports to Jasper soft Studio .I have below formular  in one of my  crystal reports . What it does . Read a string having "|" marks and split the string to sperate strings after the  "|" mark .  And a carriage return after the "|" -  (CHAR(13))

Input string is like  XXX|YYYY|AAA|BBBB

output

XXX

YYYY

AAA

BBBB

would anyone can help me to convert below formula to Jasper expression .

local stringvar array arr:=Split({Command.LineHsCodes},'|');
local stringvar result:="";
local numbervar start;

if Int(count(arr)) > 0 then
(
  for start:=1 to Int(count(arr)) Do
  ( 
     result:=result + arr[start] + CHR(13);   
  );
);

result;

 

rgds

Ajith 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...