Problem when create report

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jul 23, 2018
Company:

Hi all.

I'm creat 1 report, but i have 2 errors, plz help me.

1. I use While, in loop, its show data ok but When When i get the loop out of data, duplicate data (as images 1) and i dont understand why.
ex code:

Quote
While Lb0.Next() Do
Name = TrimAll(Lb0.Name);
DongCtbcc = LbCtBcc.Add();
DongCtbcc.NhanVien = Lb0.RefNhanVien;
For i = Day(StartDate) TO Day(EndDate) Do
LcHinhThucNghi = "";
If Not IsBlankString(LcHinhThucNghi) and (WeekDay(LDayTuNgay) <> 6 and  WeekDay(LDayTuNgay) <> 7 ) Then
If i = 1 Then
N01 = LcHinhThucNghi;  
DongCtbcc.N01 = LcHinhThucNghi;
EndIf;

If i = 2 Then
N02 = LcHinhThucNghi;  
DongCtbcc.N02 = LcHinhThucNghi;
EndIf;
Else
If WeekDay(Date(Year(StartDate), Month(StartDate), i)) = 6 OR WeekDay(Date(Year(StartDate), Month(StartDate), i)) = 7 Then
   ELSE
   If i = 1 Then
N01 = "x";  
DongCtbcc.N01 = "x";
EndIf;

If i = 2 Then
N02 = "x";  
DongCtbcc.N02 = "x";
EndIf;
EndIf;
EndDo;
Ngaycong = "Ngày công";
DongCtbcc.Ngaycong = songaylamviec + DongCtbcc.NLD
Phep = "Phép";
DongCtbcc.Phep = ?(DongCtbcc.N01 = "P", 1, 0) + ?(DongCtbcc.N02 = "P", 1, 0);
NLD = "Ngày làm đêm";
DongCtbcc.NLD = ?(DongCtbcc.N01 = "NLĐ", 1, 0) + ?(DongCtbcc.N02 = "NLĐ", 1, 0);
EndDo;
LbBangChamCong.Write();
       TableHeaderArea.Parameters.BSTT = BSTT;
TableHeaderArea.Parameters.BNAME = BNAME;
TableHeaderArea.Parameters.BNGAY = BNGAY;
TableHeaderArea.Parameters.BCONG = BCONG;
TableHeaderArea.Parameters.B1 = B1;
TableHeaderArea.Parameters.B2 = B2;
Spreadsheet.Put(TableHeaderArea, 1);
TmpbCc = Documents.BangChamCong.Select(StartDate, EndDate);
While TmpbCc.Next() Do
If TmpbCc.Thang = Month(StartDate) AND TmpbCc.Nam = Year(StartDate) AND TmpbCc.PhongBan = Departement Then
 fOR Each Row  In TmpbCc.ChiTietChamCong Do
stt=stt+1;
DetailRecordArea.Parameters.stt = Row.stt;
DetailRecordArea.Parameters.NAME = Row.Name;
DetailRecordArea.Parameters.N01 = Row.N01;
DetailRecordArea.Parameters.N02 = Row.N02;
 ENDDO;
Spreadsheet.Put(DetailRecordArea, 1);
EndDo;

2. I want to create a circle around cells but i dont know can use function and how to use it. i'm search and see SpreadsheetDocumentDrawingType but i dont understand. (Ex image)

Sorry, my english is not good.
Thanks.

Download 1.jpg (173.53 KB)
Download Line.jpg (181.87 KB)
 
#2
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jul 23, 2018
Company:

Hi.

I have processing error 1, please help 2.

Thanks.

 
#3
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear Nguyen Ninh,

The common practice to highlight a particular area is to fill the rectangular area with an appropriate color. You can use the BackColor attribute for this purpose.

Best regards,
Vladimir Gurov

1C Company support team
 
#4
People who like this:0Yes/0No
Just came
Rating: 0
Joined: May 4, 2014
Company:

Доброго времени суток, возможно я Вас не правильно поняла, но используя "Поле текстового документа" в форме для отображения Вашей таблицы и саму таблицу можно прорисовать в "Макете".

Edited: Anastasi Guselnikova - Jul 24, 2018 08:12 AM
 
#5
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jul 23, 2018
Company:

Dear Vladimir Gurov.

Thanks for reply.
I cant use Color in report, i want to creat dynamic table and i want to draw line border. When system check and have data, ins ert in to new row.
ex:
Image 1: enddate = 28 (Feb)
Image 2: enddate = 31 (Mar)

Thanks.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.