Open wellerjes opened 1 year ago
Excel likes to reformat dates/numbers
That must be a universal problem, surely there's a solution for it??
(One might involve avoiding Excel - does sheets or something do this without that??)
@Jegelewicz ??
I think @mkoo has a better recipe for sizing, but it will come down to CSS - separately, in <style>
tags, or inline as you have it (but that's not much fun to maintain).
https://www.w3schools.com/cssref/css_units.php - you probably DON'T want this as a percentage (but it's also probably possible if you have some reason, CSS is full of crazy unit conversion assumptions that can be used in 'interesting' ways).
Formatting should be done in the SQL (or in the post-query processing - anywhere but the label!). I'll probably need more specifics, but instead of:
#continent_ocean#, #country#, #state_prov#, #county#, #spec_locality# (#habitat#)
I would use this:
concat_ws(', ',continent_ocean,country,state_prov,county,concat(spec_locality,' ('||habitat||')'))
concat_ws is "concat with separator"
Separator is comma-space
concat ignores nulls, the ||
concat operator does not, so the last term is a concat of specloc and either a NULL (nothing in concat-land) or the term with the punctuation (which all evaluates to NULL when the term itself is NULL).
You can use that same logic to simplify eg
CASE WHEN verbatim_coordinates IS NULL THEN '' ELSE CONCAT('Verbatim coordinates: ', verbatim_coordinates) END coordinates,
to
'Verbatim coordinates: ' || verbatim_coordinates coordinates
https://github.com/ArctosDB/arctos/issues/6098 is happening now and might change how you want to deal with collector numbers.
And do please feel free to just let me know what you want to see and I'll write SQL for it, in small steps (eg one "label section" at a time) if necessary.
@wellerjes if you import data to Excel rather than just opening it there you can avoid the automatic changes. See https://handbook.arctosdb.org/how_to/How-to-Excel-for-Arctos.html#downloading-data
@wellerjes I just finished making a mail merge report for UWBM:Mamm. I found that if you don't open the csv, everything works great. If you MUST edit something in the csv, editing in Notepad will also ensure that nothing changes.
If you still want to use mail merge - let me know if I can help.
Could someone please help me with creating a new template for CHAS:Herb?
Description of the report We have been using the mail merge, but since Excel likes to reformat dates/numbers, I would like to get the new reporter setup so we don't have to spend as much time reformatting and checking for errors.
Collection for which the report is needed CHAS:Herb
SQL used in ColdFusion report This is the original, but it no longer works when I try to pull use the old reporter: CHAS_label_herb.cfr