Export to Excel right alignment problem CR24420[:|]

Posted by: via on 4 August 2017, 3:03 pm EST

  • Posted 4 August 2017, 3:03 pm EST

    I have attached picture.
    2007/04/excel1.JPG
  • Replied 4 August 2017, 3:03 pm EST

    Is it acceptable to give the second label you add to report a value and set the BackColor and ForeColor to white? This will make the right-aligned cell appear in its proper place but the cell will be in the worksheet but hidden.

    This is the second control you add in ExcelExportProblem1:

              Set fld = rpt.Sections(1).Controls.Add("DDActiveReports2.Field")
        fld.Font.Name = "Arial"
        fld.Font.Size = 10
       
    ' give the cell a text as a woraround for the Excel export problem
        fld.Text = "Label2"
        fld.Alignment = ddTXLeft
        fld.Top = 0
        fld.Left = 2000
        fld.Width = 2000
       
    ' change the color of the cell
        fld.BackColor = &H80000005
        fld.BackStyle = ddBKNormal

              fld.ForeColor = &H80000005
  • Replied 4 August 2017, 3:03 pm EST

    You are right, field's Text = "" causes the problem.

    But your trick to set value and to set the BackColor and ForeColor to white is funny

    and it is not acceptable when export to Excel.

    To explain the problem severity I have attached non-simple sample and picture.
    2007/04/testar2.zip
  • Replied 4 August 2017, 3:03 pm EST

    I entered this problem as CR 24420 and added your email to the notification list. Thanks for reporting the problem.
  • Replied 4 August 2017, 3:03 pm EST

    I have attached new sample and picture when field's Text <> "".
    2007/04/TESTAR2-2.zip
  • Replied 4 August 2017, 3:03 pm EST

    Thanks for the other sample; I have attached it to the above CR.
  • Replied 4 August 2017, 3:03 pm EST

    I have attached new sample and picture when groupheader field has aligned right.
    2007/05/TESTAR2-4.zip
  • Replied 4 August 2017, 3:03 pm EST

    I attached this sample also to the CR. Thanks again.
Need extra support?

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

Learn More

Forum Channels