You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fernando Luna requests:
Is it possible to set a (column) header so that it spans two rows?
I believe that’s possible within something like Oracle reports by specifying something like “Sales|2022”. If not, is there another way to get this done?
My response:
If you want to do it, you can fork and try to do it yourself. There is already a mechanism to provide the column headers independent of the cursor in a structure t_col_headers. Perhaps allow that structure to have 2 or three lines, so an array of arrays. Then the local procedure named show_header inside cursor2table would need to walk those. Instead of doing that, you could parse the incoming headers for '|' as you say is established convention somewhere. I think I would use CHR(10) newline for that instead, but either way you would need to parse the column headers and break them into internal arrays representing each line of the column header.
The bigger problem is the concept of the vertical location on the page which is maintained in variable v_y. This bit of code shown below in cursor2table is assuming the column headers are a single line. You would need to figure out how to advance v_y based on the maximum number of lines in any of the column headers values. It is also nasty because we go down in value of v_y as we go down the page, so you subtract instead of add. It can be very confusing. I did a lot of drawing on a scrap of paper and putting in values.
IF v_page_count = 0 OR v_y < as_pdf3.get(as_pdf3.c_get_margin_bottom)
THEN -- either nothing done yet or already wrote a full page and need to start a new one
as_pdf3.new_page;
v_page_count := as_pdf3.get(as_pdf3.c_get_page_count);
v_y := y_top_margin - v_lineheight;
END IF;
show_header;
It is more than I want to do, but I would support you if you want to add it. I'm starting a new job next week, so I'm not going to have much time for a while. Good luck with it.
The text was updated successfully, but these errors were encountered:
Fernando Luna requests:
Is it possible to set a (column) header so that it spans two rows?
I believe that’s possible within something like Oracle reports by specifying something like “Sales|2022”. If not, is there another way to get this done?
My response:
If you want to do it, you can fork and try to do it yourself. There is already a mechanism to provide the column headers independent of the cursor in a structure t_col_headers. Perhaps allow that structure to have 2 or three lines, so an array of arrays. Then the local procedure named show_header inside cursor2table would need to walk those. Instead of doing that, you could parse the incoming headers for '|' as you say is established convention somewhere. I think I would use CHR(10) newline for that instead, but either way you would need to parse the column headers and break them into internal arrays representing each line of the column header.
The bigger problem is the concept of the vertical location on the page which is maintained in variable v_y. This bit of code shown below in cursor2table is assuming the column headers are a single line. You would need to figure out how to advance v_y based on the maximum number of lines in any of the column headers values. It is also nasty because we go down in value of v_y as we go down the page, so you subtract instead of add. It can be very confusing. I did a lot of drawing on a scrap of paper and putting in values.
It is more than I want to do, but I would support you if you want to add it. I'm starting a new job next week, so I'm not going to have much time for a while. Good luck with it.
The text was updated successfully, but these errors were encountered: