Reports: How To Change a Column
Want to change one of the column headings in one of the standard reports? Here’s how you do it. For this tutorial we’ll be using the ASA Master Pilot log template. We’ll replace the “Rotorcraft” column with “Jet”.
Step One: Preparation
- In the Mac OS X Finder, navigate to your home folder, and then into Library/Application Support/LogTen Pro/
- From the “Sample Report Templates” folder copy the “ASA Pilot Master Log” folder into the “My Report Templates” folder
- From the new “ASA Pilot Master Log” folder you just copied in the “My Report Templates” folder, open “pageOne_header.html” with your favorite text editor. Mac OS X comes with “TextEdit” which will work just fine.
NOTE IF YOU’RE USING TEXT EDIT:TextEdit will try and display the HTML as it would appear in a browser which is no good if you need to edit the code! So before opening files in TextEdit, open TextEdit and go to the preferences, Switch to the “Open and Save” tab and check the first box to “Ignore rich text commands in HTML files”.
Step Two: Changing the Column Header and Footer
- In pageOne_header.html replace:
<th id="rotorcraft">Rotorcraft</th>
With this:
<th id="jet">Jet</th>
Note: The “id” value is for use in the CSS. You don’t have to change it but it just makes things more clear. So for example if you wanted to change the width of the column, you would set this in the style.css file. Right now it does not have an entry in the style.css, but if you wanted to set it you would simply make a new line like this:
#jet{width:0.5in;}This would set the width of the column with an “id” of “jet” to half an inch.
- Now we need to change the Totals so they will display jet time and not rotorcraft time! So we need to replace:
<td><?ltp keypath=@sum.flight_category2; scope=page; ?></td>
with:
<td><?ltp keypath=@sum.flight_engineType1; scope=page; ?></td>
Note: category, class, and engine type time values are available for all values listed in the aircraft type tab of the resource manager in the order they appear there. So for example if you clicked on the Engine Type menu you will see Jet, Turbine, Turbo-Prop, Piston, etc. Piston would be referenced as flight_engineType4.
That takes care of the page total, but we still need to replace the balance forward and to date totals so, replace:
<td><?ltp keypath=@sum.flight_category2; scope=forward; ?></td>
with:
<td><?ltp keypath=@sum.flight_engineType1; scope=forward; ?></td>
and replace:
<td><?ltp keypath=@sum.flight_category2; ?></td>
with:
<td><?ltp keypath=@sum. flight_engineType1; ?></td>
Step Three: Changing the Row
-
This is the easiest part! We’re almost done. You can close the pageOne_header.html file and open pageOne_row.html.
This is probably starting to look at least a little bit familiar.
In pageOne_header.html replace:
<td><?ltp keypath=flight_category2; ?></td> <!-- Rotorcraft -->
with:
<td><?ltp keypath=flight_engineType1; ?></td> <!-- Jet -->
Step Four: Updating the Style
Now that you’ve customized the report, you’ll probably want to change the name so you can find it more easily in LogTen! Open the “style.css” file. At the top you find a section that looks like this:
/* Report Name: ASA Pilot Master Log™ Description: A LogTen Pro report template style based on the ASA Pilot Master Log™, print out, punch and place in a quality binder for the ultimate presentation. Version: 1.0 Author: Noah Lieberman Author URI: http://coradine.com Credits: Report Type: twoPage Rows Per Page: 20 Data Type: Flight */
Change the name, description, author, and other attributes as appropriate and save. Now when you go into LogTen Pro and click Reports you’ll see your new report in the list.
Want to change the font?
In the style.css file you can also change things like the font, font sizes, column widths, colours, etc. The handwriting font that we use is called “j.d.”, so if you wanted to use Helvetica for example instead, you could simply search for any occurrence of “j.d.” in the style.css file of your report and replace it with Helvetica, or whatever other font you want!
About this entry
You’re currently reading “Reports: How To Change a Column,” an entry on Coradine Aviation Systems
- Published:
- 29.Dec.2006 / 10:29 am