A user report can be run directly from a hyperlink, instead of from the screen.
This capability includes running reports with filters that might need to change dynamically based on the context for which the report is being run. For example, if the filter for a report is a date, you may want run the report directly and specify today’s date in the hyperlink without prompting the user for the date.
This functionality will typically be used when:
Creating links on workflow activities or notifications that should run a report.
Creating links within other user reports that “drill down” into additional details (this is typically done with a calculated field that returns a hyperlink).
Syntax
To run a user report from a link, create the hyperlink and direct the HREF value to the the UserReport_Run page. Include the ID of the User Report in the URL.
Running a user report with static filter values
This example shows how to run a report with no filter values, or filter values that are static, from a hyperlink.
<a href="https://yourdomain/yourwebsite/Main/Report/UserReport_Run.aspx?UserReportID=27">Run a report directly from a hyperlink</a>
A user report with filter values that are specified in the hyperlink
This example shows how to run a report with filter values from a hyperlink.
Each filter value which is specified as “Prompt” = True (e.g. the Prompt field on the screen is checked for the filter) must be passed as a value in the hyperlink.
To supply filter values in the link:
Normally, the UserReport_Run page will prompt you for any parameters that it requires to run that report. To suppress prompting, the following must be added to the URL: &prompt=false
Example: UserReport_Run.aspx?UserReportID=27&prompt=false
You can pass the values in one of 4 different ways as follows:
By UniqueName – Every data field in the Equus Platform has a behind-the-scenes UniqueName from the Equus data dictionary. A parameter can be passed to a report via the field’s unique name using the following convention: UniqueName=Value
Example: aspx?UserReportID=27&prompt=false&ASSIGNMENT!ID=128
Example: aspx?UserReportID=27&prompt=false&COST_ESTIMATE!CREATE_DATE=1/12/2008
By Caption – If the parameter is also included on the report and has a caption, it can be passed via that caption via: Caption=Value
Example: aspx?UserReportID=27&prompt=false&Company Name=DCL Technologies
Example: aspx?UserReportID=27&prompt=false&COST_ESTIMATE!Report Date=5/24/2007
By Sequence – If a data field is being used multiple times in the above two methods will not work correctly and it will apply the value to both prompts. When using a single field more than once for a filter (like a date is less than and greater than filter) you can pass a parameter by its sequence: Sequence=Value
Example: aspx?UserReportID=27&prompt=false&1=500.00
Example: aspx?UserReportID=27&prompt=false&1=1/1//2007&2=1/1/2008
By Context – Certain querystring parameters are used throughout Equus Platform and also work for passing parameters to reports. They are CompanyId, EmployeeId, AssignmentId, PropertyId, and UserId. They work in the following manner:
CompanyID – Will be used to fill any prompt for ID or [ANY TABLE].COMPANY_ID fields.
EmployeeID – Will be used to fill any prompt for EMPLOYEE.ID or [ANY TABLE].EMPLOYEE_ID fields.
AssignmentID – Will be used to fill any prompt for ASSIGNMENT.ID or [ANY TABLE].ASSIGNMENT_ID fields.
PropertyID – Will be used to fill any prompt for PROPERTY.ID or [ANY TABLE].PROPERTY_ID fields.
UserID – The currently logged in user will be used to fill any prompt for USER_ID columns, or any audit fields (CREATE_BY, LAST_UPDATE_BY).
Account Sums – Since a single account sum field can have multiple prompts, a slightly different convention is necessary for them. Account Sum prompting can be accomplished with the following command line parameters:
From Tax Year=Value: Will fill all “From Tax Year” account sum prompts.
To Tax Year=Value: Will fill all “From Tax Year” account sum prompts.
Paid To=Value: Will fill all “Paid To” account sum prompts.
Payor=Value: Will fill all “Payor” account sum prompts.
Code=Value: Will fill all “Reimbursement Code” account sum prompts.
Policy Standing=Value: Will fill all “Policy Standing” account sum prompts.
Blank Payroll Date=Value: Will fill all “Blank Payroll Date” account sum prompts.
From Payroll Date=Value: Will fill all “From Payroll Date” account sum prompts.
To Payroll Date=Value: Will fill all “To Payroll Date” account sum prompts.
From Report Date=Value: Will fill all “From Report Date” account sum prompts.
To Report Date=Value: Will fill all “To Report Date” account sum prompts.
From Expense Date=Value: Will fill all “From Expense Date” account sum prompts.
To Expense Date=Value: Will fill all “To Expense Date” account sum prompts.
Other Notes
If a parameter is able to be filled from multiple places (CREATE_BY) for example, they are filled in the following order: UniqueName, Caption/Acct Sum, Sequence, Context.
Any parameters passed via the querystring use the operator defined in the filter, not “equals”. MyDate=1/1/2008 will run as MyDate > 1/1/2008 if the filter is set up that way.
