Generating a report with report builder for just my internal standards

Hello, I'm pretty new to Agilent but I have worked with every major manufacturer of LC/MS and Agilent by far has the worst method of making custom reports. Also why is there no comprehensive user guide to report builder!

I just want to create a report that shows my 3 internal standards responses/ areas (EPA method 533) across my calibration curve and my worklist run. I posted below a picture of what I would like it to look like or at least the information I need it to display to meet my QA/QC manager's requirements for reporting.

  • Hello  ,

    This type of report can be challenging to set up in Report Builder due to how data is stored and retrieved from Quant batch files. There is an example of one solution for this type of report in this discussion.

    (+) Report Builder assistance - Forum - Mass Spectrometry Software - Agilent Community

    This will set up the part with samples in rows and compounds in columns.

    To perform the averaging and acceptance limit calculations you will need to utilize techniques from this discussion to set up some variables in the report and use those for the calculations.

     (+) Add statistics (mean, stdev) for a column in MassHunter Report Builder - Forum - Mass Spectrometry Software - Agilent Community

    Ultimately this type of report would be more easily done with Python based reporting, though that requires familiarity with Python and relational database queries. You can install the SDK for documentation on these types of reports using these instructions.

    (+) Mass Hunter SDK - Forum - Mass Spectrometry Software - Agilent Community

  • Hey the link you sent to calculate mean and STD doesn't make sense to me. I got everything else to work so now I have a report that displays area counts of my standards but I would like it to calculate the average area count of my internal standards in my standard curve. Could you walk me through how to do that?

  • Hello  ,

    The example template for mean and stdev calculation shows how variables declared in expressions persist through the template. Variables are initialized at the beginning of a report, updated through each line of the table, and then finally reported once the table is complete. 

    This first expression creates the list variables Resplist and Heightlist that will contain the response and height results for each run and sets some other variables for this template. All you would need to do is initialize a list for each of your ISTDs. You could just call them ISTD1Resplist, etc.

    Then within the table the lists are updated as each row is reported. As always, first you have to check to see if there is a result and handle that case first, otherwise reporting will halt with an error. For the simplest case you would only need this first section where you either append a 0 to the list for no result or append the result itself. The rest of the code in the example is for handling the specific case of this OFN report example, which is to average only 8 runs.

    You would replace the "TargetPeak" in this example with the binding name for your ISTD result and update the individual ISTD response list defined previously. Depending on your table layout you could do this in a thin column beside each result, or you could do all of your ISTDs in one textbox if you have them all on one row. Here is a partial example of what that might look like - 

    x = 0 if BoundItems["ISTDResult01"] is None ...
    ISTD1Resplist.append(x)

    x = 0 if BoundItems["ISTDResult02"] is None ...
    ISTD2Resplist.append(x)

    If you do not have a line that just list a variable, then nothing will be printed in the table for this textbox. In the OFN example they are either printing the characters "--" or the result of the calculation. But it is fine to have nothing printed.

    Then you would add a table or text box after your result table that contains your calculation and result. In your case, averaging the list of responses. For each ISTD you could use something like this.

    import System
    import System.IO
    import math

    mean = sum(ISTD1Resplist) / float(len(ISTD1Resplist))
    mean

    Ultimately it may be safer and clearer if you created an averaging variable for each ISTD result, but hopefully this gives an idea of how to utilize this feature of the report templates.

Was this helpful?