Jump to content
We've recently updated our Privacy Statement, available here ×

Variable Expression Assistance


mmedici

Recommended Posts

I have an existing report that i am trying to modify.

Basically i work for a manufacturing company and this report lists the items on hand, items needed per order, and the last column displays if we are over or short for the item.

Meaning a customer orders say 20 basketballs, i have 15 on hand, so i am 5 short.

 

I have the variable expression below subracting the columns so i konw if i am over or short, but i am trying to modify the report so it just shows me the items i am short. 

Any assistance would be appretiated.

Code:
<variable name="STK_RTOT" class="java.lang.String" resetType="Group" resetGroup="ITMREF_0" incrementType="Group" incrementGroup="SOHNUM_0" calculation="Sum"><variableExpression><![CDATA[$F{TOTSTK} - $V{STK_CNT}]]></variableExpression><initialValueExpression><![CDATA[0]]></initialValueExpression></variable>
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Well, i want to start by saying that i am not a database guy so forgive me if my response here is lacking.

 

the database i am trying to connect to is an oracle database. this entire report is written with variable expressions, and i am afraid if i modify it as you stated i will be essentially recreating the entire report correct?

 

i would prefer to avoid that if possible.

Link to comment
Share on other sites

just tried changing it to the below code but it said it couldn't read the expression.

 

<variable name="STK_RTOT" class="java.lang.String" resetType="Group" incrementType="Group" incrementGroup="SOHNUM_0" resetGroup="ITMREF_0" calculation="Sum">

<variableExpression><![CDATA[WHERE $F{TOTSTK} - $V{STK_CNT} < 0]]></variableExpression>

<initialValueExpression><![CDATA[0]]></initialValueExpression>

</variable>

Link to comment
Share on other sites

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...