No announcement yet.

How to change the value of Table Header in the HTML report.

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to change the value of Table Header in the HTML report.

    Hi Team,

    I have the below code which generates the report in HTML format.

    log "%4"
    criteria binary
    load "%1" "%2"
    expand all
    folder-report layout:side-by-side options:display-all,display-no-orphans,column-none title:"<p> <h3>COMPARISON REPORT</h3> NAME : DINESH<br/> AGE : 26<br/> GENDER : MALE<br/> DOB : %5 </p>" output-to:"%3" output-options:html-color

    In the HTML report, there is a Table for the items which are compared. I would like to change the Header of this Table. I mean want to have different Names in both of these Item Headers. Currently, it has only the default value as "Name" both the Headers. Is it possible to change the Header through the script or any HTML changes are required? If so, please suggest how do we do it from the script.


  • #2

    No, the Folder Report's column headers are not configurable. The Column headers match the Columns in the graphical interface's comparison (default Name, Size, and Modified), to indicate what data is displayed and reported. After the HTML file is generated, you could parse and rename things manually by altering the HTML code.
    Aaron P Scooter Software


    • #3
      Thanks for the quick response Aaron! could you please explain briefly how to edit the things in existing HTML using our Beyond compare script. I just rename the Header from 'Name' to 'Database'. In which tag, we need to rename this. Am new to this HTML.


      • #4
        Sorry, what I mean is there is no way in BC Scripting to edit or alter the column names of the HTML report. However, since it is HTML, it is a plain text file, and you could use another scripting language or program to navigate in and alter it. I would suggest manually editing a single example file in a text editor first, to see if a manual edit can alter the column to meet your needs. What were you trying to rename the header to? The current headers are somewhat important for the layout of the data, since different reports can have different combinations of columns present, and the name helps the reader know what is currently displayed. This matches both the graphical interface, and how the information is commonly presented in other programs like Windows Explorer.
        Aaron P Scooter Software


        • #5
          Thanks for the suggestion Aaron!