Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

RDLC Report - having 2 datasets and avoiding redundant rows

Posted on by 5,124

I Created an RDLC report via VS.  It has two datasets with diff set of rows.  e.g., Sales Line Table and Sales Comments whereby Sales Line has 5 rows and Comments has 6 rows.  Now I know RDLC will flatten out these datasets so now I will end up with 11 rows in the Sales LIne table with 6 rows being blank.  There must be a way to show two diff tables in the Report.  Table 1 will display 5 rows of Sales LIne and Table 2 will display 6 rows.  Help! I am reading something about using rectangles but I am not quite sure where to begin with that.  Thank you much in advance.

*This post is locked for comments

  • mbr Profile Picture
    mbr 5,124 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    Thank you Krishna! That worked! :)

  • Suggested answer
    ksundeep87 Profile Picture
    ksundeep87 800 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    Hi,

    Check the below link which demonstrates how to connect SQL database from visual studio and create reports.

    https://www.youtube.com/watch?v=DnD1-mAKSz4 

    Can you mark it as Verified Answered if you are ok with our suggestions.

     

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    Normally the hide property of the row does not work properly i suggest to use filters or create groups.

  • mbr Profile Picture
    mbr 5,124 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    Thanks Krishna.  I will certainly try that.  Incidentally, can you please send a link on how to create a dataset within VS Studio using reporting services?  It would be a great option as well.  Thank you much.  If we create  data set within VS Studio, is it easy to deploy as well.  So far, if I compile the Report as fob, then that's all I have to export into production.

  • Verified answer
    ksundeep87 Profile Picture
    ksundeep87 800 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    Hi,

    I mean add Dataset by designing Report by using Reporting Service Visula Studio or Report Builder not from NAV Report Layouts.

    I use VS Reporting Services alot as its very flexible to fetch data across different applications and create report as NAV Layouts have few limitations.

    But still NAV Layouts are too good in many ways.  

    If you want to view data for specific DataItem its very simple just Identify the Key of the data item and update ROW Groups properties.

    Add a Table and Fields relevant to DataItem to avoid confusion, you need to update Row Group Properties like

    REP-grouping.JPG

    to group Sales Comment Line added all the Primary Key fields on Group Expression. Repeat same for all the 3 DataItems in your scenario Sales Header, Sales Line and Sales Comment Line. 

    REP-grouping.JPG

    Run the report you will find the data exactly matching your records from Table.

    REP-Output.JPG

    On report level any properties like PrintOnlyIfDetail,Indent or DataItemLink can modify the output. 

  • mbr Profile Picture
    mbr 5,124 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    In the Detail Page, I want to show the 5 rows of Sales Lines as that's coming from the sales Line data item.  Then following that, I want to show the 6 rows of Sales Comments.

    Currently, even when I am hiding the rows by adding an expression in the Hide property of the row, it blanks out but the rows are not suppressed.  I would get a page and a half of blanks...then it shows the 6 lines from Sales Comments.  I basically created two tables I VS.  HOw do you use filter or groups to achieve what I want to achieve?

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    What is your requirement, yes the data will be brought over to the report in that way and  you have to use the filters or use groups to identify different lines of the dataset.

  • mbr Profile Picture
    mbr 5,124 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    yeah. the problem is when it goes to VS, they are flattened, so to speak.  So it acts like a Union or concatenation.  if you have 5 recs in sales line and 6 in comment line, you will end up with 11 rows in a dataset.  Unless I am not creating the datasets correctly.  I create them from the Report designer via dataitems.  Wrong?

  • mbr Profile Picture
    mbr 5,124 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    i created three data items.  The parent one is the Sales header, then two indented data items for sales line and sales comments.  They both have the same level hierarchy.

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: RDLC Report - having 2 datasets and avoiding redundant rows

    How did you create the datasets ?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans