Report not generating as expected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bensch
    New User
    • Nov 2015
    • 1

    Report not generating as expected

    Hello! I suspect that I have misunderstood how scripting works for reports. My end goal is a set-up where I am able to automatically run multiple comparisons, using existing sessions each time, saving the resulting report for each comparison as I go. I would like to kick this process off overnight and review the resulting reports when I return to the office in the morning.

    For simplicity's sake, I'll use an example with just one session. I have a saved session called TestSession. I want the comparison in the session to run and the resulting report saved. The two approaches I have taken are as follows, and each time the resulting report is blank:

    1:
    bcompare.exe TestSession
    [Then, once the comparison has been carried out;]
    bcompare.exe "@mytestscript.txt"

    Where mytestscript.txt contains:
    data-report layout:side-by-side options:display-all &
    output-to:"C:\My Documents\IDSRegressionTesting\mytestreport.txt"

    2:
    bcompare.exe "@mytestscript.txt"

    Where mytestscript.txt contains:
    data-report layout:side-by-side options:display-all &
    output-to:"C:\My Documents\IDSRegressionTesting\mytestreport.txt" TestSession

    In my head, I'm assuming these cases should work because data-report "Generates a Table Compare report of the currently selected files" and I'm assuming that the two files selected in my session are the two it will use. Presumably this is not the case? I'd be grateful for any advice or guidance. Thanks!
  • Aaron
    Team Scooter
    • Oct 2007
    • 15945

    #2
    Hello,

    Thanks for posting. The issue is that you can load a session then generate a report on it, but scripting only supports loading a Folder Compare session. Selection is a specific script command you would need to execute, and it assumes the files are aligned to each other (left to right) in two base folders, not 2 files in the same folder.

    The method used to generate a data report is either:
    a) pass in a file pair:
    data-report layout:side-by-side options:display-all &
    output-to:"C:\My Documents\IDSRegressionTesting\mytestreport.txt" "c:\file1.csv" "c:\file2.csv"

    b) load a folder compare, select files, then generate the report on the selection:
    #set your session to have a rules-based scan or use the criteria command after loading the session
    load "TestSession"
    expand all
    select all.diff.files all.newer.files all.older.files
    data-report layout:side-by-side options:display-all &
    output-to:"C:\My Documents\IDSRegressionTesting\mytestreport.txt"
    Aaron P Scooter Software

    Comment

    Working...