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 8940345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:00:48+00:00 2026-06-15T11:00:48+00:00

I have tried to Google my problem, but I have found nothing about my

  • 0

I have tried to Google my problem, but I have found nothing about my problem.

I would like to rename dynamically my reports from Reporting Services when I export them using the ReportViewer. Basically, the format will be reportName + timestamp.

Is there anyway to do that using C# or Reporting Services itself?

Here’s how I include the reportviewer on my pages:

<rsweb:ReportViewer ID="rv" runat="server" ShowToolBar="true" ShowParameterPrompts="false"
    BackColor="#F0F8FF" Height="1200px" Width="100%" ProcessingMode="Remote" EnableViewState="true"
    Visible="false" SizeToReportContent="True">
    <LocalReport EnableExternalImages="True">
    </LocalReport>
</rsweb:ReportViewer>
  • 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-15T11:00:49+00:00Added an answer on June 15, 2026 at 11:00 am

    I solved the problem using a simple method and I hope to be able to help someone with the code below:

        protected void btnCreate_Click(object sender, System.EventArgs e)
        {
            if (ddlExportFormat.SelectedIndex != 0)
            {
                ExportReport(ddlExportFormat.SelectedValue);
                btnShow_Click(sender, e);
            }
        }
    
        private void ExportReport(String format)
        {
            // Variables
            Warning[] warnings;
            string[] streamIds;
            string mimeType = string.Empty;
            string encoding = string.Empty;
            string extension = string.Empty;
    
            string fileName = _reportName +"_"+ DateTime.Now.ToString("yyyyMMdd HH:mm"); 
    
    
            // Setup the report viewer object and get the array of bytes
            ReportViewer viewer = new ReportViewer();
            viewer.ProcessingMode = ProcessingMode.Local;
    
            viewer.ServerReport.ReportServerUrl = new System.Uri(_reportServerUrl);
            viewer.ServerReport.ReportPath = _reportPath;
    
            if (this.PrepareReportParameters())
            {
                viewer.ServerReport.SetParameters(lstReportParameters);
            }
    
    
            byte[] bytes = viewer.ServerReport.Render(format, null, out mimeType, out encoding, out extension, out streamIds, out warnings);
    
    
            // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "attachment; filename=" + fileName + "." + extension);
            Response.BinaryWrite(bytes); // create the file
            Response.Flush(); // send it to the client to download
        }
    

    Credits to http://beta.codeproject.com/Questions/277989/How-to-export-rdlc-report-to-PDF-without-using-Rep

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

Sidebar

Related Questions

I have tried to google for hints on this problem but haven't found anyone
I have tried searching over the internet about this problem but not able to
How to make a sticky footer i have tried on google found some results
I have tried searching on Google and also read the documentation but no success.
I have tried to search for an answer in google, and this site, but
I have google'd it, and tried some examples, but I always get stuck. This
I've tried googling for a solution to this problem but haven't yet found one.
I've seen this syntax show up, and have tried to google for it's definition
I've tried searching all over StackOverflow and Google and I've found ideas that I
I have problem with this exception: Hibernate.HibernateException : Could not create the driver from

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.