I got a problem. Another one with the “new” Visual Studio Report Designer.
I have this report. The dataitem structure is something like this:
Sales Header (Filtered on orders)
Sales Line (Filtered to print only items)
Sales Line (Attached lines related to above sales line)
Comment Lines (Item comment lines related to item on sales line)
Integer (To print a footer)
In the sections I don’t have a section for the Sales Header, as the report is supposed to print a page per Sales Line Item.
When I print the report in the classic client, then it works fine, but when it’s printed from the RTC, then it’s all messed up.
In the VS designer I have created a tablebox for the sales line info. This box prints fine, except if the sales order has more than one line, then it’s only printed once.
The second sales line section is also in it’s own section, but here it’s printing all the lines related to all the item sales lines.
The same happens with the comment lines. Here it also prints all the lines for all items on the sales order.
I have created a many reports in the VS designer, but I have never experienced this and I’m not really sure what is going on. My theory is that it might be related to the fact that I’m not printing the sales header and somehow the data ends being messed up. But I hope that someone else has experienced something similar.
Can you show the Classic sections and RTC Layout…so that we can have an idea…
the output’s also can help…
For the printing too much part, maybe adding some filters? Right click on the table box, go to Properties, then the filters tab. I have had to add filters here when I felt like I shouldn’t have to make things work right.
For the lines that is only printed once, all I can think of is to make sure that it is in a Body row, and not a Table Header or Table Footer.
I too am still getting used to all of the quirks of SQL Reporting.
I don’t think that filtering is enough. Thinking about how the RDL actually works. The datasheet that NAV is sending is actually quite simple and in this case it’s something like (simplified):
Sales Header.Document Type, Sales Header.No., Sales Line.Document Type, Sales Line.No., Sales Line.Description, Sales Line.Quantity, Attached Sales Line.Description, Item Comment.Text etc.
And with all fields available in all lines, then I really don’t understand how the report is able to find the right fields. Like in my case, then a typical sales order has 2 item lines with each 3 attached lines and 4 comment lines. The result is about 18 data rows being sent to the report.
Ok, I found the solution. I had to incorporate a “list” control to bind it all together. In fact it’s done in most of the standard documents, but not when you use the “Create Layout Suggestion” function.