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. <br><br>This is the second control you add in ExcelExportProblem1:<br><br>          <font face="Courier New">Set fld = rpt.Sections(1).Controls.Add("DDActiveReports2.Field")<br>    fld.Font.Name = "Arial"<br>    fld.Font.Size = 10<br>    </font><font color="#0000ff" face="Courier New">' give the cell a text as a woraround for the Excel export problem</font><font face="Courier New"><br>    fld.Text = "Label2"<br>    fld.Alignment = ddTXLeft<br>    fld.Top = 0<br>    fld.Left = 2000<br>    fld.Width = 2000<br>    </font><font color="#0000ff" face="Courier New">' change the color of the cell</font><font face="Courier New"><br>    fld.BackColor = &H80000005<br>    fld.BackStyle = ddBKNormal</font><br>          <font face="Courier New">fld.ForeColor = &H80000005</font><br>
  • Replied 4 August 2017, 3:03 pm EST

    You are right, field's Text = "" causes the problem.
    <br />But your trick to set value and to set the BackColor and ForeColor to white is funny
    <br />and it is not acceptable when export to Excel.
    <br />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.<br>
  • 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.<br>
  • 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.<br>
Need extra support?

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

Learn More

Forum Channels