none
Report viewer - Export MS report data to excel with formula RRS feed

  • Question

  • At present we are working on Reporting application. Our application generates various reports using MS reports(.rdlc). To display the reports I am using

    ReportViewer(Microsoft.Reporting.WinForms.ReportViewer) in windows form.

    To export the report data we are uisng Export functionality of report viewer. In reports we are displaying data in table format (having rows and columns). Also groupwise displaying the summation of one column called 'Total'. To display the total price we are using textbox in .rdlc with expression =sum(Fields!TotalPrice.Value). TotalPrice is the field of the data source to the report.

    My question is when I export the report data to Excel it exports the report data corectly. But it does not export the data with the summation formula for the column 'Total' in excel. My requirement is after export if user do any modification to the data of column 'Total' the sum total price should be automatically calculated using the formula I have in my report(.rdlc).

    Technologies we are using:
    - Visual studio 2008
    - .Net framework 3.5 SP1
    - MS reporting(.rdlc)

    Any help with respect to solve this problem is really helpfull to me and my team.

    Thanks in advance.

    Rajendra Sabat

    • Moved by Kira Qian Friday, January 8, 2010 5:49 AM (From:Windows Forms General)
    Thursday, January 7, 2010 1:09 PM

Answers

  • Hi Rajendra,

    Thanks for your post.

    The default Excel render doesn't support to convert experssions in the report into excel formulas. Instead, it evaluates it during report precessing and export the evaluated expression to Excel cell.

    The Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer class is a sealed class and can't be customized.

    From searching from web, I found that someone is trying to write a custom excel renderer to support formula:
    http://cre4ssrs.codeplex.com/SourceControl/changeset/view/27658

    But not sure if it works.

    If you want this feature in the future releases, you'd better to submit an enhancement request through http://connect.microsoft.com site.

    Hope it helps.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    • Marked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:44 AM
    • Unmarked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:46 AM
    • Marked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:46 AM
    Tuesday, January 12, 2010 11:23 AM
    Moderator

All replies

  • Hi Rajendra,

    Winform Report control is served on “Visual Studio Report Controls ” forum (http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/threads/ ). I will move the thread to that forum. Hope you can get some helps on that forum.

    Sincerely,
    Kira Qian
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:45 AM
    • Unmarked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:45 AM
    Friday, January 8, 2010 5:48 AM
  • Hi Rajendra,

    Thanks for your post.

    The default Excel render doesn't support to convert experssions in the report into excel formulas. Instead, it evaluates it during report precessing and export the evaluated expression to Excel cell.

    The Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer class is a sealed class and can't be customized.

    From searching from web, I found that someone is trying to write a custom excel renderer to support formula:
    http://cre4ssrs.codeplex.com/SourceControl/changeset/view/27658

    But not sure if it works.

    If you want this feature in the future releases, you'd better to submit an enhancement request through http://connect.microsoft.com site.

    Hope it helps.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    • Marked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:44 AM
    • Unmarked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:46 AM
    • Marked as answer by Rajendra Sabat Wednesday, January 13, 2010 5:46 AM
    Tuesday, January 12, 2010 11:23 AM
    Moderator
  • Hi Hongye,

    Thank you very much for your reply. Definitely it will help me to proceed further.

    I have downloaded custom excel renderer  from the link that you have suggested.  I will try it to use. Hope it will help me.


    Thanks again.




    Tuesday, January 12, 2010 7:31 PM
  • Hi Rajendra,

    I just read your forum now, because now i am crossing this situation in my project. i dont have any idea about the formula render from rdl file to excel when exporting.

    Hope you have done successfully this, if you completed this, please help me.. i just download the custom excel renderer  code seems it is not opening properly in my machine,

    i am waiting for your answer.

    Thanks for advance.

    Thanks

    Latha

     

    Tuesday, April 27, 2010 5:05 AM
  • Hello,
       for exporting ms report data to excel with formula, I use a c# excel component to slove the problem, it's named Spire.XLS.
    Friday, August 13, 2010 6:52 AM