I have managed to get a custom grid on the print layout to convert northing and eastings (XY) to ESPG:27700 grid references i.e NS00 through to NS99.
The problem I am coming across is when when NS99 crosses into NT00 (see image)
As you can see the x axis will change, but the Y axis on the right hand side should change to NT rather than NS, I know why it isn't - the expression based annotation is reading the NS query first and thus overring the NT query. The same happens on the X axis when you move down from NS to NX (it will read the NS query first).
Is there any way of getting the grid sidings to read independently from each other? Because this has been a real head scratcher for me...
Right now I have 55 different print layouts for each 100km square across the UK, but would love to just have one, and not have to fudge in labels when I have to map across a boundary!
Edit: expressions
case
when @grid_axis = 'x' and
(@grid_number >=200000) and (@grid_number <300000)
then'NS' + left(right(@grid_number,5),2)
when @grid_axis = 'y' and (@grid_number >=600000) and (@grid_number <700000)
then 'NS' + left(right(@grid_number,5),2)
when @grid_axis = 'x' and (@grid_number >=300000) and (@grid_number <400000) then 'NT' + left(right(@grid_number,5),2)
when @grid_axis = 'y' and (@grid_number >=600000) and (@grid_number <700000)
then'NT' + left(right(@grid_number,5),2)
end