Giter Site home page Giter Site logo

lee-lindley / pdfgen Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 818 KB

A PL/SQL PDF report generator providing some of the column, column break and header capabilities of sqlplus reports. Built on as_pdf3 from Anton Scheffer (included).

License: MIT License

PLSQL 100.00%
pdf-generation pl-sql pdf report-generator

pdfgen's Introduction

My technical blog has articles on a mish-mash of topics, mostly on solving problems using Oracle tools.

Although the pinned projects below are the ones most likely to be of use, there are others you can find in my repostory list which is reachable from a link above.

I try to make my documentation readme.md on each project high quality. I don't always hit the mark of course, but I try. If you find one lacking, let me know. I care about it.

You are also welcome to contribute to any of these projects. I'll consider any pull request, though you might want to enter an issue first to get my thoughts.

pdfgen's People

Contributors

lee-lindley avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

esclabsciences

pdfgen's Issues

Multi-line column headers

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.