Unit 17 Row Attributes & Record Level Print Conditions

Unit 17

Row Attributes

Record Level Print Conditions

Introduction

The Report Designer tool provides two methods to conditionally control the printing of an individual line on a custom report. Both methods can be seen by first going to the Layout screen of a report and click on the Show Rows button. Next, click on the desired row so that it is highlighted in red.


Next, click on the Edit button at the bottom of the screen to enter the row's attributes.


Once, the Edit button has been pressed the following screen will appear.


Here, there are two methods for controlling if the row will print or not. The top block is called Row Attributes and the bottom is called Record Level Print Conditions. These two blocks represent two different methods and cannot be combined. Either the Row Attributes can be used, or the Record Level Print Condition.

Row Attributes - Print Condition

When a Print Condition results as true then the row will print, if the Print Condition results as false (nil, or "") the row will not print.

The Print Condition attribute is found under the Attribute prompt.


If you preform an F9 lookup at the Attribute prompt, it will display all available row attributes. The following is a description of each row attribute:

Mnemonic / Name / Description / Choices
BeginGray / Begin Gray Box / Identifies the starting row for a gray box. / Yes/No
EndGray / End Gray Box / Identifies the ending row for a gray box. / Yes/No
Gray / Gray / Determines if the Row should print with a Gray background. / Yes/No
PrintCondition / Print Condition / Used to determine if the area to which it is applied should print. A value indicates true and the area will print, while no value indicates false and the area will not print. Can set up a rule here. / Free Text, Rule


The Print Condition attribute will accept either a free text value in the Value column or a rule in the Rule column. The Value column is most commonly used to permanently suppress a row by setting the value to "" (two double quotes). This will always stop the line from printing.


Any other free text alpha-numeric characters in this prompt, such as the number 1 or the word “GO,” will always force the line to print.

To conditionally control the printing of the row, an existing rule can be assigned to the rule column of the Print Condition.


To create a new rule click on the “New” button or use an existing rule by entering it's mnemonic or choosing it from the lookup available. The result of the rule will control the printing of the row in the same manner as the Value column. If the rule returns a "" or nil value, the row will not print. If the rule returns any alpha-numeric value, again such as the number 1 or the word “GO”, the line will print.

Example:

On an OmOrd report, we are printing the Admit Date and Time of the patient as well as the amount of days between the admit date and the order date of a patient order. On the report's layout the elapsed number of days are printing on the last row of detail (see picture below). What we would like to do is conditionally print this line only when the patient actually has an Admit Date and Time. To do this, we must set up a rule that will be used as the Print Condition of the row.


Steps: Click on the Row button, highlight the last detail row, and then click on the Edit button. At the Attributes prompt choose Print Condition, then enter over to the Rule column, and click New Rule.

Picture here:

For the rule, add the internal variables of PAT and OUT on the Main screen.


On the Fields screen of the rule, add the fields of OmOrd.RegistrationOid and RegAcct.AdmitDateTime. The key of OmOrd.RegistrationOid should default correctly as V0.


The key of RegAcct.AdmitDateTime should be set to the variable REG which will have the OmOrd.RegistrationOid field saved into it.

To suppres the line based on whether or not the RegAcct.AdmitDate field has a value or not, an IF statement should be created using the Exists operator to evaluate this field.

The English Display of this rule will look like this:


The value of 1 saved as OUT, places a true value into the variable only if the condition passes. Instead of the number 1, any free text or numeric value could also have been used.

File the rule and this should then control the printing of that row based on the IF condition in this rule.

Note:

  • To control the printing of multiple rows you can add the same rule to additional row Print Conditions.
  • Also, note that you will not want to increment any counter e_variables in Print Conditions called from a row, this should be done in Region print conditions.

Region Attributes – Print Condition

The same Print Condition attribute which can be seen on the Row attributes can also be used on the Regions page. This attribute works the exact same way in both places. If the Region Print Condition attribute returns a TRUE value the entire region will print. If the Region Print Condition returns a false or nil value, the entire region will not print.

Note:

  • A Print Condition attribute should never be placed on the DR1 region of a report. If the print condition does not evaluate to be true, the report will think there are no records found.

Row-Record Level Print Conditions

The Row-Record Level Print Conditions section also allows the user to control if a single line prints or not. Instead of using a rule however, an individual record can be controlled by using Selection style operators.


Apply To All Records – Allows the user to control all fields on a line with a single condition or only fields from a single record.

Field – Allows a standard field to be defined.

Operator – Allows a selection operator to be defined.

Value – Allows a Free Text value to be entered.

Rule – Allows a rule to be defined instead of a standard field.

For example, to only print a line if the OmOrd RegistrationOid.AdmitDateTime field is populated, the “Apply To All Records” prompt should be marked as “Yes.” This prompt allows the user to suppress all fields on a line, or only fields from a specific record.


This set up will produce the same results as the using the Print Condition with a rule as shown in the last example.

To reference a rule in the Record Level Print Conditions, no field should be defined in the Field column, only the Apply To All Record and the Rule column must be populated.


Like the Print Condition attribute, the condition will pass if the rule returns a value. If a nil value is returned from the rule, the line will not print.

If a single line contains fields from more than one record, for example OmOrd.Main and RegAcct.Main, the Record Level Print Condition can be used to suppress only one or the other.

By saying “No” to “Apply To All Records,” the user can choose which records the condition will affect.


By only checking off the RegAcct.Main record, the user can then create a condition based on a field from RegAcct.Main.


If this condition fails, then any fields from the RegAcct.Main record will not print, but any fields from OmOrd.Main will display on the report output.

Region-Record Level Print Conditions

The previous method can be used on any single row to suppress a line from printing. The next technique concerns situations where the user wants to suppress multiple lines at the same time using the Record Level Print Condition.

To suppress multiples lines at once, the “Show Rows” button should be unchecked and the entire region should be highlighted.


Next press, the Edit button in the footer and the following screen will appear.


Just like the Row-Record Level Print Conditions, a Select style operator can be applied to each record.


If more there are more than one record listed on this screen, separate conditions can be added to each by selecting each record.

Report Designer Workshop – Unit 17 Row/Region Attributes

Directive

Edit your OmOrd workshop report from Unit 16, to include some additional fields for medication orders. Add these fields to their own detail row. Then set up a Print Condition to only print that row when the Category of the order is a medication (MED).

Fields

Add the following OmOrd fields to the report:

  • PhaDose
  • PhaRoute
  • PhaFrequency

Layout:

1.Auto Format these fields and labels onto the layout

2.Drag the fields and labels to their own detail row

3.Remove any blank lines which do not print fields

4.Click on the Show Rows footer button and highlight the row where you placed these fields

5.Click on the Edit button to enter that row's attributes

6.Add a print condition that will only print this row if the category is medication

7.NOTE: There are two possible ways this print condition could be set up

8.Run the report to make sure that only MED category orders appear on the output.

Page 1 of 12