Nguyen Trung Cuong
Apr 19, 2016 07:57 AM
Active user
Rating:
2
Joined: Aug 10, 2012
Company: N/A
Hi Admin, This code block is performed with 1C:Enterprise v8.3.7 unsuccessfully (there is NO problems with the previous versions of 1C:Enterprise, such as 8.3.4). Please take a look at the attachment screenshot (error_msg.png). Could you please help me investigate the problem?
Code &AtClient
Procedure Print(Command)
Spreadsheet = New SpreadsheetDocument;
XemIn(Spreadsheet);
Spreadsheet.ShowGrid = False;
Spreadsheet.ReadOnly = True;
Spreadsheet.ShowHeaders = False;
Spreadsheet.PageOrientation = PageOrientation.Landscape;
Spreadsheet.FitToPage = True;
Spreadsheet.Show();
EndProcedure
Procedure XemIn(Spreadsheet)
Template = Reports.BieuDoDoanhSoTheoNgay.GetTemplate("MauBieu");
TenDonVi = LicensedServer.GetTenDonVi();
DiaChi = "Địa chỉ: " + LicensedServer.GetDiaChi();
DienThoai = "Điện thoại: " + LicensedServer.GetDienThoai();
TuNgay = BegOfDay(Object.TuNgay);
DenNgay = EndOfDay(Object.DenNgay);
BieuDo = Template.GetArea("BieuDo");
Anh = BieuDo.Drawings.Add(SpreadsheetDocumentDrawingType.Chart);
Anh.Place(BieuDo.Area("R8C2:R43C77"));
Anh.Line = New line(SpreadsheetDocumentDrawingLineType.None);
LoBieuDo = Anh.Object;
Chart = LoBieuDo;
Spreadsheet.Clear();
BieuDo.Parameters.TenDonVi = TenDonVi;
BieuDo.Parameters.DiaChi = DiaChi;
BieuDo.Parameters.Ky = "Từ ngày " + Format(TuNgay, "DF=dd/MM/yyyy") + " đến ngày " + Format(DenNgay, "DF=dd/MM/yyyy");
Chart.RefreshEnabled = False;
Chart.AutoTransposition = False;
Chart.ValueLabelFormat = "ND=16; NG=3,0";
Chart.PercentLabelFormat = "ND=16; NG=3,0";
Chart.ChartType = KieuBieuDo;
ChartPoint = Chart.SetPoint("Doanh số");
ChartPoint.Text = "Doanh số";
For Each Result In Object.ChiTiet Do
CurrentChartSeries = Chart.SetSeries(Format(Result.Date,"DF=dd/MM/yyyy"));
CurrentChartSeries.Text = Format(Result.Date,"DF=dd/MM/yyyy");
Chart.SetValue(ChartPoint, CurrentChartSeries, Format(Result.DoanhSo,"ND=16; NG=3,0"));
EndDo;
Chart.Transparent = False;
Chart.TitleArea.Text = "Ngày";
Chart.TitleArea.TextColor = WebColors.Blue;
Chart.TitleArea.BackColor = WebColors.White;
Chart.PlotArea.BackColor = WebColors.White;
Chart.LegendArea.BackColor = WebColors.White;
Chart.BackColor = WebColors.White;
Chart.RefreshEnabled = True;
Chart.AutoTransposition = True;
Spreadsheet.Put(BieuDo);
EndProcedure
Thanks,
Cuong