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. Image for the cookie policy date
Starting in 2019, the Reporting control is no longer included in Essential Studio. If you're experiencing issues with the Syncfusion Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion and appreciate your understanding.

Load xml or rdl file

Hi
We want to load xml or rdl file and make report,
We can't it
could you help me, please explain about structure of xml or rdl file;
we call rdl file that i attache but i have this error:


Inner Exception 1:
InvalidOperationException: <Report xmlns='http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition'> was not expected.

Attachment: 1346841688604370_9f5a31d4.zip

10 Replies

VS Vinoth Srinivasan Syncfusion Team April 30, 2019 12:16 PM UTC

Hi Ham, 
 
Thanks for your interest in our Syncfusion Components. 
 
We can able to run the RDL file in our Report viewer control when adding the Report Service URL, Report Path and processing mode as shown in below code example. 
 
Index.cshtml: 
<body style="overflow: hidden; position: static; margin: 0px; padding: 0px; width: 100%; height: 100%"> 
    <div style="width:100%; height:100%; position:absolute;"> 
        @(Html.EJ().ReportViewer("reportsample") 
            .ProcessingMode(Syncfusion.JavaScript.ReportViewerEnums.ProcessingMode.Remote) 
            .ReportServiceUrl(VirtualPathUtility.ToAbsolute("~/api/RDLReport")) 
            .ReportPath("~/App_Data/134684.rdl")) 
    </div> 
    @(Html.EJ().ScriptManager()) 
</body> 
 
Please find the below help documentation for how to load the local rdl report in MVC Report Viewer control. 
 
We have prepared the simple MVC report viewer sample for your reference and it can be downloaded from below location. 
 
Regards, 
Vinoth S. 



HA ham May 4, 2019 10:51 AM UTC

Hi
thanks for your reply;
my problem is for report designer but your solution was for report viewer;
by the way,
i have data table and i want to load page (report designer page) the whole my data table load on  data source like when connection to Sql;
please tell me where is in sample code i can it;
thanks,


MS Mahendran Shanmugam Syncfusion Team May 6, 2019 11:08 AM UTC

Hi Ham, 

Sorry for the inconvenience caused. 

Please find the below response for your queries. 

query 
Response 
my problem is for report designer  
Please find the below online sample link for how to use the ReportDesigner in MVC application. 

We have prepared the simple sample in MVC5 application and it can be downloaded from below location. 

Note: In above sample we have used the External server for open/edit/save the existing report using External server. 

We are getting the existing reports, datasources and datasets available in our shared application as shown in below code example. If you want to use any other location then we can modify the path accordingly.  
  
ExternalServer.cs:  
  
public override List<CatalogItem> GetItems(string folderName, ItemTypeEnum type)  
        {  
            List<CatalogItem> _items = new List<CatalogItem>();  
            string targetFolder = HttpContext.Current.Server.MapPath("~/") +@"App_Data\ReportServer\";  
  
            if (type == ItemTypeEnum.Folder || type == ItemTypeEnum.Report)  
            {  
                targetFolder = targetFolder + @"Report\";  
                if (!(string.IsNullOrEmpty(folderName) || folderName.Trim() == "/"))  
                {  
                    targetFolder = targetFolder + folderName;  
                }  
            }  
  
            if (type == ItemTypeEnum.DataSet)  
            {  
                foreach (var file in Directory.GetFiles(targetFolder + "DataSet"))  
                {  
                    CatalogItem catalogItem = new CatalogItem();  
                    catalogItem.Name = Path.GetFileNameWithoutExtension(file);  
                    catalogItem.Type = ItemTypeEnum.DataSet;  
                    catalogItem.Id = Regex.Replace(catalogItem.Name, @"[^0-9a-zA-Z]+", "_");  
                    _items.Add(catalogItem);  
                }  
            }  
            else if (type == ItemTypeEnum.DataSource)  
            {  
                foreach (var file in Directory.GetFiles(targetFolder + "DataSource"))  
                {  
                    CatalogItem catalogItem = new CatalogItem();  
                    catalogItem.Name = Path.GetFileNameWithoutExtension(file);  
                    catalogItem.Type = ItemTypeEnum.DataSource;  
                    catalogItem.Id = Regex.Replace(catalogItem.Name, @"[^0-9a-zA-Z]+", "_");  
                    _items.Add(catalogItem);  
                }  
            }  
            else if (type == ItemTypeEnum.Folder)  
            {  
                foreach (var file in Directory.GetDirectories(targetFolder))  
                {  
                    CatalogItem catalogItem = new CatalogItem();  
                    catalogItem.Name = Path.GetFileNameWithoutExtension(file);  
                    catalogItem.Type = ItemTypeEnum.Folder;  
                    catalogItem.Id = Regex.Replace(catalogItem.Name, @"[^0-9a-zA-Z]+", "_");  
                    _items.Add(catalogItem);  
                }  
            }  
            else if (type == ItemTypeEnum.Report)  
            {  
                foreach (var file in Directory.GetFiles(targetFolder, "*.rdl"))  
                {  
                    CatalogItem catalogItem = new CatalogItem();  
                    catalogItem.Name = Path.GetFileNameWithoutExtension(file);  
                    catalogItem.Type = ItemTypeEnum.Report;  
                    catalogItem.Id = Regex.Replace(catalogItem.Name, @"[^0-9a-zA-Z]+", "_");  
                    _items.Add(catalogItem);  
                }  
            }  
  
            return _items;  
        }  
 
