Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Add group by in ssrs report expression

(1) ShareShare
ReportReport
Posted on by 163
I have 4 lines of this job 2 lines in position and 2 lines in customize table , so now I am creating ssrs report and I added group by job so I get in report 2 lines also in this table I have contarct column and I added 10 , 70 value on it .
I need to get sum of this contract as 80 not 160 How can I do it ? I need column to see only rows in group not all rows 
I tried this way but I got an error
 
 
 
//
//
//
  • Saud Jalil Profile Picture
    34 on at
    Add group by in ssrs report expression
    You should group your data in Data Provider class,
    in X++ you can add group by after Where clause
  • Suggested answer
    Mohit Rampal Profile Picture
    12,558 Moderator on at
    Add group by in ssrs report expression
    Hi Menna, Since its showing double value, the easy work around would be to display half of sum value by dividing by 2. Try below formula in SSRS textbox expression. Otherwise,as Girish mentioned you can handle it in code level as well 
     
    SUM(MAX(Fields!ContractNumber.Value),"JobID")/2
     
    Thanks,
    Mohit
  • Suggested answer
    Community member Profile Picture
    36 on at
    Add group by in ssrs report expression
    Hi Menna,
     
    Instead of changing it in report design - You can control it from the code (Dp class) - Change report table type as regular - Add validation to restrict duplicate records before inserting into a report table.
    At starting of the processReport method use delete_from table to delete the previous records.
     
    Thanks,
    Girish S.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,351 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,029 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans