RDLC Invoice Report : how to add matrix to Sales Invoice

gtrgtr Member Posts: 131
edited 2013-03-13 in NAV Three Tier
Hello,

New to rdlc & Visual studio to make Dynamics Nav Reports, Visual studio is not very self explaining.
I need to modify the Sales Invoice to insert after Invoice Lines and Vat details a table with specific data concerning the invoice lines.

I populated a specific table in the Sales Invoice Line OnAfterGetRecord and added a new integer dataitem with the 2 columns I need
On Visual Studio I added a new matrix control and inserted the 2 columns in the matrix line

But the result is surprising - If the code populated lets say 2 lines in the table :
xxx | 10
yyy | 15
I get printed 5 empty lines and then 2 lines with same data as this :
---
---
---
---
---
xxx 10
xxx 10

As you see yyy | 10 was not printed.

I can't find a good documentation on the way to insert this kind of table data.
Can somebody help me to find a solution or some nice documentation ?
Thanks!

Answers

  • davmac1davmac1 Member Posts: 1,283
    Since the data passed to the report is flat, if you are creating these as more rows, then you could add a tablix to the layout and it will only print the selected lines.
    Remember, this is Visual Studio, and there are lots of books, online documentation, and helps on Visual Studio.
    This is the beauty of the new reporting system - we are now tied into the Visual Studio release cycle with huge updates in technology and functionality with every new release!

    (Classic report designer has not changed in a long, long time.)
  • gtrgtr Member Posts: 131
    Hello and thanks for the answer

    But this will not help me a lot
    There may be many books & helps on Visual studio, but as I searched and did not find anything that could help me I hoped that you would know about some Visual Studio - Dynamics links related to the subject of this post.

    Since the data passed to the report is flat, if you are creating these as more rows ...
    Perhaps my english is not good enough but I don't know what you mean.
    As I told you, I create the data in the Sales Invoice Line OnAfterGetRecord Trigger and I think this data should be available (as some of the data appear when printing, but not all of them).

    I'm working on a french Visual Studio so I am not sure about translations.
    But I tried 2 ways to get a solution :
    In the Tool Box I choosed "Table" and "Matrice" (between the Line Tool and the Rectangle tool)
  • gtrgtr Member Posts: 131
    There is definitly something I misunderstand - let me explain :

    To isolate the problem I deleted all code that populates the specific table in the report. I put in manually some values.

    The result is that nothing of this data is printed.

    So It seems to me that I do not understand the methode how to integrate data from a new table in an existing report !

    My (false) methode is :
      to add an integer dataitem (at the end just before the Total dataitem) to put a setrange on this dataitem with the count fonction (as done on all the other dataitems) on layout / rdlc : insert a tablix, keep only the data row (2columns) from the Data of Report (Ctrl-Alt-D) I drag & drop the 2 columns

    Is there somebody who can tell me whats missing ?
  • davmac1davmac1 Member Posts: 1,283
    Is this NAV 2009 or NAV 2013?
    NAV 2009, the data fields have to be in a section to be passed to Visual Studio layout.
    In NAV 2013, there are no more classic sections, the data is passed from the data items instead as defined in the dataitem layout.
    Have you studied the NAV 2013 reports training manual? While it is not perfect, it covers a lot of different reporting scenarios and is your best link between NAV and Visual Studio reference material.
    It may only be available in English.
  • gtrgtr Member Posts: 131
    Hello,

    This is NAV 2013

    I had some reading and now I have a better understanding of the way data are passed to Visual Studio (flat)
    The thing I did not see before is the GetLine function to loop through my specific data.
    Then some filtering and the data appear as I want to.

    So this problem is solved
    Thanks to all of you !
Sign In or Register to comment.