Options

Nav dataset design in Visual Studio

RoelofRoelof Member Posts: 377
When creating an RDLC report, Is there a way to design the dataset in Visual Studio in stead of using the Report Dataset Designer in the Microsoft Dynamics NAV development environment?
I'm asking because I'm currently trying to convert a RDL report (created by SQL reporting) to a RDL report in NAV. The problem I'm experiencing is the dataset. The dataset is defined in RDL as a query with some code. I tried to duplicate that in creating a dataset in Visual studio in the RDLC report and link it to a Stored Procedure with the same code. The Stored Procedure is stored on the applicable database on the SQL Server. That seems to be working fine. However, NAV is not saving/storing it back into the RDLC report. It looks like NAV can only use the dataset defined in the NAV development environment.
Any ideas?

Roelof de Jonghttp://www.wye.com

Answers

  • Options
    RoelofRoelof Member Posts: 377
    Sorry, I made a typo in my previous post. It should read: convert a RDL report to a RDLC report in NAV.
    Roelof de Jonghttp://www.wye.com
  • Options
    postsauravpostsaurav Member Posts: 708
    Hi @Roelof ,

    I had similar kind of question way back with NAV 2013 R2 when Report Builder was Launched for Developing RDLC Report. Here are some comments that I can remember from that time -

    1. Not Possible.
    2. It happens behind the scene with some DLL ,whose code is with MS.

    If you find something do let me know, the reason is -

    1. How is Microsoft taking care of flow fields?

    2. How is Microsoft taking care of company name as its a part of table name in SQL?

    Best of luck!

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • Options
    RoelofRoelof Member Posts: 377
    Thanks. Pavithrap0992, the shortcut you mentioned is for converting RDLC reports to RDL, not the other way around like I want to do.

    Postsaurav, yeah, it looks like it's not possible. I'll do some more research and keep everyone posted.
    Roelof de Jonghttp://www.wye.com
  • Options
    vaprogvaprog Member Posts: 1,118
    Hi Roelof,

    the clickable link above is truncated and takes you to the most recent version. The Visual Studio 2005 version, as fully typed above has instructions for both ways. Here the complete link:
    https://msdn.microsoft.com/en-us/library/ms252109(v=vs.80).aspx
    (Instructions to all who write posts: There's the chain symbol in the toolbar above the edit box. Use this, rather than letting the site guess)

    I guess it won't help you, though, since the dataset has to be replaced by a dataset provided by the application.
  • Options
    RoelofRoelof Member Posts: 377
    Vaprog: the link you mentioned, is for converting RDLC reports to RDL. I want it to do the other way around. It looks like it's not possible to define a dataset in VS. That can only be designed in the NAV environment.

    I'm currently trying to read the Stored Procedure back into NAV. I'm almost there but I have some difficulties to get the dataset returned. I'm trying to do that with either using a Parameter (it looks like I can't do that with a table as parameter) or using a SQLDataAdapter and do a SQLDataAdapter.Fill(NAV-Table).

    Any ideas anyone?
    Roelof de Jonghttp://www.wye.com
  • Options
    vaprogvaprog Member Posts: 1,118
    Hi Roelof,

    in the link there are subheadings
    RDL-to-RDLC Conversion
    and
    RDLC-to-RDL Conversion

    I'd say, that's both ways.

    What will you do, when you get your data back in some ADO .NET object?
    Why don't you store your dataset in an SQL Table right on SQL server, make that table accessible from NAV, and use it to feed the data back into your RDLC?
  • Options
    RoelofRoelof Member Posts: 377
    It's for Visual Studio 2012. I only see the option 'RDLC to RDL'.

    I can create a dedicated table and feed it back into RDLC but the Stored Procedure is using a temp table. The SP is running through some code and is populating the temp table. The table could be a real table but there are many different SP's with different tasks and fields. I don't want to have a table for each of these SP's rather then to be flexible and use a temp table (declared in the SP itself). I'm currently trying to use the SQLDataReader and SQLDataAdapter dotnets. The SQLDataReader looks promising. I can return the data back in NAV. The SQLDataAdapter has a method 'Fill', which might work as well.
    But it's challenging.

    Roelof de Jonghttp://www.wye.com
Sign In or Register to comment.