We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

REportviewer in Modal

Thread ID:

Created:

Updated:

Platform:

Replies:

128172 Jan 6,2017 02:21 AM UTC Jan 9,2017 04:37 AM UTC ASP.NET MVC 3
loading
Tags: ReportViewer
jaime
Asked On January 6, 2017 02:21 AM UTC

Hi is it posible to show the reportviewer in a modal or dialog?

thanks in advance

Yuvaraj Devarajan [Syncfusion]
Replied On January 6, 2017 08:59 AM UTC

Hi Jaime, 

Thanks for contacting Syncfusion support.    
    
We can render the ReportViewer control in Dialog box/ modal as shown in the below code example and rendered output screenshot is shown below,    

<script> 
    function openDialog() { 
        $("#dialog").ejDialog("open"); 
    } 
</script> 
 
<body> 
    @{ 
        Html.EJ() 
            .Button("button") 
            .Text("Open Report") 
            .Type(ButtonType.Button) 
            .ClientSideEvents(evt => evt.Click("openDialog")) 
            .Render(); 
    } 
 
    @{ 
        Html.EJ() 
            .Dialog("dialog") 
            .Title("Dialog") 
            .ShowOnInit(false) 
            .MinWidth("800px") 
            .Height("700px") 
            .MinHeight("750px") 
            .ContentTemplate(@<div style="width:100%; height:100%; position:absolute;"> 
                @(Html.EJ().ReportViewer("reportsample") 
                .ProcessingMode(Syncfusion.JavaScript.ReportViewerEnums.ProcessingMode.Local) 
                .ReportServiceUrl(VirtualPathUtility.ToAbsolute("~/api/ReportApi")) 
                .ReportPath("~/App_Data/GroupingAggregate.rdlc") 
                 ) 
             </div>) 
            .Render(); 
     } 
           
</body> 
 
<style type="text/css"> 
    html, body { 
        overflow: hidden; 
        padding: 0; 
        margin: 0; 
        height: 100%; 
        position: static; 
    } 
 
    #reportsample { 
        width: 750px; 
        height: 700px; 
        position: absolute; 
    } 
</style>* 

 

We have prepared a sample and it can be downloaded from, 

Please refer to the UG documentation link to create ReportViewer and Dialog box sample in ASP.NET MVC,    

Regards, 
Yuvaraj D. 


jaime
Replied On January 6, 2017 03:59 PM UTC

Thanks for the example, it's perfect

Yuvaraj Devarajan [Syncfusion]
Replied On January 9, 2017 04:37 AM UTC

Hi Jaime, 

Thanks for the update. We are happy to hear that your issue is resolved. 

Regards, 
Yuvaraj D 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;