Solved

Microsoft Report Builder 3 - Running total of non unique feilds

Posted on 2013-11-03
1
699 Views
Last Modified: 2013-11-18
I have a report from a production system written with MS Report Builder 3 that I need to load into a ERP (with the ability to run a SQL script beforehand).  The report from the production system has some records with identifiers that are not unique and before I load into the ERP I would like to add a trailing digit to make them unique.  The trailing digit is the count of each instance (ie first instance is 1, second is 2 etc)

Data:

Record/Volume
A1/100
A2/50
A2/75
A3/200

Required data
Record/Volume
A11/100
A21/50
A22/75
A31/200

Ideally I would like to do this in MS Report Builder if possible because there are a lot of other moving parts in the current SQL script.

Is it possible to somehow get a count or the like in each row of the Report Builder report?  I have tried but am getting aggregate function errors.

Thanks
0
Comment
Question by:froodox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
Nico Bontenbal earned 500 total points
ID: 39620838
You can use the RowNumber function for this. See http://technet.microsoft.com/en-us/library/ms159225%28v=sql.100%29.aspx.
Because you want to restart the count for every new value of the Record field, you need to create a group for this field, and use the name of that group as the scope for the RowNumber function. See the attached sample report. Assuming the fields are named Record and Volume, and the group for the Record field is named Record, the expression would be:
=Fields!Record.Value & RowNumber("Record") & "/" & Fields!Volume.Value

Open in new window

RowNumber.rdl
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question