Hy,

Can anyone tell me what it is wrong whit the code below ?

I am having some labels that i want to set font size to a specific value.
Code:
        DataReport1.Sections("section4").Controls("destinatar1").Font.Size = 8
worck's fine

Code:
        DataReport1.Sections("section4").Controls("destinatar2").Font.Size = 8
* NOT WORKING * - it takes the font size of
Code:
         DataReport1.Sections("section1").Controls("Label5").Font.Size
WHY ????
PLS HELP

Here it' a pease of my code:

Code:
        DataReport1.Sections("section4").Controls("destinatar1").Caption = Adodc1.Recordset("nume") & " " & Adodc1.Recordset("prenume")
        DataReport1.Sections("section4").Controls("destinatar1").Font.Italic = False
        DataReport1.Sections("section4").Controls("destinatar1").Font.Bold = False
        DataReport1.Sections("section4").Controls("destinatar1").Font.Size = 8
        
        DataReport1.Sections("section4").Controls("destinatar2").Caption = Adodc1.Recordset("Strada") & " " & Adodc1.Recordset("Nr") & " " & Adodc1.Recordset("blsiap")
        DataReport1.Sections("section4").Controls("destinatar2").Font.Italic = False
        DataReport1.Sections("section4").Controls("destinatar2").Font.Bold = False
        DataReport1.Sections("section4").Controls("destinatar2").Font.Size = 8
        

Dim ItalicFont, BoldFont As String
Dim MarimeFont, AliniamentFont, CuloareFont As String

Open "C:\program\header.dat" For Input As #1 Len = 32767
    If Not EOF(1) Then  ' Verific daca fisierul nu este gol
        Line Input #1, ItalicFont
        Line Input #1, BoldFont
        Line Input #1, MarimeFont
        Line Input #1, AliniamentFont
        Line Input #1, CuloareFont
    End If
Close 1
            
        DataReport1.Sections("section1").Controls("LabelHeader").Caption = frmMain.RichTextBox2.Text
        DataReport1.Sections("section1").Controls("LabelHeader").Font.Italic = ItalicFont
        DataReport1.Sections("section1").Controls("LabelHeader").Font.Bold = BoldFont
        DataReport1.Sections("section1").Controls("LabelHeader").Font.Size = MarimeFont
       
        DataReport1.Sections("section1").Controls("LabelHeader").ForeColor = CuloareFont
        DataReport1.Sections("section1").Controls("LabelHeader").Alignment = AliniamentFont



Open "C:\pif_garantie\Date\header.dat" For Input As #1 Len = 32767
    If Not EOF(1) Then  
        Line Input #1, ItalicFont5
        Line Input #1, BoldFont5
        Line Input #1, MarimeFont5
        Line Input #1, AliniamentFont5
        Line Input #1, CuloareFont5
    End If
Close 1
            
        DataReport1.Sections("section1").Controls("Label5").Caption = frmMain.RichTextBox2.Text
        DataReport1.Sections("section1").Controls("Label5").Font.Italic = ItalicFont5
        DataReport1.Sections("section1").Controls("Label5").Font.Bold = BoldFont5
        DataReport1.Sections("section1").Controls("Label5").Font.Size = MarimeFont5
        DataReport1.Sections("section1").Controls("Label5").ForeColor = CuloareFont5
        DataReport1.Sections("section1").Controls("Label5").Alignment = AliniamentFont5
         
        
Open "C:\pif_garantie\Date\continut.dat" For Input As #1 Len = 32767
    If Not EOF(1) Then 
        Line Input #1, italicfont1
        Line Input #1, boldfont1
        Line Input #1, marimefont1
        Line Input #1, AliniamentFont1
        Line Input #1, culoarefont1
    End If
Close 1
            
        DataReport1.Sections("section1").Controls("Label1").Caption = frmMain.RichTextBox1.Text
        DataReport1.Sections("section1").Controls("Label1").Font.Italic = italicfont1
        DataReport1.Sections("section1").Controls("Label1").Font.Bold = boldfont1
        DataReport1.Sections("section1").Controls("Label1").Font.Size = marimefont1
        DataReport1.Sections("section1").Controls("Label1").ForeColor = culoarefont1
        DataReport1.Sections("section1").Controls("Label1").Alignment = AliniamentFont1
        
            
        DataReport1.Show vbModal