End User Designer - Report Explorer slow loading with pre-loaded table data

Posted by: marsh8472 on 24 October 2018, 12:35 pm EST

    • Post Options:
    • Link

    Posted 24 October 2018, 12:35 pm EST - Updated 30 September 2022, 3:51 pm EST

    When I try to pre-populate tables with fields information of 423 tables into the End User Designer before loading it hangs indefinitely on a line of code I have in to refresh the Report Explorer control. If I limit the number of tables to pre-load to 100 tables then it’ll load after a little while but I see a busy indicator next to a few of the tables.



    I tried various commands to disable validation in hopes that it would prevent whatever is causing the hanging on the load time. Other properties I tried was lockcontrols and disabling and re-enabling the reportexplorer before and after loading but haven’t found anything that has helped yet.

  • Posted 25 October 2018, 7:08 am EST

    Hello,

    Could you please share the environment detail with us including exact version of AR that you are using. Also, please share the result on executing the application with Target platform x64 Bit.

    If you are using an old version of AR, could you please check with the latest version of AR. You can download the latest version from the following link:

    http://cdn.grapecity.com/ActiveReports/ar12/hotfixes/ActiveReports-v12.2.14782.0.msi

    Hope it helps.

    Thanks,

  • Posted 31 October 2018, 10:26 am EST

    Hello I updated the project to active reports 12 and changed the target platform to 64bit but the result is the same. This is a continuation of the project I was working on from the https://www.grapecity.com/en/forums/ar-dev/prevent-access-to-oracle-d thread. In this example I’m populating all of the tables and their fields into the reportexplorer before the project is loaded. The reportexplorer appears to not be capable of displaying these tables and fields on its own unless I put in a line of code to force it to refresh (which was where we left off in the other thread). That workaround works but if I put in 100 tables that line of code to refresh the reportexplorer about a little bit. And if I load around 400 tables then it almost loads after a half an hour but is all laggy and never completely finishes loading then I end up closing the project. I’m thinking either the reportexplorer is just not capable of pre-loading that much data, there’s a setting I need to add to make it not hang on that refresh step, or perhaps the extra code that was added from that other thread is causing a performance issue when loading that many tables into the reportexplorer.

  • Posted 1 November 2018, 3:22 am EST

    Hello,

    It is very helpful for us If you share the running sample with us to replicate the issue at our end. If not possible, we need some time to create the sample at our end and reproduce the issue.

    Thanks,

  • Posted 1 November 2018, 5:51 pm EST - Updated 30 September 2022, 3:51 pm EST

    Sure I have a slightly modified end user designer from active reports 12 in the attached zip file.

    EndUserDesigner.zip

    If I make this variable 40 to load only 40 tables when the app loads, there isn’t much problem with load times.

    but if I change the variable to a higher number like 400 then it hangs. Assuming there isn’t a way to load the application in a reasonable amount of time I’ll probably just code a work around where the user can select from a list of what tables to add as they need them instead of trying to add them all

  • Posted 2 November 2018, 12:52 am EST

    Hello,

    I am unable to reproduce the issue at my end. It takes only 20 seconds to load 400 tables. I just modified to add the table from the SQL database as follow:

    
    
                    for (int i = 0; i < 400; i++)
                    {
    
    
                        DataSet data_set = new DataSet();
    
                        data_set.Query.DataSourceName = "Database Here";
                        data_set.Name = "RandomTableName" + Convert.ToString(i);
                        data_set.Query.CommandText = "select * from Customers";
                        //ValidationContext vc = new ValidationContext(ValidationMode.DesignTime);
                       
    
    
                       // data_set.Validate(vc);
                        // dr2 = cmd2.ExecuteReader();
                        //for (int j = 0; j < 20; j++)
                        //{
    
    
                        //    GrapeCity.ActiveReports.PageReportModel.Field f = new GrapeCity.ActiveReports.PageReportModel.Field();
                        //    f.Name = "FieldName" + Convert.ToString(j);
                        //    f.Value = "FieldName" + Convert.ToString(j);
                        //    data_set.Fields.Add(f);
    
                        //}
                        GrapeCity.ActiveReports.PageReportModel.Field _field = new GrapeCity.ActiveReports.PageReportModel.Field("CustomerID", "CustomerID", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("CompanyName", "CompanyName", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("ContactName", "ContactName", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("ContactTitle", "ContactTitle", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("Address", "Address", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("City", "City", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("Region", "Region", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("PostalCode", "PostalCode", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("Country", "Country", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("Phone", "Phone", null);
                        data_set.Fields.Add(_field);
                        _field = new GrapeCity.ActiveReports.PageReportModel.Field("Fax", "Fax", null);
                        data_set.Fields.Add(_field);
                        //data_set.Validate(new ValidationContext(ValidationMode.DesignTime));
                        ((PageReport)(reportDesigner.Report)).Report.DataSets.Add(data_set);
    
    
                        //  data_set.Validate(new ValidationContext(ValidationMode.DesignTime));
    
    
    
    
    
                    }
                    ((PageReport)(reportDesigner.Report)).Report.DataSources.Add(ds1);
                }
                catch (Exception ex)
                {
    
                    MessageBox.Show(ex.ToString());
                }
    
    
    
    
                ((PageReport)(reportDesigner.Report)).Report.DataSources[0].ConnectionProperties.ConnectString = @"user id=sa;data source=in-ars-sql\sql_2k8r2;initial catalog=Northwind;password=grapecity@123;";
                this.reportExplorer.ReportDesigner = this.reportDesigner;
    
            }
    
    

    Could you please confirm If I am missing something at my end.

    Thanks

  • Posted 5 November 2018, 3:20 am EST

    Hello,

    Have you added fields along with datasets through the code in your original projects? Also, please try after using the following in your project.

    
    ValidationContext vc = new ValidationContext(ValidationMode.BeforeProcessing);
                       data_set.Validate(vc);
    
    

    Hope it helps.

    Thanks,

  • Posted 8 November 2018, 12:49 pm EST - Updated 30 September 2022, 3:51 pm EST

    Thanks the code fix you suggested does seem to have helped in the project I included in this thread. But when I try to apply this same fix on the main project I’ve been working on it still hangs when trying to refresh. Any idea what would cause this waiting indicator to appear next to the tables listed in the dataset?

    Yes in the report load event I have it query each table and grab the fields of that table and add the fields there in code. I’m thinking that when it comes to the report explorer control when adding the tables in through the code and all of the code workarounds put in to get it to not show database credential information causes it to behave a bit laggy.

    In the event there is no way to improve the performance significantly on this reportexplorer control, how feasible would it be to make a custom control that functions similarly to the reportexplorer control which allows for the dragging of the common components onto the designer form, allows for the setting up parameters? Has that been attempted before?

  • Posted 8 November 2018, 12:50 pm EST - Updated 30 September 2022, 3:51 pm EST

    Thanks the code fix you suggested does seem to have helped in the project I included in this thread. But when I try to apply this same fix on the main project I’ve been working on it still hangs when trying to refresh. Any idea what would cause this waiting indicator to appear next to the tables listed in the dataset?

    Yes in the report load event I have it query each table and grab the fields of that table and add the fields there in code. I’m thinking that when it comes to the report explorer control when adding the tables in through the code and all of the code workarounds put in to get it to not show database credential information causes it to behave a bit laggy.

    In the event there is no way to improve the performance significantly on this reportexplorer control, how feasible would it be to make a custom control that functions similarly to the reportexplorer control which allows for the dragging of the common components onto the designer form, allows for the setting up parameters? Has that been attempted before?

  • Posted 12 November 2018, 6:29 am EST

    Hello,

    Sorry for the delay!

    But when I try to apply this same fix on the main project I’ve been working on it still hangs when trying to refresh?

    Could you please explain what do you mean by refresh here? Are the datasets loaded correctly when designer open the first time? How are you refreshing the fields here? Yes, customizing the report explorer may effect on the performance.

    Ideally, these wait icons appear when designer executes the query in the dataset and retrieving the fields from the database. However, in your case, the wait icon should not appear as we have already added the fields from the database through the code. In my understanding, there must be something in the code which make the designer execute the query even after the fields are added through code. Is it possible for you to send the code of the original project so that I can look into this and find the solution accordingly?

    Has that been attempted before?

    It is never attempted before. Also, in my understanding, it is not possible to replace the report explorer with the customer control because it includes so much binding between designer and report explorer. I can ask my developer team for the same if we are unable to find the solution after going through your actual code.

    Thanks,

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels