Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i've generated a running total (DeliveryQty) for my report but i cant get it to display the way i wanted it to.

 

DeliveryQty = Sum of Quantity of the same item with different PONo

 

here is the pic of the report that i currently have now..

 

columns: ItemNo LotNo PartNo PONo Quantity DeliveryQty

http://lyfe.dysorder.org/work/report.gif

 

for the first row of Item 1, the DeliveryQty (the rightmost row) should display just 20,000, instead of 18,000 and 20,000.

 

this is what i've designed to get the above image, after reading the MSDN..

http://lyfe.dysorder.org/work/report%20design%20copy.gif

 

all help will be appreciated!

 

-ashrobo

 

p/s: hope the pictures are useful..

Posted

What you need to do is create a formula like so:

 


global dblTotal as double

dblTotal = dblTotal + {YourTableNmae. DeliveryQty}

formula=dblTotal

 

Then place this field on your report instead of the DeliveryQty one

My website
Posted (edited)
What you need to do is create a formula like so:

 


global dblTotal as double

dblTotal = dblTotal + {YourTableNmae. DeliveryQty}

formula=dblTotal

 

Then place this field on your report instead of the DeliveryQty one

 

this doesn't work, what i got to achieve is to put the total quantity on the first line of the items.

 

for eg.

ItemNo PONo Quantity DeliveryQty

1 X123 1,000 3,000

X345 2,000

Edited by ashrobo
Posted

Just looking back at your original post, it would appear that although you want to sum the delivery qty you have a grouping by item number, which will bring back two records for item 1 with two different po numbers.

 

Remove the po field from your query as this info is not required as you are only interested in the delivery qtys.

 

***********

Forget that, just got out of bed and read your post again...doh

 

The formula way should work fine for what you want to achieve with a running total

My website
Posted
Just looking back at your original post, it would appear that although you want to sum the delivery qty you have a grouping by item number, which will bring back two records for item 1 with two different po numbers.

yes, this is what i want to do.

 

Remove the po field from your query as this info is not required as you are only interested in the delivery qtys.

*forgetting about the above*

 

The formula way should work fine for what you want to achieve with a running total

what i want to do is to get a total for the individual items with different po numbers.

 

-ashrobo

Posted

Yes I understand you.

 

OK if you have two rows returned for example and you want to see a running total then the formula field approach I mentioned earlier will work.

My website
Posted
the formula field approach gives me the running total without any resetting for different items. or did i use the wrong word "running total" here? it's just the total for individual items..
Posted
OK, if you want the 'running total' to be specific to each new item group include another global variable in the formula to store the previous items id. On the next call check that the item ids still match, if they don't reset the dblValue to 0 to start a new running total.
My website
Posted
OK, if you want the 'running total' to be specific to each new item group include another global variable in the formula to store the previous items id. On the next call check that the item ids still match, if they don't reset the dblValue to 0 to start a new running total.

that's what i thought of too, but i dont know how to store the previous item id and thought it might not even be possible in CR. any clues?

 

million thanks.. :)

-ashrobo

Posted

Try this:

 


Global dblTotal As Double
Global intPreviousID as Number

If intPreviousID <> {YourTableNmae. itemID} Then

  intPreviousID = {YourTableNmae. itemID}
  dblTotal = 0

Else

  dblTotal = dblTotal + {YourTableNmae. DeliveryQty}

End If

formula=dblTotal

My website

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...