i have data table and i want to load page (report designer page) the whole my data table load on  data source like when connection to Sql; 

We don’t have support to load the data table values in Web report designer. But we can able to create the report with data table when using the data extension. We have prepared the simple sample to create the report with web api datasource using data extension in web report designer and it can be downloaded from below location. So could you please use to get the data from data table by the below way.  

Please find the below standalone WebAPI sample. 

Please find the document to assist you in creating custom data extension from below location,  

Please find the below steps to add the WebAPI DataExtension sample in our WebReportDesigner sample. 

Step1: Add the WebAPI Extension project reference to our Web ReportDesigner sample as shown in below snap: 
 

Step2: Add the Configuration section in WebConfig file as shown in below code example. 
 
Web.config 
  <configSections> 
    <section name="ReportingExtensions" type="Syncfusion.Reporting.Extensions,  Syncfusion.EJ.ReportViewer" allowLocation="true" allowDefinition="Everywhere"/> 
      </configSections> 
  <ReportingExtensions> 
    <DataExtension> 
      <Extension Name="WebAPI" Assembly="Syncfusion.Reporting.DataExtensions.WebAPI" Type="Syncfusion.Reporting.DataExtensions.WebAPI.WebAPIExtension"> 
        <Properties> 
          <Add Key="QueryDesignerEnabled" Value="true"/> 
          <Add Key="QueryFilterEnabled" Value="false"/> 
          <Add Key="QueryExpressionEnabled" Value="false"/> 
         <Add Key="QueryJoinerEnabled" Value="false"/> 
          <Add Key="QueryColumnEdit" Value="false"/> 
        </Properties> 
      </Extension> 
    </DataExtension> 
  </ReportingExtensions> 

Step3: Add ReportDataExtensions in our index.cshtml file as shown in below code example. 

Index.cshtml: 
    <div style="width:100%; height:100%; position:absolute;"> 
        @{Html.EJ().ReportDesigner("designer").ServiceUrl("/api/DesignerAPI").ReportDataExtensions(ext => { ext.ClassName("WebAPIDataSource").Name("WebAPI").ImageClass("e-reportdesigner-datasource-webapi").DisplayName("WebAPI").Add(); }).Render();} 
    </div> 
    @(Html.EJ().ScriptManager()) 
 
Using the above sample, you can pull the data from WebAPI datasource with query parameter to limit the data based on tenant name. Please find the below documentation to connect WebAPI datasource with query parameter, 


Please find the below step for how to get the data using local WebAPI Datasource. 

Step 1: Run our above shared sample. 
Step 2:Choose the WebAPI in datasource dialog as shown in below snap. 
 

Step 3: Specify the URL (Specify the WebApiServiceController from our above shared sample) with localhost as shown in below snap. 
 

Step 4: Click the connect button as shown in below snap. 
 

Step 4: Click the API icon and provide the method name, parameter name and parameter value as shown in below snap with WebApiServiceController class specified methods 
 

 

Step 5: Click ok as shown in below snap. 

 

Finally its gets data from our local WebAPIservice as shown in below snap. 
 



Let us know if you need any clarification. 

Regards, 
Mahendran S. 



HA ham May 7, 2019 10:14 AM UTC

Hi
Thanks for your reply 
I want to make a rsd file then upload the dataSet folder and when load page my file show in data place by rows like client select drop down  Shear dataSet  and load file,
by the way I attached an image when client open page see it.
thanks.

Attachment: 02_4c32d32f.rar


VS Vinoth Srinivasan Syncfusion Team May 8, 2019 07:30 AM UTC

Hi Ham, 
 
Currently we don’t have option to create a dataset file in our report designer application. But we have prepared a standalone sample with creating the dataset and datasource files and use that file in report designer application. 
 
  
Listed out further details below available in sample shared,  
·        Sample Database: 
We have provided a sample database as sql script file in the below sample location  
File Location: Syncfusion\ ExternalServer.sql  
Please restore the database in your local database location.  
  
