Type | Template | Report |
---|---|---|
Excel | Template | Report |
Word | Template | Report |
Word | Template | Report |
Word | Template | Report |
Word | Template | Report |
xtt->MERGE( IV_BLOCK_NAME = ‘R’ IS_BLOCK =
{"T"=>[{"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2023-11-03", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>451, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2024-01-22", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>452, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2024-04-11", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>461, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2024-04-28", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>461, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2024-05-28", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>460, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2024-06-30", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>459, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2024-09-18", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>189, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"BERLIN", "LANDXTO"=>"Germany", "CARRNAME"=>"Lufthansa", "CONNID"=>"2402", "FLDATE"=>"2024-12-07", "DEPTIME"=>"10:30:00", "ARRTIME"=>"11:35:00", "PRICE"=>242.0, "CURRENCY"=>"EUR", "SEATSMAX"=>475, "SEATSOCC"=>32, "_GROUP1"=>"FRANKFURT-Germany-BERLIN-Germany", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"TOKYO", "LANDXTO"=>"Japan", "CARRNAME"=>"Japan Airlines", "CONNID"=>"0408", "FLDATE"=>"2023-11-03", "DEPTIME"=>"20:25:00", "ARRTIME"=>"15:40:00", "PRICE"=>1061.36, "CURRENCY"=>"JPY", "SEATSMAX"=>385, "SEATSOCC"=>367, "_GROUP1"=>"FRANKFURT-Germany-TOKYO-Japan", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"TOKYO", "LANDXTO"=>"Japan", "CARRNAME"=>"Japan Airlines", "CONNID"=>"0408", "FLDATE"=>"2024-01-22", "DEPTIME"=>"20:25:00", "ARRTIME"=>"15:40:00", "PRICE"=>1061.36, "CURRENCY"=>"JPY", "SEATSMAX"=>385, "SEATSOCC"=>373, "_GROUP1"=>"FRANKFURT-Germany-TOKYO-Japan", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"TOKYO", "LANDXTO"=>"Japan", "CARRNAME"=>"Japan Airlines", "CONNID"=>"0408", "FLDATE"=>"2024-04-11", "DEPTIME"=>"20:25:00", "ARRTIME"=>"15:40:00", "PRICE"=>1061.36, "CURRENCY"=>"JPY", "SEATSMAX"=>385, "SEATSOCC"=>373, "_GROUP1"=>"FRANKFURT-Germany-TOKYO-Japan", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"TOKYO", "LANDXTO"=>"Japan", "CARRNAME"=>"Japan Airlines", "CONNID"=>"0408", "FLDATE"=>"2024-06-30", "DEPTIME"=>"20:25:00", "ARRTIME"=>"15:40:00", "PRICE"=>1061.36, "CURRENCY"=>"JPY", "SEATSMAX"=>385, "SEATSOCC"=>364, "_GROUP1"=>"FRANKFURT-Germany-TOKYO-Japan", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"TOKYO", "LANDXTO"=>"Japan", "CARRNAME"=>"Japan Airlines", "CONNID"=>"0408", "FLDATE"=>"2024-09-18", "DEPTIME"=>"20:25:00", "ARRTIME"=>"15:40:00", "PRICE"=>1061.36, "CURRENCY"=>"JPY", "SEATSMAX"=>385, "SEATSOCC"=>51, "_GROUP1"=>"FRANKFURT-Germany-TOKYO-Japan", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"TOKYO", "LANDXTO"=>"Japan", "CARRNAME"=>"Japan Airlines", "CONNID"=>"0408", "FLDATE"=>"2024-12-07", "DEPTIME"=>"20:25:00", "ARRTIME"=>"15:40:00", "PRICE"=>1061.36, "CURRENCY"=>"JPY", "SEATSMAX"=>385, "SEATSOCC"=>15, "_GROUP1"=>"FRANKFURT-Germany-TOKYO-Japan", "T_COLOR"=>[]}, {"CITYFROM"=>"FRANKFURT", "LANDXFROM"=>"Germany", "CITYTO"=>"NEW YORK", "LANDXTO"=>"USA", "CARRNAME"=>"Lufthansa", "CONNID"=>"0400", "FLDATE"=>"2023-11-03", "DEPTIME"=>"10:10:00", "ARRTIME"=>"11:34:00", "PRICE"=>666.0, "CURRENCY"=>"EUR", "SEATSMAX"=>330, "SEATSOCC"=>321, "_GROUP1"=>"FRANKFURT-Germany-NEW YORK-USA", "T_COLOR"=>[]}]}
).
Статическое объединение
Если объединение известно заранее его можно указать напрямую в шаблоне
Ячейки B3:H3 & B5:F5
Результат
Объединение может быть не только горизонтальным но и вертикальным
Ячейки B2 & E2
Результат
Дополнение ‘;merge=X’
Если же нужно объединить ячейки “параллельно” выводу отчета и их количество не известно заранее можно воспользоваться дополнением ‘;merge=X’
те для вывода по строкам (обычное поведение) дополнение работает для строк, и для вывода по столбцам работает наоборот для столбцов
Объедение работает для одинаковых значений!
Обратите внимание на ячейку D10 в отчете (D3 в шаблоне) Значение скопировалось из уровня level=2 в level=1 с помощью ‘func=FIRST’, но не объединилось так как нет ‘;merge=X’ в отличии от соседнего столбца ‘C’
Чтобы понять как работает объединение просто просмотрите значения в отчете
подробнее о деревьях Вы можете почитать тут