Page 1 of 1

Expression to only include information in report

Posted: 20 Jan 2022, 15:05
by Barlow81
Hi,

I have designed a report and want to write an expression to only include certain cost codes. I have just used....

PROJECT_COST_CODE.REFERENCE="ELEC20"OR
PROJECT_COST_CODE.REFERENCE="ELEC30"OR
PROJECT_COST_CODE.REFERENCE="ELEC99"OR
PROJECT_COST_CODE.REFERENCE="ENG20"OR
PROJECT_COST_CODE.REFERENCE="ENG30"OR
PROJECT_COST_CODE.REFERENCE="ENG99"OR
PROJECT_COST_CODE.REFERENCE="MAN20"OR
PROJECT_COST_CODE.REFERENCE="MAN30"OR
PROJECT_COST_CODE.REFERENCE="MAN99"

but when i send report to excel the ones i don't want come up as 0.00000 and ones i do come up as 0.00001.
I want the report to still should the text as above but only the ones above no others.

Please help.

Re: Expression to only include information in report

Posted: 20 Jan 2022, 15:47
by Barlow81
I have now tried the below. Which still doesn't remove the lines without this text but does show the text now not a number.

PROJECT_COST_CODE.REFERENCE LIKE ("ENG20")

Re: Expression to only include information in report

Posted: 21 Jan 2022, 11:31
by brucedenney
As you want the report in Excel, I suggest that you consider doing the report in excel and extracting data via ODBC

If you want to attach the report/layout to a reply, I can have a look and see what is going on.

Re: Expression to only include information in report

Posted: 21 Jan 2022, 12:07
by Barlow81
Thank you for your reply. I think i have now solved this using the expression....

Startswith(PROJECT_COST_CODE.REFERENCE,"ELEC20")

Re: Expression to only include information in report

Posted: 21 Jan 2022, 14:38
by brucedenney
Just remember to be careful about your project names

Startswith(PROJECT_COST_CODE.REFERENCE,"ELEC20")

Would match with lots of other values that start with ELEC20 eg ELEC200 ELEC20A ELEC2000 ....