18 Replies Latest reply on Oct 23, 2018 12:06 PM by darcyc Branched to a new discussion.

    MassHunter PDF_Reporting_Unknowns

    steventhornley

      <AnalystName>

       

      I want to be able to edit this field on my unknowns report and have tried editing a few files but I'm coming up empty.

        • Re: MassHunter PDF_Reporting_Unknowns
          ryoboyle

          Sorry for the delay. I added tags to this post to increase visibility.

           

          Is your question regarding the MassHunter Report Builder? If so, and if you have not done so already, then the Report Builder Familiarization Guide is a good resource to begin with: https://www.agilent.com/cs/library/usermanuals/public/G3335-90219_ReportBuilderFamiliarizationGuide.pdf

          1 person found this helpful
            • Re: MassHunter PDF_Reporting_Unknowns
              steventhornley

              That was helpful, and now I have a different question.

              How could I convert my report to a template report, because just changing the name to template returns an error when opening it in ReportBuilder, or how do I get rid of pages and have the sample chromatogram show up on one page with the hits for the report?

               

              I'm using one of the templates that reports unknowns, shows the chromatogram on the second page, then all the ion spectra on the following pages.

              I'm trying to keep it down to one page, top 10 rows of unknowns reported and the chromatogram.

                • Re: MassHunter PDF_Reporting_Unknowns
                  tmh

                  Hi Steven,

                   

                  Ir may be that you need to use expression to count the rows and then filter results based on this value. Another option would be use of area/height filtering in UA or embedded in the report itsellf. Filtering in the report can be done in data bindings that you can find e.g. in each table.

                   

                  I recently kept a webinar on this topic and try to remember to add link to this thread when I'm back at a office next week.

                   

                  p.s. Chaning report file type wont make it a template. PDF builder templates are code-like entities using specific programming inside MH and direct reports are Python or C# code and use iText language as well.

                   

                  -TMH

                    • Re: MassHunter PDF_Reporting_Unknowns
                      darcyc

                      Seeing that webinar is of interest, I hope you remember to add it, and any other resources that delve into the more technical aspects of creating report templates.

                      Thanks

                      • Re: MassHunter PDF_Reporting_Unknowns
                        steventhornley

                        I dug through the code, edited on Report Builder and still can not find where to change the decimal points on the Retention Time.

                          • Re: MassHunter PDF_Reporting_Unknowns
                            darcyc

                            What do you want to change the RT decimal places to? There are two Options that I can see, first is to set the Format>Field Format to:
                            Binding Name: Component (assuming that's your binding name)
                            Field Name: Retention Time

                             

                             

                            This will set it to 4 dp.

                             

                            Alternatively you could round to a different number of dp using Content Type Expression.

                            Open the expression editor and use the line:
                            round(BoundItems["Component"].RetentionTime,2)

                             

                            Where the "2" is the number of dp you want to round to.

                             

                            Hope that helps

                            1 person found this helpful
                              • Re: MassHunter PDF_Reporting_Unknowns
                                steventhornley

                                Where did you learn to write these expressions?

                                Could you provide a resource for my reference?

                                  • Re: MassHunter PDF_Reporting_Unknowns
                                    darcyc

                                    HA. I wish I could share a resource, and if you find one let me know. It was looking at other templates and guesswork.

                                    I'll breakdown the one I showed you and perhaps someone more knowledgeable can add osmething.

                                     

                                    Here's the expression:

                                    round(BoundItems["Component"].RetentionTime,2)

                                     

                                    the outer part is pretty straight forward and should be familiar to anyone who writes formulas in excel. The PDF reporting is based around Python, and this formula is native to that language as well. That's the first clue for writing expressions, when googling, also look for how python does things.

                                     

                                    Inside those brackets is the secret to pulling out data from the Masshunter results and manipulating it in formulas.

                                    The  BoundItems part refers to the data name of the results table you want to pull info out of. This is also part of the databindings that filter the results for the table you are working in:

                                    I'm fairly sure it's the Data Name you want to use not the Binding name, but I could be wrong. I haven't tested it by changing things around.

                                    Ok, so this data name has a number of data fields associated with it. You can see these when you add a filter in the data bindings:

                                     

                                    What I have done that might be useful is gone through all of these data tables/ fields and cataloged them. I can't seem to attach files so here's a link.

                                    I can't guarantee it's all spelt correctly as I used OCR to generate it rather than type all that stuff out manually, so use as a guide don't copy/paste.

                                     

                                    So for the Expressions the syntax is BoundItems[DataName].FieldName

                                    If you look at other templatesyou might get further clues on how to manipulate these values.

                                    Good luck, wish I could be more help.

                                    2 people found this helpful
                                • Re: MassHunter PDF_Reporting_Unknowns
                                  tmh

                                  Hi,

                                   

                                  In Report Builder when you select a value cell on the right hand side you will see its parameters. Now there you will see Format section where you have option to either link formatting to a value so that it follows how you have setup formatting in MassHunter software or input entry into Format. Note that if Binding Name and Field Name are filled that has priority over Format field.

                                   

                                  So to change RT formatting to three decimals select the corresponding value cell, remove Binding Name and Field Name values and input Format value that you want to use, in this case F3.

                                   

                                   

                                  You can use any Windows numeric format strings. Here's a reference for different options.

                                   

                                  Standard Numeric Format Strings | Microsoft Docs

                                  2 people found this helpful