Python Forum
How do I generate reports in pdf format?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I generate reports in pdf format?
#1
I have a template that is of A4 landscape size and the data to be filled in it is in a csv file. Basically each row for 1 report. I have generated the report in MS Access. But I want without the gui.

Basically data is just stored in the csv file.

I want to create "report.py", which when clicked, will check which is the last invoice number in the excel sheet and collect all the rows with the same invoice number and generate a report with that. Also have the option that when I run via cli, "python3 report.py 5 15". It will print all the invoices from 5 to 15.

My question is what libraries/tools do I use?
Reply
#2
reportlab is one option
Here is step by step tutorial
https://www.blog.pythonlibrary.org/2010/...-tutorial/
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
(Jan-12-2020, 06:17 PM)buran Wrote: reportlab is one option
Here is step by step tutorial
https://www.blog.pythonlibrary.org/2010/...-tutorial/

Thanks.

The whole canvas.drawString() & canvas.line() and complexities for drawing a table. Isn't there a simpler option like HTML? Considering all the post is from 2010, has there been changes?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python best library for Excel reports & review of existing code MasterOfDestr 4 492 Feb-14-2024, 03:39 PM
Last Post: MasterOfDestr
  Help with Creating a Script for Automating Reports SunWers 1 1,882 Dec-29-2020, 10:21 PM
Last Post: jjc385
  Parsing Date/Time from Metar Reports with 6 hourly weather information Lawrence 0 2,289 May-03-2020, 08:15 PM
Last Post: Lawrence
  Python for Reports in HTML or PDF Format ImPyBoy17 1 3,069 Dec-10-2018, 09:35 PM
Last Post: j.crater
  UTF-8 decoder reports bad byte that is not there Skaperen 0 2,246 Oct-11-2018, 04:46 AM
Last Post: Skaperen
  Generate PDF reports giu88 7 9,101 Aug-26-2018, 02:00 PM
Last Post: giu88
  Start checking for geology reports tjnichols 1 2,604 Jun-04-2018, 08:55 PM
Last Post: Larz60+
  Best software for creating printed reports? birdieman 5 4,358 Feb-02-2017, 02:39 AM
Last Post: birdieman
  Reports with Python? panoss 1 3,248 Jan-11-2017, 10:33 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020