Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Microsoft Report Builder 3 - Running total of non unique feilds

Posted on 2013-11-03
1
Medium Priority
?
705 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 2000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

705 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