Agilent Community
Agilent Community
  • User
  • Site
  • Search the Community
  • User
Mass Spectrometry Software
  • Technical Areas
Mass Spectrometry Software
Wiki Create a Custom Report Method for the MassHunter Productivity App
  • Announcements
  • Forum
  • Files
  • Videos
  • Wiki
  • More
  • Cancel
  • .X Data file
  • Batch and Sequence menus missing in Drugquant E.02.02. sp2
  • Chemstation E.02.02 SP2 Batch Summary Report does not run.
  • -Collection of MassHunter Productivity App Resources
    • Common Questions about the MassHunter Productivity App
    • Considerations when Adding Custom Methods to the MassHunter Productivity App
    • Create a Custom Report Method for the MassHunter Productivity App
    • Data Review Protocol with Filter Sets in the MassHunter Productivity App
    • Optimizing Efficiency with Compound Groups in the MassHunter Productivity App
    • Result Error Statuses in the MassHunter Productivity App
    • Result Flags in the MassHunter Productivity App
    • Streamlining Sequence Setup in the MassHunter Productivity App
    • Tuning Retention Times in the MassHunter Productivity App
  • Configuring Windows Firewall For GCMSD MassHunter Acquisition
  • DrugQuant is not an option in G1701FA GC/MSD Software until you specify an MS
  • ECM user cannot find data file on ECM server using  GCMS Chemstation.
  • Edit Labname in Report Header, Chemstation E.02.02
  • Error in autotuning tied to missing XML - Masshunter GCMS
  • GCMS MassHunter Installation Guide
  • Host System not Ready - GC/MSD System
  • How to Semi-Quantitate Unknown Compounds in MassHunter Quantitative Analysis
  • Instructions for Enabling Compound Math on B.03.0x-B.07.00
  • Introducing PDF Style Reporting and Copy to LIMS
  • No MS Data Found - G1701FA Chemstation Drug Analysis.
  • QA check report divide by zero error
  • Collection of MSD Productivity ChemStation Software Videos
  • Resetting a Tune file to default 5977 MSD
  • Tune and Vacuum Control Error: Undefined Symbol ADJ_WIDTH or AXIS
  • Wrong quant results shown in QEdit when using TIC as quant signal or importing AMDIS results
Still Need Help?

Post your question in our User Forum or Contact Support.

Create a Custom Report Method for the MassHunter Productivity App

Created by tannerstevenson tannerstevenson over 2 years ago | Last modified by kristen.sensabaugh kristen.sensabaugh over 1 year ago

The MassHunter Productivity App allows an admin to add any report method that can traditionally be used with MH Quantitative Analysis, and adds support for customization with the filtering, tagging, and user defined fields of the Productivity App. This document describes how to customize a method to take advantage of the those added functions and explains some technical details of how it is done. If you simply want to change the graphical settings of the default report methods, skip to the end of this document.

 

NOTE: This guide is only applicable to reports generated with python for use in MassHunter Quantitative Analysis.

 

This document assumes the reader has already installed the MassHunter Quant SDK and reviewed the provided documentation, such as the Reporting Developers Guide.pdf. This documentation can be found at <MassHunter Home>\SDKs\Quant\Documents once installed.

 

Technical Overview

The quant reporting system is invoked by the Productivity App as a command line process. At a high level, data from the Productivity App is passed to the reporting system by XML and then parsed into a global variable (APP_CONTROL_DATA) that is accessible from within the report script environment. This data consists of the compound results that were selected for reporting in the review page, as well as their associated tag and comment data.

 

The app uses its own support script to provide additional global definitions and functions to load, sort, and format result data. In addition, the resource manager (used to read entries from the report’s resource file) is automatically loaded into a global variable without the need to supply the name of the resource file. For further reference, this support script is located at <MassHunter Home>\Report Templates\Quant\PDF-Reporting\Codes\ProductivityReportCommon.py, and is automatically included in the script environment at runtime, so it does not need to be explicitly loaded.

 

Any report method can be imported into the app as long as it is supported by MH Quantitative Analysis. In order to be customized, however, the report method must reference at least one .resx file and be python based (contain at least one .py script).

 

Note: In addition to using the above mechanism to relay results filtering and tag information to the report method, we've also implemented a more native method that adds this information directly to the batch. When a result is selected, the corresponding TargetCompoundRow entry in the data set has its CompoundApproved flat set to true. Tag information is also added to the TargetCompoundRow UserDefined9 field in the form of an xml string.  

 

Step-by-step Method Creation

 

 

1. Define user option variables for your script

If you want to allow users to modify variables used in your report script (e.g. the document Title), copy a config.xml file from the default report methods and put it into your report method’s base directory with the other files. The base directory of a report method is <report method name>.m\DaMethod\Quant. This file contains xml entries for each variable (user option) that you wish to appear in the app while designing the report. Values that the user selects will be available for use through the APP_CONTROL_DATA global in your executing .py script. For an example, please see the report methods installed with the productivity app at <MassHunter Home>\Methods\Productivity App\Report Methods.

 

2. Update the reporting code to use AnalyzerReportCommon.py functions, if desired

The common code script contains function and class definitions traditionally included in Utils.py and PdfPageEvent.py, additional formatting functions, as well as functions that load the APP_CONTROL_DATA, RESOURCE_MANAGER, and other globals. 

   

3. Import your report into the App

In the admin page of the application, add your custom report method by navigating to and selecting the .m method folder. The application will scan the method to make   sure it’s correctly formatted. If there are any errors, the application will inform you of them.

 

 

Modifying Colors and Graph Styles in the Default Report Methods

You can format graph and text colors (and other graphical options) for any default report method by opening the method in MH Quant as you would normally and modifying any of the below options.



  • MassHunter Productivity App
  • app
  • Quant report
  • productivity
  • MassHunter
  • reporting
  • Share
  • History
  • More
  • Cancel
Anonymous

Agilent Community Feedback

Agilent Community Feedback

×
We are glad this was helpful! We are sorry this was not helpful. If you still need assistance please create a community post or contact support. To help us improve, please provide any additional feedback. For full details of how we will treat your information, please view our privacy policy.
Submit Cancel
Submit Cancel
Related
Recommended
Privacy Statement
Terms of Use
Contact Us
Site Help