Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8318569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:01:06+00:00 2026-06-08T22:01:06+00:00

Report viewer in .net have excellent built in export feature with support for different

  • 0

Report viewer in .net have excellent built in export feature with support for different export formats like word , pdf and excel. For the managers in my asp application, I would however like this export functionality to generate a single export file containing multiple rdlc reports, so they can float a single document around and keep drinking coffees!. The reports that need to be exported are dynamically decided based on some business logic.


I found a useful code snippet on a forum to achieve this which Looks good:

    protected void ExportReportsToWord(object Sender, EventArgs e)
    {
        // Variables
        Warning[] warnings;
        string[] streamIds;
        string mimeType = string.Empty;
        string encoding = string.Empty;
        string extension = string.Empty;

        // reportViewer1 and reportViewer2 are reports on my asp.net page
        byte[] bytes1 = reportViewer1.LocalReport.Render("WORD", null, out mimeType, out encoding, out extension, out streamIds, out warnings);
        byte[] bytes2 = reportViewer2.LocalReport.Render("WORD", null, out mimeType, out encoding, out extension, out streamIds, out warnings);

        //create a single byte array out of multiple arrays
        byte[] bytes = (bytes2.Concat(bytes1)).ToArray();

        // Now that you have all the bytes representing the Word report, buffer it and send it to the client.
        Response.Buffer = true;
        Response.Clear();
        Response.ContentType = mimeType;
        Response.AddHeader("content-disposition", "attachment; filename=" + "singleReport" + "." + extension);
        Response.BinaryWrite(bytes); // create the file
        Response.Flush(); // send it to the client to download
        Response.End();

    }

This code complies fine but the exported file with this code still showup only 1 report upon opening up the word document, even though the bigger file size indicates the data is probably in there for the other report too.

Can someone point out what could be the problem? I am open to suggestions on using an entirely different approach as well if it can generate a single word file export out of multiple rdlc reports.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:01:07+00:00Added an answer on June 8, 2026 at 10:01 pm

    A simple solution is to create one large Master report.

    Have list inside each element of which is a sub report.

    Pass parameters to the master report to decide which reports to show, and which to hide.

    This way, user can choose which reports he wants to see, and you get all the features that SSRS provides for a standard report.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net (2.0) page with a crystal report viewer. I use the
I have an ASP.NET page which has report viewer control to access reports from
i'v got a problem with the Report Viewer form .NET 2008. I'ave to get
The report viewer doesn't seem to work in asp.net projects in VS 2010. You
I am using a asp.net webrole project with a report viewer in Azure Reporting.
I am embedding a report into my ASP.NET app using the report viewer control.
I have an Availability Report Viewer control bound to a LinqDataSource: <MyReport:ReportViewer ID=rvAvailabilty runat=server
I have the following situation: Microsoft Report Viewer 2010 is used to display reports
I have an SSRS report that's called up by a page with an ASP.Net
Is there a way to translate the ASP.NET Report Viewer messages, such as Find,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.