Loading, Printing are getting slowness

Posted by: ysuzuki on 23 November 2020, 10:54 pm EST

  • Posted 23 November 2020, 10:54 pm EST

    Hi, I need help.

    Previously, we migrated from AR12.0J to 14.0J for WinForm App which using
    PageReport, RDL report but after that we were getting slowness from data loading to printing around 20sec per page.(1 page just 30 columns, 6 record data got from Azure database.) I have just started to serch some of cases. I did reinstall to my laptop and almost perfectly reject ver 12.0J though, it sill have issue for it. Have anyone heard similar issue with us?

  • Replied 23 November 2020, 11:00 pm EST

    i don't believe in such a tiny column 20 second to use.

  • Replied 24 November 2020, 3:44 pm EST


    I have checked at my end after binding the data with the Azure Data at my end and it work perfectly fine. Can you provide the running sample so that I can replicate the same at my end.

    Also, Sometimes time is taken by machine to fetch the data from the Azure which cause the delay. If possible, could you please check the when you fetch the same amount of data in SQL Management then how much time it take.

  • Replied 24 November 2020, 9:58 pm EST

    Hi Mohit,

    Thanks for you reply. I would like to get your pointed out to my code. Please let me know, If you need more Info. Please.

    *It takes 20 sec when it running from "Step6-1" to "Step6-2" in middle.

    Visual Studio 2019 C#
    private bool SetDataTable_TurnAround(string PrinterName, string Template)
    bool bRet = false;
    var Report = new PageReport(new System.IO.FileInfo(Template));
    var Document = new PageDocument(Report);

    Document.LocateDataSource += OnLocateDataSource_TurnAround;

    Document.Printer.PrinterName = PrinterName;

    Document.Print(false, false, false);
    bRet = true;


    catch (Exception e)
    bRet = false;

    return bRet;

    void OnLocateDataSource_TurnAround(object sender, LocateDataSourceEventArgs args)
    args.Data = LoadData_PageReport_TurnAround();


    DataTable LoadData_PageReport_TurnAround()

    using (AzureData PrintingData = new AzureData(Globals.LineGroupId, Globals.PrintId))

    using (SqlDataReader AzureReader = PrintingData.SetReader())
    TurnAround.Columns.Add("ShipmentAdviceNumber", typeof(int));
    TurnAround.Columns.Add("ShipmentAdviceItemNumber", typeof(float));
    TurnAround.Columns.Add("AcctNumber", typeof(int));
    TurnAround.Columns.Add("OrderNumber", typeof(int));
    TurnAround.Columns.Add("BillToAcctName", typeof(string));
    TurnAround.Columns.Add("AcctName", typeof(string));
    TurnAround.Columns.Add("AcctField2", typeof(string));
    TurnAround.Columns.Add("AcctField1", typeof(string));
    TurnAround.Columns.Add("QuoteDate", typeof(string));
    TurnAround.Columns.Add("PurchaserName", typeof(string));
    TurnAround.Columns.Add("PONumber", typeof(string));
    TurnAround.Columns.Add("HandlingInstructions", typeof(string));
    TurnAround.Columns.Add("Description", typeof(string));
    TurnAround.Columns.Add("UPCCd", typeof(string));
    TurnAround.Columns.Add("ItemQty", typeof(string));
    TurnAround.Columns.Add("PriceUnit", typeof(string));
    TurnAround.Columns.Add("PriceTtl", typeof(string));
    TurnAround.Columns.Add("RetailPriceUnit", typeof(string));
    TurnAround.Columns.Add("RetailPriceTtl", typeof(string));
    TurnAround.Columns.Add("PriceTtlSum", typeof(string));
    TurnAround.Columns.Add("RetailPriceTtlSum", typeof(string));
    TurnAround.Columns.Add("ItemQtySum", typeof(string));
    TurnAround.Columns.Add("CarrierService1", typeof(string));

    while (AzureReader.Read())

    DisplayItemQty TargetItemQty = new DisplayItemQty(AzureReader["CstzNumber"].ToString().Trim() );

    TargetItemQty.ItemQty = AzureReader["ItemQty"].ToString().Trim();
    string ItemQty = TargetItemQty.ConvertValue();

    DisplayPriceUnit TargetUnit = new DisplayPriceUnit( AzureReader["DropShipFlag"].ToString().Trim() );

    TargetUnit.Price = AzureReader["PriceUnit"].ToString().Trim();
    string PriceUnit = TargetUnit.ConvertValue();

    TargetUnit.Price = AzureReader["PriceTtl"].ToString().Trim();
    string PriceTtl = TargetUnit.ConvertValue();

    TargetUnit.Price = (AzureReader["TotalPriceType"].ToString().Trim() == "grand") ? AzureReader["PriceGrandTotal"].ToString().Trim() : AzureReader["PriceSubTotal"].ToString().Trim();
    string PriceTtlSum = TargetUnit.ConvertValue();

    DisplayPriceRetail TargetRetail = new DisplayPriceRetail( AzureReader["DropShipFlag"].ToString().Trim()
    , AzureReader["IsOpenPrice"].ToString().Trim()

    TargetRetail.Price = AzureReader["RetailPriceUnit"].ToString().Trim();
    string RetailPriceUnit = TargetRetail.ConvertValueBlank();

    TargetRetail.Price = AzureReader["RetailPriceTtl"].ToString().Trim();
    string RetailPriceTtl = TargetRetail.ConvertValueString();

    TargetRetail.Price = (AzureReader["TotalPriceType"].ToString().Trim() == "grand") ? AzureReader["RetailPriceGrandTotal"].ToString().Trim() : "99999999";
    string RetailPriceTtlSum = TargetRetail.ConvertValueString();

    string ItemQtySum = (AzureReader["TotalPriceType"].ToString().Trim() == "grand") ? AzureReader["ItemQtyGrandTotal"].ToString().Trim() : AzureReader["ItemQtySubTotal"].ToString().Trim();

    string Description = AzureReader["Product"].ToString().Trim() + " : " + AzureReader["Description"].ToString().Trim() + " " + AzureReader["TagName"].ToString().Trim();

    string CarrierService1 = (AzureReader["CarrierService1"].ToString().Trim() == "COD") ? "代引き" : "";

    , AzureReader["ShipmentAdviceItemNumber"].ToString().Trim() // <- DB:float, DataTable:float
    , AzureReader["AcctNumber"].ToString().Trim()
    , AzureReader["OrderNumber"].ToString().Trim()
    , AzureReader["BillToAcctName"].ToString().Trim()
    , AzureReader["AcctName"].ToString().Trim()
    , AzureReader["AcctField2"].ToString().Trim()
    , AzureReader["AcctField1"].ToString().Trim()
    , AzureReader["QuoteDate"].ToString().Trim()
    , AzureReader["PurchaserName"].ToString().Trim()
    , AzureReader["PONumber"].ToString().Trim()
    , AzureReader["HandlingInstructions"].ToString().Trim()
    , Description
    , AzureReader["UPCCd"].ToString().Trim()
    , ItemQty
    , PriceUnit
    , PriceTtl
    , RetailPriceUnit
    , RetailPriceTtl
    , PriceTtlSum
    , RetailPriceTtlSum
    , ItemQtySum
    , CarrierService1

    catch (Exception e)

    return TurnAround;


  • Replied 24 November 2020, 10:03 pm EST

    Azure Table1
    CREATE TABLE [dbo].[Table1](
    [PrintID] [int] NOT NULL,
    [ShipmentAdviceNumber] [int] NOT NULL,
    [OrderNumber] [int] NOT NULL,
    [OrderDate] [date] NOT NULL,
    [QuoteDate] [date] NOT NULL,
    [PONumber] [char](42) NOT NULL,
    [AcctNumber] [int] NOT NULL,
    [AcctName] [varchar](100) NOT NULL,
    [MultipleNumber] [int] NOT NULL,
    [BillToAcctNumber] [int] NOT NULL,
    [BillToAcctName] [varchar](100) NOT NULL,
    [AcctNumberSA] [int] NOT NULL,
    [AcctNameSA] [varchar](100) NOT NULL,
    [AcctField1] [varchar](35) NOT NULL,
    [AcctField2] [varchar](35) NOT NULL,
    [TermId] [char](8) NOT NULL,
    [TermDescription] [varchar](50) NOT NULL,
    [ShippingChargeFlag] [char](1) NOT NULL,
    [DropShipFlag] [char](1) NOT NULL,
    [ShipZip] [char](10) NOT NULL,
    [ShipName] [char](70) NOT NULL,
    [Address1] [varchar](80) NOT NULL,
    [Address2] [varchar](80) NOT NULL,
    [PhoneNumber] [varchar](25) NOT NULL,
    [DeliveryDate] [varchar](20) NOT NULL,
    [DeliveryTime] [varchar](20) NOT NULL,
    [Attention] [char](58) NOT NULL,
    [PurchaserName] [char](70) NOT NULL,
    [HandlingInstructions] [char](70) NOT NULL,
    [TotalPriceType] [varchar](5) NOT NULL,
    [ItemQtyGrandTotal] [smallint] NOT NULL,
    [PriceGrandTotal] [float] NOT NULL,
    [RetailPriceGrandTotal] [float] NOT NULL,
    [ShipAmt] [float] NOT NULL,
    [CarrierName] [char](16) NOT NULL,
    [CarrierService1] [char](18) NOT NULL,
    [CreatedAt] [datetime2](7) NOT NULL,
    [UpdatedAt] [datetime2](7) NOT NULL,
    [PrintID] DESC,
    [ShipmentAdviceNumber] DESC,
    [OrderNumber] DESC,
    [AcctNumber] DESC
    ) ON [PRIMARY]
  • Replied 24 November 2020, 10:04 pm EST

    Azure Table2
    CREATE TABLE [dbo].[Table2](
    [PrintID] [int] NOT NULL,
    [PageNumber] [int] NOT NULL,
    [RowNumber] [int] NOT NULL,
    [ShipmentAdviceNumber] [int] NOT NULL,
    [ShipmentAdviceItemNumber] [float] NOT NULL,
    [OrderNumber] [int] NOT NULL,
    [ItemNumber] [float] NOT NULL,
    [Product] [varchar](35) NOT NULL,
    [CstzFlag] [char](1) NOT NULL,
    [CstzNumber] [int] NOT NULL,
    [DistributionCode] [char](3) NOT NULL,
    [PartNumber] [varchar](35) NOT NULL,
    [Description] [varchar](250) NULL,
    [TagName] [varchar](120) NULL,
    [ItemComment] [varchar](240) NULL,
    [SerialNumber] [varchar](10) NULL,
    [UPCCd] [char](13) NULL,
    [ItemQty] [smallint] NOT NULL,
    [PieceTtl] [smallint] NOT NULL,
    [ItemQtySA] [smallint] NOT NULL,
    [ItemQtySum] [smallint] NOT NULL,
    [IsOpenPrice] [char](5) NOT NULL,
    [PriceUnit] [float] NOT NULL,
    [PriceTtl] [float] NOT NULL,
    [RetailPriceUnit] [float] NOT NULL,
    [RetailPriceTtl] [float] NOT NULL,
    [ItemQtySubTotal] [float] NOT NULL,
    [PriceSubTotal] [float] NOT NULL,
    [RetailPriceSubTotal] [float] NOT NULL,
    [PriceTtlSum] [float] NOT NULL,
    [RetailPriceTtlSum] [float] NOT NULL,
    [IncludedTaxPriceTtl] [float] NOT NULL,
    [InternalTax] [float] NOT NULL,
    [CreatedAt] [datetime2](7) NOT NULL,
    [UpdatedAt] [datetime2](7) NOT NULL,
    [PrintID] DESC,
    [ShipmentAdviceNumber] DESC,
    [ShipmentAdviceItemNumber] ASC,
    [OrderNumber] DESC,
    [ItemNumber] ASC,
    [CstzNumber] ASC

    ) ON [PRIMARY]
  • Replied 24 November 2020, 10:09 pm EST

  • Replied 24 November 2020, 10:22 pm EST

  • Replied 24 November 2020, 11:11 pm EST

    This is console Apps running on VM Server. Server Specification is below.

  • Replied 24 November 2020, 11:07 pm EST

    I did query to Azure DB on Management Studio but responced back soon(within 1sec)
    It also attached file with my query, Could you check it for AR responces?

    Thank you,
  • Replied 26 November 2020, 2:01 am EST


    Can you please share the result between steps 6-1 and 6-2 by replacing the :
    1: Document.Print(false, false, false); with Document.Print(GrapeCity.Viewer.Common.PrintingSettings.UseStandardDialog)
    2: Document.Print(false, false, false) with Report.Run()

    Also, I am not able to run the sample due to missing assembly. If you don't want to share the sample publicly, you can share the sample by creating the sample on our private forum:

    Hope it helps.

  • Replied 26 November 2020, 2:29 am EST

    Hi Mohit,

    I uploaded more sample without your packages(Grapecity Packages was too big..)
  • Replied 26 November 2020, 2:38 am EST

    I am just trying your pointed code. please waiting for me.. Thank you so much.

  • Replied 26 November 2020, 12:45 pm EST

    1. Document.Print(GrapeCity.Viewer.Common.PrintingSettings.UseStandardDialog);
    -> after running this method, 40 seconds later paper coming from the printer.

    -> after running this method, get a response soon around 0.1 milliseconds but not coming the paper.

    3.Report.Run(); Document.Print(false, false, false);
    -> after running these method, 40 seconds later paper coming from the printer.

    Just "Report.Run();" method seems like good, I would like to get similar response with a paper printing.
  • Replied 26 November 2020, 12:40 pm EST

    Hi Mohit, I tried to execute my apps on the site. the results are above. Please confirm it. also I attached No3's logging here.

  • Replied 26 November 2020, 3:47 pm EST

    Hi Mohit,

    I sent a one more sample to private site. When I running this sample, I noticed viewer looking for printers, it seems like takes from 20 to 40 seconds. is that related with the problem? Could you pushed the button on the Windows form, please.

  • Marked as Answer

    Replied 27 November 2020, 3:05 am EST


    I have replied on the following support one case:

    Please reply to above support case to avoid confusion.

  • Replied 27 November 2020, 2:35 pm EST

    Hi Mohit,

    I'm sorry, if I make you confusion but we still have problem which AR printing response is really slow. I don't believe just one page of "PageReport" and "RDL" takes from 20 seconds to 40 seconds above "Document.Print(false, false, false)" method.

  • Replied 20 December 2020, 4:20 pm EST


    This has been replied here:

Need extra support?

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

Learn More

Forum Channels