Options

NAV RDL Report HTML

mikmik Member Posts: 79
Hello,
I'm using HTML in my Reports so I do not need to position 50 textfields in my header section. Instead I create my data by code with the caption and the value.
So far so good ...

What I try now is to get a table style Caption/Value list. I have a function where I place an amount of spaces after my caption that the values are aligned properly. This only works with non propotional fonts like Courier New. The problem is that most customers do not like to use non propotional fonts :smile:

Is there any chance to create such a table style list with the small amount of formatting options we have in reporting?


<Caption1>:_____________<Value1>
<Caption2>:_____________<Value2>
....




With kind regards
mik

Answers

  • Options
    AntidotEAntidotE Member Posts: 61
    edited 2016-04-08
    Since you generate HTML maybe you should think of using <table> instead of plain alignment?
    For example like this (not sure if working, but shows principle I hope):
    IF Rec.FINDSET THEN BEGIN
      HTMLText := '<table class="Records" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">';
      HTMLText += '  <tbody>';
      HTMLText += '    <tr>';
      HTMLText += '      <th width="20%" valign="top" align="left">Caption</th>';
      HTMLText += '      <th width="80%" valign="top" align="left">Value</th>';
      HTMLText += '    </tr>';
      REPEAT
        HTMLText += '    <tr>';
        HTMLText += '      <td valign="top" align="left">' + Rec.CaptionField + '</td>';
        HTMLText += '      <td valign="top" align="left">' + Rec.ValueField + '</td>';
        HTMLText += '    </tr>';
      UNTIL Rec.NEXT = 0;
      HTMLText += '  </tbody>';
      HTMLText += '</table>';
    END;
    
    It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.
  • Options
    mikmik Member Posts: 79
    Tables are not working in RDL Reporting I already tried this :neutral:

    With kind regards
    mik
  • Options
    parmparm Member Posts: 49
    Hi,
    I use HTML in reports.
    I have tried with <b> but I don't imagine why should not work with tables.
    You need to change placeholder property.
    Please view this video: https://msdn.microsoft.com/en-us/dynamics/nav/dn833423.aspx

    Regards,
    parm
Sign In or Register to comment.