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.
Unfortunately, activation email could not send to your email. Please try again.

REportviewer in Modal

Thread ID:

Created:

Updated:

Platform:

Replies:

128172 Jan 5,2017 09:21 PM Jan 8,2017 11:37 PM ASP.NET MVC 3
loading
Tags: ReportViewer
jaime
Asked On January 5, 2017 09:21 PM

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

thanks in advance

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

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 10:59 AM

Thanks for the example, it's perfect

Yuvaraj Devarajan [Syncfusion]
Replied On January 8, 2017 11:37 PM

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.

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.

;