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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display only one row.

Status
Not open for further replies.

akanj

Programmer
Nov 13, 2004
3
US
Hi,

I am trying to pull the data from the report the data is getting fine but, I am running into some problems as it is getting the data in all the columns same except the one where I have the length as different. I want to display the two records as one and the length as the total of the two records.Example of the data I am getting.

363405 21 19247 MP2O 2 420 M0011 MD I
363405 21 19247 MP2O 2 2695 M0011 MD I

This is what I want.
363405 21 19247 MP2O 2 3115 M0011 MD I

Also I want to subtotal the length value everytime this value changes "M0011" for this account value 363405.

363405 21 19247 MP2O 2 420 M0011 MD I 1000
363405 21 19248 MP2O 2 420 M0011 MD I 1000
------------------------------------
subtotal by M0011 2000
Any help is apprecaited.
Thanks.
 
For these problems you will need 3 groups in your report. The uppermost one would contain the field that has sample value of M0011, the middle group would contain all other fields except for that with sample values of 420 and 2695. That single field would go to the third group.
Now for your first problems you need a summary column in the middle group to find sum of the bottom-group field. For the second problem you need sum of the "1000" field in the uppermost group.
 
Hi Nagornyi,

I tried your suggestions, but I am having a problem with the data coming as cumulative sum.

Here is what I did.

1st group I have is for state column

2nd group is for the M0011 value column

3rd group is for the values of all columns except the one on which I want to sum.

4th group is for the feild for which I am trying to do sum.

I created a summary column in the third group based on the feild in the fourth group and try to run the report. I noticed that it is doing cumulative sum of the data.

example of the data
For State of DC

363405 01 15908 MP2O 2 1000 W0000 DC I
363405 01 15910 MP2O 2 1000 W0000 DC I
----
I am summing based on W0000 2000
----

For state of MD

363405 21 19053 MP2O 2 420 M0011 MD I
363405 21 19053 MP2O 2 2695 M0011 MD I
---
It is coming as this value 5115
---

Actually I am looking for this value.

For State of DC

363405 01 15908 MP2O 2 1000 W0000 DC I
363405 01 15910 MP2O 2 1000 W0000 DC I
----
I am summing based on W0000 2000
----
For State of MD

363405 21 19053 MP2O 2 3115 M0011 MD I
-----
3115

Any help is appreciated on this.

 
Hi Nagornyi,

Thanks a lot for your help. It did work.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top