Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Field Not Showing up in report Fields

Status
Not open for further replies.

TanmedIT

IS-IT--Management
Nov 6, 2000
53
US
I have a field called ItemCount with the following formula:

If (PreviousIsNull ({ARLINH.Shipqty}))
then
{ARLINH.Shipqty}
else
If ({ARLINH.Docdate} = Previous ({ARLINH.Docdate}) and {ARLINH.Shipqty} = Previous ({ARLINH.Shipqty}) and {ARLINH.Itemkey} = Previous ({ARLINH.Itemkey}))
then 0
else
{ARLINH.Shipqty}

In the detail line it works fine, but when I try to use it in a running total it doesnt show up in the report fields window. I am using CR 7.0.

Any Ideas?
 
Are you trying to get at a total for {ARLINH.Shipqty}? You can use variables to keep track of a running total.

Create a variable in the header section like this (to initialize):
whileprintingrecords;
numbervar total:0

Create a variable in the details section like this (to start adding the amounts):
whileprintingrecords;
numbervar total:=total+{ARLINH.Shipqty}

Create a variable in the report section like this (will display answer):
whileprintingrecords;
numbervar total:=total

Hope this helps.
Angela
 
I am trying to get rid of the duplicates. I have made this formula and it works in the detail line:

If PreviousIsNull ({ARLINH.Shipqty})
then
1
else IF (Previous ({ARLINH.Docdate}) = {ARLINH.Docdate} and Previous ({ARLINH.Itemkey}) = {ARLINH.Itemkey} and Previous ({ARLINH.Shipqty}) = {ARLINH.Shipqty})
then
0
else
1

But when I try to use it in a running total or selection expert, it doesnt show up in the report fields section. If I manually type it in a formula and place it in a group header, the report doesnt run. HEEELLLLPPPP. I just want all the records that have a "1" from this report to be totaled.
 
How to create variable columns in report.....using sql statement thru coding.....not by drag and drop method.....

waiting your reply

your
padam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top