Skip to content

dbatesx/CRDiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CRDiff

CRDiff is a program that serializes the binary Crystal reports .rpt files to human readable .json files, and works in conjunction with your favorite text diff tool. If your tool is configurable to use file transforms/converters, it works even better.

Installation

The published location is \\aus2-odx-dfs01.pdsenergy.local\devTools\CRDiff

Copy the contents to the local folder of your choice (referred to below as <CRDiff Path>) - Having that folder in your PATH environment variable can be helpful.

You may get a message "Are you sure you want to run this software?"

  • Uncheck "Always ask before opening this file" and
  • press "Run"

If when CRDiff.exe is run with no parameters, you don't see a valid CR Version displayed, you may need to install the Crystal Reports Runtime, available in the Crystal Reports Runtime folder.

Usage:

  • CRDiff.exe DiffAppPath.exe
    • Save your diff tool's path in CRDiff's config file.
  • CRDiff.exe ReportFilename.rpt
    • Serialize the report to a json file of the same name and location but with .json extension.
  • CRDiff.exe ReportFilename.rpt, ReportFilename2.rpt
    • Serialize the two reports to json and pass the json files to your diff tool. Once you close your text diff tool, CRDiff will delete the json files (if they hadn't already existed). If you haven't set a text diff path above, you will be prompted for one.
  • CRDiff.exe DiffAppPath.exe ReportFilename1.rpt ReportFilename2.rpt
    • Same as above, but DiffAppPath.exe is used instead of what is saved in config.
  • CRDiff.exe ReportFilename.rpt, TempFilename(.json)
    • Serialize ReportFilename.rpt to TempFilename (provided by your configurable text diff tool, which is responsible for cleaning up after itself).
  • Parameters:
    • DiffAppPath - path to external differencing application .exe file that can compare two text files
    • ReportFilename1 - path to first .rpt file to be serialized to json, or it can be an existing report.json file
    • ReportFilename2 - path to second .rpt file to be serialized to json (or existing .json file) and compared with first file
    • TempFilename - path to a temporary file that will likely be deleted after use.

Configuration

CompareIt!

Open CompareIt!, open Tools/Options, and select Converters. Press "Add", and specify Name: "Crystal Reports", Mask: "*.rpt", Command: "<CRDiff path>CRDiff.exe", Arguments: "{$Source_File} {$Converted_File}"

Beyond Compare

In Tools, File Formats..., press "+" and select Text Format. In the General tab, specify Mask: "*.rpt". In the Conversion tab, specify "External program (Unicode filenames)", Loading: "<CRDiff path>CRDiff.exe %s %t", check Disable editing, then Save.

TortoiseGit

In Settings, Diff Viewer, click Advanced, Add..., and specify Extension: ".rpt", External Program: "<CRDiff path>CRDiff.exe <path to your text compare tool> %base %mine"

Others

TBA

Features

  • Checks file extension, and if it is not .rpt, file passes directly to text diff tool.
  • Serializes many of the report details we want to be able to compare into a text file, like
    • Command query
    • element dimensions and settings
    • subreports
  • Save serialized files and pass to a text diff tool
  • Clean-up (delete) temp files after text diff tool is closed.

Still to Implement

  • Need to output
    • element suppression formulas (and other formulas for elements)
    • sub-textbox formatting (ie font changes, coloring, tab settings, etc)
    • "Lock Position"
    • "change number sign"
    • Page Setup (ie Printer, margins)
    • "Keep Data" setting

About

Diff tool for Crystal Reports .rpt files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published