First, open the Reports folder in LogTen's main navigation bar, by going to the "Help" menu and selecting "Show Custom Reports Folder".
In the reports folder, you will find two important folders, “Sample Report Templates” and “My Report Templates”. LogTen will look for your template in the “My Report Templates” folder, so the easiest way to start a new template is to copy one from the “Sample Report Templates” folder into the “My Report Templates” folder.
For each report template, there is a Cascading Style Sheet (CSS) file called “style.css”.
In this file, you specify the report type, name, description, author, version, number of rows per page, etc. AND this is also where you define all the styles that apply to the report. This means you can affect numerous things, including colours, column widths, fonts, sizes, etc.
Going into the details of working with CSS, its rules, formats, and capabilities is beyond the scope of this document, however, there are numerous references online, that should help you if you are unfamiliar with it. Many things should be fairly obvious simply by browsing the style.css file.
Note that since many reports share common styles, you may want to look in the Tools folder at the coradineBaseStyle_v2.css file. All reports include this style, so you can override any style by simply adding the same style to your reports style.css file and changing the parameters.
The various report styles, such as one page, two page, totals, have slightly different sets of HTML files, however, they are very similar. Primarily they will consist of:
-
Document Header and Footer: These will occur only once for the whole report, the header at the beginning, and the footer at the end.
-
Page Header and Footer: These will occur once for each page of the report, the header at the beginning, and the footer at the end.
-
Page Row: These will repeat for every row of the report.
Keys and telling LogTen where to insert data
<?ltp keypath=xxx; ?>
Within each of the files are keys for LogTen where data is to be inserted. Each marker looks like <?ltp keypath=xxx; ?>
and has a key ("flight_totalTime", for example) that LogTen uses to replace with data from the current flight as it builds the report, for example, every time LogTen comes across this: <?ltp keypath=flight_totalTime; ?>
it will replace it with the total time for the current flight it's inserting.
A complete list of report keys is available by selecting "Display Available Report Keys" from the "Window" menu on the Mac version of LogTen
In addition to the key itself, there are a few other optional additions:
Date and Time Formats
dateFormat="MM/dd/yyyy HHmm";
-For any items that are a time or a date, you can customize the format. For a complete list of available formats, go here: http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns
Predicates
predicate="flight_totalTime > 0";
-This is a logical statement that will only replace the main keypath with a value if the predicate returns true, for example <?ltp keypath=flight_totalTime; predicate="flight_PIC > 0"; ?>
will show the total time for a given flight, but only if the flight's PIC time is greater than zero.
Calculating Sums
@sum
-This is used in front of a keypath to indicate that you want the sum of the key rather than the value from an individual flight. <?ltp keypath=@sum.flight_totalTime ?>
will give you a sum of total time for all flights that took place before the current location in the report.
Balance Forward
scope="forward";
-This is an optional addition when you are working with a key that has an '@sum.' in it, "page" will give you the total for the current page, "forward" will give you a balance forward total or a carry forward total, depending on if it's at the top or the bottom of the report page.
There are a variety of reasons that can make a custom report not appear as it should. The following is a list of some of the issues that can occur.
-
Smart Quotes, when used causes the edited section to be unrecognizable. These turn the straight up and down quotes into curly ones. See the following for an example of each:
"Regular quotes" “Smart quotes”
This is turned on by default in TextEdit and will alter the text after you type it, so be sure it is turned off if you're using TextEdit or similar program (see screenshot below).
-
Spacing in LogTen's markdown needs to stay consistent with the surrounding code. If the spacing changes, it can cause a section to not appear as it should. See the following example of good and bad spacing:
- Good: <?ltp keypath=flight_selectedCrewSIC; ?>
- Bad: <?ltp keypath= flight_selectedCrewSIC;?>
The good spacing is consistent with other markdown used in the report. The bad spacing won't be interpreted correctly because there is a space following the = sign and there is no space between the ; and the ?.
Scopes in LogTen version 7.4+:
There was a general overhaul of the reports with 7.4. The biggest change was that some kinds of summary reports did not have the capability to retrieve past time values. If you added @sum.flight_totalTime
in a logbook report, you would get the entire Total Time for the logbook (up to the last entry in the report) regardless of whether the report was generated for the last 4 years or the last 4 days. The same @sum.flight_totalTime
in a summary report would either give you the last 4 years, or the last 4 days.
To accommodate this ability in the new system, scope=report;
was added. It retrieves the last 4 years or last 4 days in these examples, and a scope-less @sum.flight_totalTime
retrieves all Total Time from the entire logbook.
With only a rudimentary knowledge of HTML and CSS, you can create powerful custom reports. Read below to learn how to change a Column or the Font of your Custom Report.
For this example, we'll be using the ASA Master Pilot log template. We'll replace the "Rotorcraft" column with "Jet".
For a complete list of the available keys for reports, in LogTen go to Help->Display Available Report Keys.
- In LogTen, go to the "Help" menu and select "Show Custom Reports Folder"
- 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 text editor of choice. macOS 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 will not work 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".
- 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>
- 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 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 and click Reports you'll see your new report in the list.
It is also possible to change the fonts used in the reports. The process varies slightly depdning on the version of LogTen:
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 whichever font you prefer!
LogTen Versions 6 and later:
Starting in version 6 the format of the CSS files changed and most reports share a set of "core" styles that can be found in the tools folder. You can override any of them in the report style.css you can change the font back to JD (as used in version 5) or to any other font by inserting the following code:
@font-face {
font-family: "j.d.";
src: url(http://my.logten.com/fonts/jd.ttf) format("truetype");
}
tfoot td{
font-family:"j.d.", Verdana, Arial, Helvetica, sans-serif !important;
}
tbody td{
font-family:"j.d.", Verdana, Arial, Helvetica, sans-serif !important;
}
Often, our reports put the signature line in the pageOne_header.html file, but sometimes it is found in the pageOne_footer.html file (or pageTwo... if the signature line is on the second page of the report).
The signature section needs to be updated to add the image in the middle of it like this:
<td rowspan="3" class="signature">
I certify that the entries in this log are true,<br />
<img src="<?ltp special=reportDirectoryPath; ?>/signature.png" width="170" height="25">
<div class="sigLine"></div>
Pilot's Signature:
</td>
Then add this line to the bottom of the style.css file:
.sigLine {
border-bottom: solid 1px;
padding-left: 4px;
width: 98%;
}
If you need to get a digital copy of your signature, we suggest using Preview's built-in signature feature to capture it: Preview's Signature Function. You can then paste your signature into a blank document, resize it properly, and take a screenshot of your signature (command+shift+4, click and drag the area). Name the digital signature image “signature” and drag and drop it into the custom report folder and you should be all set. If the image appears to be slightly misshapen (too long or too tall), you can fine-tune the "width" & "height" values in the above code. You can change the default Coradine logo image on the cover page of reports with any image you choose. This can only be done using the Mac app.
Follow these steps to change the image:
- Open LogTen, and at the top, click on Window > Show Custom Reports Folder. This will take you to the directory.
-
Open the LogTen folder and select Sample Report Templates. Choose the report you would like to change the logo, Press [command] + C to copy the file, and then press [command] + Up Arrow to show the enclosing folder.
-
Open the *My Report Templates* folder. Press [command] + V to paste the file
- It is a good idea to rename the report folder to prevent confusion.
- Copy and paste your image file into the report folder.
- Drag the report folder to your file editing software. One free option is Visual Studio.
-
On the document_header page, find the Cover Page section.
-
Look for:
<img src="<?ltp special=reportDirectoryPath; ?>/../../Tools/logbook_cover.png"
- Replace /../../Tools/logbook_cover.png with the name of your image file.
- Navigate to the style.css tab. Find the report name.
- Type in the desired report name. Press [command] + S to save the file.
-
The report will be in the My Reports section of the Reports tab in LogTen.
In the example below, we will demonstrate, as an example, how to manually install a custom report, and explaining, at the same time, how to manually find the Custom Reports Folder.
It is worth noting that the Custom Reports folder can directly found both on iOS and Mac:
- On Mac, open LogTen and at the top, click on Help-->Show Custom Reports Folder. This will take you to the directory.
- On your iPhone or iPad, and provided that you are running iOS13 or later, you can take advantage of Apple's Files app. Please open the Files app, and navigate to On my iPhone-->LogTen-->Reports-->My Reports Templates.
To manually find it on your Mac:
1.) Download the .zip file containing the custom report, go to Finder and select the report .zip file and copy the .zip file to the clipboard.
2.) Open LogTen and go to the "Help" menu and select "Show Custom Reports Folder..."
3.) This will automatically open Finder, select the "My Report Templates" folder and paste the contents of your clipboard (right-click or control-click and select "Paste Item"). Double click the zip file so your custom report unzips.
4.) Go back to LogTen and select the Report page and then go to the "My Reports" option on the left-hand side. You will then find your custom report available for use.
Comments
Is there a list of predicates anywhere?
Hi david.henze
Since the LogTen reports use standard CSS coding, you should be able to find predicate information online. Available report keypaths can be found in the Mac app by selecting the Window menu from the top computer menu bar while LogTen is open.
if I wanted to reduce the number of columns in an export tab flights template, do I need to edit a CSS file? I went in and deleted the unnecessary headers and the matching keypaths in the row file. For some reason, all of the data is in the top row. I'm not able to figure out where/how to fix this. The flights tab is importing so many blank cells that the data is hard to use so I'm just trying to reduce to the necessary number.
hi jordanbrown5484, I would suggest using the "Dynamic Export Flights Tab" report. This report only exports the fields you have chosen to display in your logbook.
Please sign in to leave a comment.