·        Assemblies and scripts: 
We have shipped the updated assemblies and script in the following sample location.  
Assembly Location : Syncfusion\ Syncfusion\ lib  
Script Location : Syncfusion\ Syncfusion\Scripts  
  
Steps to Create shared dataset:  
  
1.     Open the Data menu from the toolbar. 
  
   
  
2.     Click on ‘Create Shared Dataset’. 
  
   
  
3.     Now, the query designer will be loaded in the new tab. 
  
   
  
4.     Available datasources in the external database will be listed in the ‘Datasource’ dropdown, select the datasource name. 
  
   
  
5.     Edit the dataset name in the ‘Dataset’ field if required. 
  
   
  
6.     Design the query using designer mode or code mode. 
  
   
  
7.     To save the designer query click on the save button in the query designer toolbar. 
  
   
  
8.     Now, the dataset will be saved in the external database like below. 
  
   
  
Steps to Create shared datasource:  
  
1.     Open the Data menu from the toolbar. 
  
   
  
2.     Click on ‘Create Shared Datasource’. 
  
3.     Now the Create Datasource  configuration dialog will be launched. 
  
   
  
In the new connection configuration dialog,  
·        Name: Specify the data source name without special characters. 
·        Server name: You can select existing server in the local network from the drop-down list or specify the specific remote server name like myserver.domain.com. 
·        Authentication Type: In the authentication type select Windows or SQL Server authentication. In SQL Server type specify the username and password of the server. 
·        Database name: In this field, choose or enter a existing valid database on the specified server e.g. AdventureWorks. 
  
   
  
4.     Finally, click Save in the Create Datasource dialog and the new data source will be saved in the external database like below. 
  
Steps to Edit shared dataset:  
1.     Open the Data menu from the toolbar. 

   
  
2.     Click on ‘Edit Shared Dataset’. 
  
   
  
3.     The ‘Edit Data’ dialog will be launched. The available shared datasets in the external database will be loaded in the ‘Shared Dataset’ dropdown. 
  
   
  
4.     Choose the dataset name in the dropdown and click on ‘Edit’ button. 
  
   
  
5.     Now, the query designer will be loaded in the new tab with the dataset information. 
  
   
  
6.     Modify  the dataset information and click on the save button in the query designer toolbar. 
  
   
  
7.     Now, the dataset will be updated in the external database like below. 
  
   
  
Steps to Edit shared datasource:  
1.     Open the Data menu from the toolbar. 
  
   
  
2.     Click on ‘Edit Shared Datasource’. 
  
   
  
3.     The ‘Edit Data’ dialog will be launched. The available shared datasource in the external database will be loaded in the ‘Shared Datasource’ dropdown. 
  
   
  
4.     Choose the datasource name in the dropdown and click on ‘Edit’ button. 
  
   
  
5.     Now, the Create Datasource  configuration dialog will be launched with the datasource information. 
  
   
  
6.     Edit the datasource information and click on the save button. 
  
   
  
7.     Now, the datasource will be updated in the external database like below. 
  
 
 
Regards, 
Vinoth S. 



HA ham May 8, 2019 11:05 AM UTC

Hi
pleas open this sample 
we want to like this when load page the part of data was fill not blank 
could you tell me how can i generate data like ship detail
thanks



VS Vinoth Srinivasan Syncfusion Team May 9, 2019 01:51 PM UTC

Hi Ham, 
 
We are preparing the sample for your requirement to show the dataset values like as grid and we will update you the sample on or before 14th May 2019. 
 
Regards, 
Vinoth S. 



HA ham May 12, 2019 09:52 AM UTC

Hi
Thanks for your reply;
I have an other question,
after designing report i want save report (rdl) but i don't want to use of toolbar designer (Save button)
I put button under page and client click my button not toolbar button and then create "byte[] reportdata" and insert to sql
Thanks;
 


RT Ramesh Thangaraj Syncfusion Team May 13, 2019 12:19 PM UTC

Hi Ham,  
  
Yes, our web Report Designer supports to save the report into sql. We are preparing the sample for your requirement and we will update you the sample on or before 14th May 2019.  
  
Regards, 
Ramesh T. 



MS Mahendran Shanmugam Syncfusion Team May 14, 2019 04:26 PM UTC

Hi Ham, 

Sorry for the delay. 

We are preparing the sample with your requirement and we will update you the sample on or before 17th May 2019. 

Regards, 
Mahendran S. 


Loader.
Live Chat Icon For mobile
Up arrow icon