Method Community

 

Use Parameters with a report

Last post 07-31-2013 4:07 PM by Method_Adam. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 06-19-2012 11:08 AM

    Use Parameters with a report

    I have a report that is using filtering within method.  However, the customer wants these filters to be printed on the reports.  So my only solution was to create 2 parameters within the report and have method assign values to these parameters based on some drop-down menus within method.  The parameters are PARAM_StartDate and PARAM_EndDate.  I have the reports formatted correctly, but when I try to set them up in method, I cannot assign the values to the parameters from the "Generate Report" options.

    Can someone point me in the right direction?

  • 06-19-2012 12:33 PM In reply to

    Re: Use Parameters with a report

    Answer

    Here's a decent work around as you cannot pass parameters from the Generate Report action. 

    Open a Method report and you'll notice one common table regardless of your report... the Company table. 

    • Add a custom field to the Company table to hold the parameters you want to pass to the report.
    • Just prior to generating the report, update the custom field created above in the company table
    • Use those fields in the report as needed
    • Back in Method just after the Generate Report action make sure clear the fields again

    This should work out nicely for what you're trying to do.

    ~C

     

     

  • 06-19-2012 12:56 PM In reply to

    Re: Use Parameters with a report

    Thanks Chad..  I think I understand what you mean.  I will try it out and see if I am on the same page.

    We are under the assumption that the end-user will not be able to "update the custom field created above in the company table" each time they want to run teh report.

    But I will see if I can get it to work that way

  • 06-19-2012 1:14 PM In reply to

    Re: Use Parameters with a report

    Worked like a charm.

    But can you explain the correct way to do this?

    "Back in Method just after the Generate Report action make sure clear the fields again"

  • 06-19-2012 1:41 PM In reply to

    Re: Use Parameters with a report

    CDS_Josh:
    "Back in Method just after the Generate Report action make sure clear the fields again"

    In the same vein as updating the company table before you generate the report, you'll want to make sure you clear those values from the table after the report is generated.  The last step is just housekeeping.

    ~C

  • 07-30-2013 8:14 PM In reply to

    Re: Use Parameters with a report

    How did you assign values to these report parameters from within Method?  Thanks!

  • 07-31-2013 4:07 PM In reply to

    Re: Use Parameters with a report

    Hi,

    I believe Chad is referring to the "Update field in table" action.  You'll want to use these actions to place a value in the fields before the generate report action, then clear them again afterwards.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
Page 1 of 1 (7 items)