locked
Dynamic RDL(SSRS) file Generation RRS feed

  • Question

  • I have created .rdl file using C# Asp.Net Core dynamically.

    Problem i am facing while loding report in ReportViewer is .rld files's DataSet is not Initialized. or Dataset fields are not refreshed.

    I want a solution that how to Initialize or refresh Dataset fileds dynamically whenever .rdl file is created.

    I followed bellow link to create .rdl file dynamically 

    https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms170239(v%3dsql.105)

    Waiting for your response.

    Thanks in Advance

     

    Thursday, December 20, 2018 11:00 AM

All replies

  • I would strongly recommend against building an RDL by hand. There really is no reason. Create the RDL on the SSRS instance directly or use RDLC to do it on the client. The rest of this is just academic. Also note that the documentation you're referencing is archived meaning it is either out of date or not supported anymore. There doesn't seem to be any documentation for doing this in newer versions probably because it doesn't make sense. What is the business case for programmatically building a report vs just using RDLC or storing the report on the server?

    In lesson 4 you can see the interlinked elements being put together. The data source is created first with the connection string to your database. A dataset is created inside the Datasets element. The dataset is given a name needed later by the report. The query is defined that uses the data source name.  The query element is added to the dataset which hooks everything up. If you open a valid RDL file you can see the actual format.

    <DataSets>
       <DataSet Name="MySet">
          <Query>
             <DataSourceName>MyDS</DataSourceName>
             <QueryParameters />
          </Query>
       </DataSet>
    </DataSets>
    

    Later the dataset is referenced (by name) in the Tablix that uses it. Given the dataset SSRS has the information needed to generate the data.



    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, December 20, 2018 3:11 PM
  • Hi Manisha K Chauhan,

    Thank you for posting here.

    According your post, your question is more related to ASP.NET core, please post in the following forum.

    https://forums.asp.net/1255.aspx/1?ASP+NET+Core

    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    Best regards,

    Jack J Jun.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 21, 2018 7:54 AM