This example will show how to vary the depth shown on each page of a log using Project and Location Options. This was commonly done in gINT using ‘Depth Log Page’ fields (or similar), and we will use a similar approach here...
You can set this up so that there is a Project Option for ‘Units Per Page’ and a Location Option for ‘Units Per Page’. If both Options are entered, the Location Option will override the Project Option.
To set this up, you can add a Project Option group named ‘ProjectOptions’ with a ‘UnitsPerPage’ header. (You can name the group and header whatever you'd like, but these are the names used in this example.)
You can also add a Location Option group named ‘LocationOptions’ with a ‘UnitsPerPage’ header.
To control how the Options groups are used when generating logs, you will need to open your Borehole Log template(s) in Template Studio and enter a ‘Units per Page’ expression under Design>Template Setup.
The expression we will use is:
if(isblank([LocationOptions.UnitsPerPage]),[ProjectOptions.UnitsPerPage],[LocationOptions.UnitsPerPage])
We can then check how this works…
First, we’ll enter a Project Option of 7 Units Per Page, (Save), and generate Log Reports and see that both Locations now show 7 m per page:
Then we will add a Location Option of 12 m for BH1 and see that it now shows 12 m per page, while TP1 without a Location Option stills show 7 m per page (using the Project Option).
Then, we will remove all of the Options and see that the Log Reports default to our settings in our Report Profile, in this case 10 m for Geotech BH ‘BH1’ and 3 m for Test Pit ‘TP1’.
If the ‘Units per Page’ expression does not return a value, such as if a Project or Location Option is not entered (as above), it will use the default Units per Page defined in the template or Report Profile when generating Quick Logs or Log Reports.
Alternatively, you could modify the expression to return a default value, such as...
If you want the Expression to return a default value when Options aren’t entered, you can use an expression like below. This expression will result in 10 units per page if both Options are not entered, rather than defaulting to the Report Profile or template settings:
if( isblank([LocationOptions.UnitsPerPage]), if( isblank([ProjectOptions.UnitsPerPage]), 10, [ProjectOptions.UnitsPerPage], ), [LocationOptions.UnitsPerPage] )
(Formatted to 1 line:)
if(isblank([LocationOptions.UnitsPerPage]),if(isblank([ProjectOptions.UnitsPerPage]),10,[ProjectOptions.UnitsPerPage]),[LocationOptions.UnitsPerPage])
Or if we want to vary the default value based on Location Type, we can use an expression like below. This expression will result in 3 units per page for Test Pits and 10 units per page for other Location Types:
if( isblank([LocationOptions.UnitsPerPage]), if( isblank([ProjectOptions.UnitsPerPage]), if([LocationDetails.LocationType]='Test Pit',3,10), [ProjectOptions.UnitsPerPage], ), [LocationOptions.UnitsPerPage] )
(Formatted to 1 line:)
if(isblank([LocationOptions.UnitsPerPage]),if(isblank([ProjectOptions.UnitsPerPage]),if([LocationDetails.LocationType]='Test Pit',3,10),[ProjectOptions.UnitsPerPage]),[LocationOptions.UnitsPerPage])
There are many potential variations to how your Options and Units per Page expression can be set up to achieve the behavior you would like.
Additional Notes
A common question we get is if you need to have a Project Option header for the Units per Page… The answer is no – you could use only a Location Option if you like, in which case a Units per Page expression such as this could be used, which simply refers to the Location Option:
[LocationOptions.UnitsPerPage]
Or this expression could be used, if you’d like to include a default value (10 in this case):
if(isblank([LocationOptions.UnitsPerPage]),10,[LocationOptions.UnitsPerPage])