Creating and Running Reports
Creating reports in the graphical user interface is done in "Definitions > Reports". You may create reports based on object filters (query filters) and refine them; use the preview functionality to make sure your settings are correct. Once you have created a report, you can generate the report output manually or schedule it to run automatically. You can also generate reports with Redwood Script.
Context-Menu
Reports support the following context-menu actions:
Action | Description |
---|---|
Submit Report | Submit a report definition to generate the report |
Edit Security | Edit the security of the report |
Duplicate | Make a copy of the report to create a similar one |
New Report Definition | Create a report definition, allows you to change parameters easily |
Delete | Delete the report |
Report Preview | Generate and display a preview of the report |
Export > Export | Export the report into a CAR file |
Export > Export with related objects | Export the report into a CAR file including referenced objects |
Promote > Promote to system | Promote the object to a remote system |
Promote > Edit further then promote | Edit the export rule set prior to promoting |
Promote | Promote the report to another Redwood Server instance |
Edit | Edit the report |
Show permalinks | Show links that can be used from third party applications to link to the object |
Add to navigation bar | Add the current object to the navigation bar |
New report | Create a new report |
Filter > New Filter | Create a new report filter |
Filter > Edit Filter | Edit current report filter |
Filter > Delete | Delete current report filter |
Filter > Duplicate Filter | Create a copy of the filter |
Filter > Export Filter | Export the filter into a CAR file |
Filter > Add to navigation bar | Add the filter to a navigation bar |
Filter > Create filter from search | Create a filter from the current IntelliSearch query |
Prerequisites
- The Module.Scripting license key set to
true
Procedure
Create the report definition
- Navigate to "Definitions > Reports".
- Choose New Report Definition from the context-menu.
- On the Report Definition tab, fill a name into the Name field and choose a filter name in the query field.
- On the Selections tab choose a column and a condition.
- On the Sorting tab, choose the columns you want to sort by and give each a unique sort order.
Generate the report output
- Navigate to "Definitions > Reports".
- Choose Submit Report from the context-menu of the report.
- Fill in or change any parameters if required and choose Submit.
- Navigate to "Monitoring > Processes" and locate the report you just submitted.
- In the lower details pane of the report, expand Files and choose report.
Tabs
The configuration details for reports can be found in the Configuration Data for Reports section of the documentation.
Example
Create a report for the error processes in the production environment
- Navigate to "Definitions > Reports".
- Choose New Report Definition from the context-menu.
- On the Report Definition tab, fill
AllErrorJobs
into the Name field andJob.state.Error
into the query field. - On the Columns toggle the Display value for LLP Version in the list.
- On the Selections tab fill
Remote System
into the Left Report Column field, choose Matches Regex in the Operation field, and enterPR*
in the Value field of the Column/Value area. You have to choose the radio button to fill the Value field. - On the Sorting tab, enter JobId and
1
in the Sort Order field. - Choose Save and Close to leave the edit window.
Generate the report and view its output
- Navigate to "Definitions > Reports".
- Choose Submit from the context-menu of the report definition AllErrorJobs.
- Leave
HTMLText
as the Output Format and choose Next, Next. - Fill a queue into the Queue field that has the report service, usually System, and choose Submit.
- Navigate to "Monitoring > Processes" and locate the report you just submitted.
- In the lower details pane of the process, expand Files and choose report.html.
Create a report to display all processes in error that were scheduled to start in the past month
- Navigate to "Definitions > Reports".
- Choose New Report Definition from the context-menu.
- On the Parameters tab, create a new parameter named Start of type Date Time Zone with the Default Expression
=Time.expression(Time.now('GMT'), 'subtract 1 month')
. - On the Report Definition tab, fill
AllErrorJobs
into the Name field andJob.state.Error
into the query field. - On the Columns toggle the Display value for LLP Version in the list.
- On the Selections tab, fill
ScheduledStartTime
into the Left Report Column field, choose Greater Than in the Operation field, choose the Parameter radio button and select Start in the Parameter field. - On the Sorting tab, enter JobId and
1
in the Sort Order field. - Choose Save and Close to leave the edit window.
- Choose Submit from the context-menu of the report.
- Leave
HTMLText
as the Output Format and choose Next, Next. - Fill a queue into the Queue field that has the report service, usually System, and choose Submit.
- Navigate to "Monitoring > Processes" and locate the report you just submitted.
- In the lower details pane of the process, expand Files and choose report.html.
Create and run a report in RedwoodScript
import com.redwood.scheduler.api.model.report.Reporter;
import com.redwood.scheduler.api.model.report.ReportDestination;
{
String query = "select Job.JobId,Job.Description from Job where Job.JobId <= 244";
Reporter reporter = jcsSession.createReporter(jcsOut);
ReportDestination destination = reporter.getCSVReportDestination();
jcsSession.executeQuery(query, null, destination);
}
See Also
report reporting