Re: [NF] Reporting in Python (Django)
Don't use Django. On 13/03/18 13:58, Thierry Nivelet wrote: Great discussion, thanks for your insights! So you use Django without doing Web App? "/Django makes it easier to build better Web apps more quickly and with less code./" Thierry Nivelet FoxInCloud Give your VFP app a second life in the cloud http://foxincloud.com/ Le 13/03/2018 à 17:33, Ricardo Araoz a écrit : Love Python. Don't do browser apps. On 13/03/18 13:23, Thierry Nivelet wrote: Ricardo, Whatever the language you choose, you'll meet 2 serious obstacles down the road to a Web Application: 1. **Write responsive HTML/CSS/JS**: if you want to somehow clone the layout of the forms of your VFP desktop application, and render it as responsive HTML using - eg. - the Bootstrap framework, it'll take you up to 10 levels of nested divs to get a proper layout; no GUI editor at the rescue for that: you'll have to hard code using a text editor, and choose appropriate class and IDs without getting messed up; and it soon becomes very complex and difficult to handle, especially because CSS computes the layout for you based on the structure and rules you define. If you want a responsive layout, you can no longer set .left, .width, etc., you must let the browser compute positions and dimensions. Generating HTML is the area where your Python code will mostly be used and, strangely, this is only the emerged part of the iceberg as point 2. below explains. 2. **Maintain user state**: in your VFP code, each time you write 'thisForm…' or 'this…' or 'alias.field', or read a public variable, you query (without knowing or realizing it) the user state, as it results from the succession of user actions applied to some initial state. In VFP, as a single instance of the application serves a single user, everything can persist in memory: easy and painless. On the Web conversely, as the same application can serve any user in any sequence, the user state can exist only if you somehow maintain it (save and restore). No framework, whether it's Python-based or C#-based, will ever do that for you. Then you have roughly 2 options to maintain the user state: **on the client or on the server**. Maintaining the user state on the **client** requires to: - write a lot of JavaScript, probably with some client-side framework such as jQuery, Angular or Ember (be aware that these frameworks are pretty conceptual and difficult to master properly; they at least require that you are very proficient in HTML/CSS/JS as they add several layers above these technologies). Whatever your choice, you write no Python here, just HTML, CSS and JS. - use client side storage to create on the client something similar to a view that you'll submit to the server once user decides to save. This requires a good knowledge of web storage API, another JavaScript-centric technology - expose all your business and presentation layer code to the outside world; just like you would expose all the VFP code you have in *.scx and *.vcx, except queries. You can only obfuscate this code (eg. minify renames variables in alpha sequence such as "a", "b", "c", "d", etc.), concealing it is impossible as the browser must read it. This is the solution that most developers use nowadays; exchange with the server are merely data conveyed in the JSON format. Maintaining the user state on the **server** requires to: - write double code: client side code altering the user interface is almost the same, except it must query the user state from the server to take proper action; the amount of code is much higher, and client and server must somehow understand each other, this generally requires either being a 'full stack developer' or defining tight rules (eg. naming) between client and server. - store user state on a server disk so that any web server can retrieve the state for any user at any time (forget about assigning server instances to specific users like in the desktop world, it just does not work for high user counts; a typical web app serves 200 users and this figure can go up to several thousands) - choose or define a format to store user state: could be a simple JSON string that the client JavaScript provides after each action (then you need to choose a scalable structure), or a table that you can easily query to, eg., find differences between states before / after user action. FoxInCloud helps you dramatically in these 2 critical areas: - **generate responsive HTML/CSS/JS code** from your VFP forms: FoxInCloud understand how controls are aligned and grouped on the page and builds the corresponding groupings (row, column, *-group) in the Bootstrap CSS system - **automatically maintains user state**: because FoxInCloud runs your VFP forms on the server and these forms are object oriented, FoxInCloud is able to detect what the user actions change on the form and save these changes in a structured way; the same for the dataSession (views,
Re: [NF] Reporting in Python (Django)
Great discussion, thanks for your insights! So you use Django without doing Web App? "/Django makes it easier to build better Web apps more quickly and with less code./" Thierry Nivelet FoxInCloud Give your VFP app a second life in the cloud http://foxincloud.com/ Le 13/03/2018 à 17:33, Ricardo Araoz a écrit : Love Python. Don't do browser apps. On 13/03/18 13:23, Thierry Nivelet wrote: Ricardo, Whatever the language you choose, you'll meet 2 serious obstacles down the road to a Web Application: 1. **Write responsive HTML/CSS/JS**: if you want to somehow clone the layout of the forms of your VFP desktop application, and render it as responsive HTML using - eg. - the Bootstrap framework, it'll take you up to 10 levels of nested divs to get a proper layout; no GUI editor at the rescue for that: you'll have to hard code using a text editor, and choose appropriate class and IDs without getting messed up; and it soon becomes very complex and difficult to handle, especially because CSS computes the layout for you based on the structure and rules you define. If you want a responsive layout, you can no longer set .left, .width, etc., you must let the browser compute positions and dimensions. Generating HTML is the area where your Python code will mostly be used and, strangely, this is only the emerged part of the iceberg as point 2. below explains. 2. **Maintain user state**: in your VFP code, each time you write 'thisForm…' or 'this…' or 'alias.field', or read a public variable, you query (without knowing or realizing it) the user state, as it results from the succession of user actions applied to some initial state. In VFP, as a single instance of the application serves a single user, everything can persist in memory: easy and painless. On the Web conversely, as the same application can serve any user in any sequence, the user state can exist only if you somehow maintain it (save and restore). No framework, whether it's Python-based or C#-based, will ever do that for you. Then you have roughly 2 options to maintain the user state: **on the client or on the server**. Maintaining the user state on the **client** requires to: - write a lot of JavaScript, probably with some client-side framework such as jQuery, Angular or Ember (be aware that these frameworks are pretty conceptual and difficult to master properly; they at least require that you are very proficient in HTML/CSS/JS as they add several layers above these technologies). Whatever your choice, you write no Python here, just HTML, CSS and JS. - use client side storage to create on the client something similar to a view that you'll submit to the server once user decides to save. This requires a good knowledge of web storage API, another JavaScript-centric technology - expose all your business and presentation layer code to the outside world; just like you would expose all the VFP code you have in *.scx and *.vcx, except queries. You can only obfuscate this code (eg. minify renames variables in alpha sequence such as "a", "b", "c", "d", etc.), concealing it is impossible as the browser must read it. This is the solution that most developers use nowadays; exchange with the server are merely data conveyed in the JSON format. Maintaining the user state on the **server** requires to: - write double code: client side code altering the user interface is almost the same, except it must query the user state from the server to take proper action; the amount of code is much higher, and client and server must somehow understand each other, this generally requires either being a 'full stack developer' or defining tight rules (eg. naming) between client and server. - store user state on a server disk so that any web server can retrieve the state for any user at any time (forget about assigning server instances to specific users like in the desktop world, it just does not work for high user counts; a typical web app serves 200 users and this figure can go up to several thousands) - choose or define a format to store user state: could be a simple JSON string that the client JavaScript provides after each action (then you need to choose a scalable structure), or a table that you can easily query to, eg., find differences between states before / after user action. FoxInCloud helps you dramatically in these 2 critical areas: - **generate responsive HTML/CSS/JS code** from your VFP forms: FoxInCloud understand how controls are aligned and grouped on the page and builds the corresponding groupings (row, column, *-group) in the Bootstrap CSS system - **automatically maintains user state**: because FoxInCloud runs your VFP forms on the server and these forms are object oriented, FoxInCloud is able to detect what the user actions change on the form and save these changes in a structured way; the same for the dataSession (views, cursors, table states) and the general environment (public vari
Re: [NF] Reporting in Python (Django)
Love Python. Don't do browser apps. On 13/03/18 13:23, Thierry Nivelet wrote: Ricardo, Whatever the language you choose, you'll meet 2 serious obstacles down the road to a Web Application: 1. **Write responsive HTML/CSS/JS**: if you want to somehow clone the layout of the forms of your VFP desktop application, and render it as responsive HTML using - eg. - the Bootstrap framework, it'll take you up to 10 levels of nested divs to get a proper layout; no GUI editor at the rescue for that: you'll have to hard code using a text editor, and choose appropriate class and IDs without getting messed up; and it soon becomes very complex and difficult to handle, especially because CSS computes the layout for you based on the structure and rules you define. If you want a responsive layout, you can no longer set .left, .width, etc., you must let the browser compute positions and dimensions. Generating HTML is the area where your Python code will mostly be used and, strangely, this is only the emerged part of the iceberg as point 2. below explains. 2. **Maintain user state**: in your VFP code, each time you write 'thisForm…' or 'this…' or 'alias.field', or read a public variable, you query (without knowing or realizing it) the user state, as it results from the succession of user actions applied to some initial state. In VFP, as a single instance of the application serves a single user, everything can persist in memory: easy and painless. On the Web conversely, as the same application can serve any user in any sequence, the user state can exist only if you somehow maintain it (save and restore). No framework, whether it's Python-based or C#-based, will ever do that for you. Then you have roughly 2 options to maintain the user state: **on the client or on the server**. Maintaining the user state on the **client** requires to: - write a lot of JavaScript, probably with some client-side framework such as jQuery, Angular or Ember (be aware that these frameworks are pretty conceptual and difficult to master properly; they at least require that you are very proficient in HTML/CSS/JS as they add several layers above these technologies). Whatever your choice, you write no Python here, just HTML, CSS and JS. - use client side storage to create on the client something similar to a view that you'll submit to the server once user decides to save. This requires a good knowledge of web storage API, another JavaScript-centric technology - expose all your business and presentation layer code to the outside world; just like you would expose all the VFP code you have in *.scx and *.vcx, except queries. You can only obfuscate this code (eg. minify renames variables in alpha sequence such as "a", "b", "c", "d", etc.), concealing it is impossible as the browser must read it. This is the solution that most developers use nowadays; exchange with the server are merely data conveyed in the JSON format. Maintaining the user state on the **server** requires to: - write double code: client side code altering the user interface is almost the same, except it must query the user state from the server to take proper action; the amount of code is much higher, and client and server must somehow understand each other, this generally requires either being a 'full stack developer' or defining tight rules (eg. naming) between client and server. - store user state on a server disk so that any web server can retrieve the state for any user at any time (forget about assigning server instances to specific users like in the desktop world, it just does not work for high user counts; a typical web app serves 200 users and this figure can go up to several thousands) - choose or define a format to store user state: could be a simple JSON string that the client JavaScript provides after each action (then you need to choose a scalable structure), or a table that you can easily query to, eg., find differences between states before / after user action. FoxInCloud helps you dramatically in these 2 critical areas: - **generate responsive HTML/CSS/JS code** from your VFP forms: FoxInCloud understand how controls are aligned and grouped on the page and builds the corresponding groupings (row, column, *-group) in the Bootstrap CSS system - **automatically maintains user state**: because FoxInCloud runs your VFP forms on the server and these forms are object oriented, FoxInCloud is able to detect what the user actions change on the form and save these changes in a structured way; the same for the dataSession (views, cursors, table states) and the general environment (public variables, _Screen and _VFP custom properties, aliases in the default datasession). FoxInCloud maintains the user state on server side, in tables using a naming convention (user\form_[ante/post].dbf). The only thing you need to do is: declare the native properties (eg. 'visible', 'enabled') that the user action can a
Re: [NF] Reporting in Python (Django)
Ricardo, Whatever the language you choose, you'll meet 2 serious obstacles down the road to a Web Application: 1. **Write responsive HTML/CSS/JS**: if you want to somehow clone the layout of the forms of your VFP desktop application, and render it as responsive HTML using - eg. - the Bootstrap framework, it'll take you up to 10 levels of nested divs to get a proper layout; no GUI editor at the rescue for that: you'll have to hard code using a text editor, and choose appropriate class and IDs without getting messed up; and it soon becomes very complex and difficult to handle, especially because CSS computes the layout for you based on the structure and rules you define. If you want a responsive layout, you can no longer set .left, .width, etc., you must let the browser compute positions and dimensions. Generating HTML is the area where your Python code will mostly be used and, strangely, this is only the emerged part of the iceberg as point 2. below explains. 2. **Maintain user state**: in your VFP code, each time you write 'thisForm…' or 'this…' or 'alias.field', or read a public variable, you query (without knowing or realizing it) the user state, as it results from the succession of user actions applied to some initial state. In VFP, as a single instance of the application serves a single user, everything can persist in memory: easy and painless. On the Web conversely, as the same application can serve any user in any sequence, the user state can exist only if you somehow maintain it (save and restore). No framework, whether it's Python-based or C#-based, will ever do that for you. Then you have roughly 2 options to maintain the user state: **on the client or on the server**. Maintaining the user state on the **client** requires to: - write a lot of JavaScript, probably with some client-side framework such as jQuery, Angular or Ember (be aware that these frameworks are pretty conceptual and difficult to master properly; they at least require that you are very proficient in HTML/CSS/JS as they add several layers above these technologies). Whatever your choice, you write no Python here, just HTML, CSS and JS. - use client side storage to create on the client something similar to a view that you'll submit to the server once user decides to save. This requires a good knowledge of web storage API, another JavaScript-centric technology - expose all your business and presentation layer code to the outside world; just like you would expose all the VFP code you have in *.scx and *.vcx, except queries. You can only obfuscate this code (eg. minify renames variables in alpha sequence such as "a", "b", "c", "d", etc.), concealing it is impossible as the browser must read it. This is the solution that most developers use nowadays; exchange with the server are merely data conveyed in the JSON format. Maintaining the user state on the **server** requires to: - write double code: client side code altering the user interface is almost the same, except it must query the user state from the server to take proper action; the amount of code is much higher, and client and server must somehow understand each other, this generally requires either being a 'full stack developer' or defining tight rules (eg. naming) between client and server. - store user state on a server disk so that any web server can retrieve the state for any user at any time (forget about assigning server instances to specific users like in the desktop world, it just does not work for high user counts; a typical web app serves 200 users and this figure can go up to several thousands) - choose or define a format to store user state: could be a simple JSON string that the client JavaScript provides after each action (then you need to choose a scalable structure), or a table that you can easily query to, eg., find differences between states before / after user action. FoxInCloud helps you dramatically in these 2 critical areas: - **generate responsive HTML/CSS/JS code** from your VFP forms: FoxInCloud understand how controls are aligned and grouped on the page and builds the corresponding groupings (row, column, *-group) in the Bootstrap CSS system - **automatically maintains user state**: because FoxInCloud runs your VFP forms on the server and these forms are object oriented, FoxInCloud is able to detect what the user actions change on the form and save these changes in a structured way; the same for the dataSession (views, cursors, table states) and the general environment (public variables, _Screen and _VFP custom properties, aliases in the default datasession). FoxInCloud maintains the user state on server side, in tables using a naming convention (user\form_[ante/post].dbf). The only thing you need to do is: declare the native properties (eg. 'visible', 'enabled') that the user action can affect (custom properties being saved by default); FoxInCloud compares the state b
Re: [NF] Reporting in Python (Django)
Thanks Thierry, but I've gone over to Python, love the language and libraries, gives me pleasure to write it. As for the 10x times, it might be true if you are left to your own devices. But thankfully it has loads of beautiful and useful libraries which allow me to keep writing a language I've come to love. Cheers On 12/03/18 15:04, Thierry Nivelet wrote: Ricardo, Unless learning Python is for you so important and compelling that you accept to spend 10x more time for the same result, did you look at FoxInCloud? Thierry Nivelet http://foxincloud.com/ Give your VFP app a second life in the cloud Le 12 mars 2018 à 18:58, Ricardo Araoz a écrit : Ed, never worked with templating systems, but reading the examples I have a few doubts regarding their capabilities, maybe you know the answer to them? In the example they define items, but will the template generate a new title on top of every page? Can you define page sizes, page footers, group headers and footers, group totals, running totals? On 07/03/18 11:47, Ajit Abraham wrote: Thanks Ed. I had seen that before - but as there was no GUI, I ignored it. I need the GUI for absolute positioning of objects - similar to VFP/Crystal/Jasper report builders. Will have another look at it. While I don’t do much reporting in Python these days, I would recommend a simple templating system like Jinja or Mako to create the HTML output, and an HTML-PDF converter to create the output. I did a quick google around and found this article: http://pbpython.com/pdf-reports.html . It looks pretty straightforward. -- Ed Leafe [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/a54e307d-42b6-7b09-479e-a20d6d3a1...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
Ricardo, Unless learning Python is for you so important and compelling that you accept to spend 10x more time for the same result, did you look at FoxInCloud? Thierry Nivelet http://foxincloud.com/ Give your VFP app a second life in the cloud > Le 12 mars 2018 à 18:58, Ricardo Araoz a écrit : > > Ed, never worked with templating systems, but reading the examples I have a > few doubts regarding their capabilities, maybe you know the answer to them? > In the example they define items, but will the template generate a > new title on top of every page? > Can you define page sizes, page footers, group headers and footers, group > totals, running totals? > > > >> On 07/03/18 11:47, Ajit Abraham wrote: >> Thanks Ed. I had seen that before - but as there was no GUI, I ignored it. >> I need the GUI for absolute positioning of objects - similar to >> VFP/Crystal/Jasper report builders. >> >> Will have another look at it. >> >> >>> While I don’t do much reporting in Python these days, I would recommend a >>> simple templating system like Jinja or Mako to create the HTML output, and >>> an HTML-PDF converter to create the output. I did a quick google around and >>> found this article: http://pbpython.com/pdf-reports.html . It looks pretty >>> straightforward. >>> >>> -- Ed Leafe >> >> [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/64f9c117-da3e-40ca-9f86-af192b867...@foxincloud.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
On Mon, Mar 12, 2018 at 2:13 PM, Ed Leafe wrote: > > These are HTML generators, so there is just one per document. Not > sure how you would translate that to hard copy page breaks. > CSS to the rescue! You can set up a block with @media print { ... } and include loads of directives to control the appearance and layout of the printed page. I have a set of reports for one client where the printed page looks much different from the visual page, thanks to CSS. Check out the @page directive and the :first and other pseudo-tags: https://developer.mozilla.org/en-US/docs/Web/CSS/Paged_Media So, you can set up entire blocks within the page" Your Title here and the CSS: div.printonly {display:none} @media print { div.printout {display:inline} } ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cacw6n4sl1rlcw+g9qc9t8hqplsnfpvywmyb0ecwdmm+mrqa...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
Thanks Ed, you saved me a few hours of reading. On 12/03/18 15:13, Ed Leafe wrote: On Mar 12, 2018, at 12:58 PM, Ricardo Araoz wrote: Ed, never worked with templating systems, but reading the examples I have a few doubts regarding their capabilities, maybe you know the answer to them? In the example they define items, but will the template generate a new title on top of every page? These are HTML generators, so there is just one per document. Not sure how you would translate that to hard copy page breaks. Can you define page sizes, page footers, group headers and footers, group totals, running totals? Sure, the templates support embedded code, so you would be able to do that, but it isn't baked-in as in VFP or Crystal. Remember, they are HTML templates, not reporting templates. -- Ed Leafe [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/fa42042f-4f14-653c-75d7-34e73c1a9...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
On Mar 12, 2018, at 12:58 PM, Ricardo Araoz wrote: > > Ed, never worked with templating systems, but reading the examples I have a > few doubts regarding their capabilities, maybe you know the answer to them? > In the example they define items, but will the template generate a > new title on top of every page? These are HTML generators, so there is just one per document. Not sure how you would translate that to hard copy page breaks. > Can you define page sizes, page footers, group headers and footers, group > totals, running totals? Sure, the templates support embedded code, so you would be able to do that, but it isn't baked-in as in VFP or Crystal. Remember, they are HTML templates, not reporting templates. -- Ed Leafe ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/bb983382-c4a2-49db-9ffd-09012d1c6...@leafe.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
Ed, never worked with templating systems, but reading the examples I have a few doubts regarding their capabilities, maybe you know the answer to them? In the example they define items, but will the template generate a new title on top of every page? Can you define page sizes, page footers, group headers and footers, group totals, running totals? On 07/03/18 11:47, Ajit Abraham wrote: Thanks Ed. I had seen that before - but as there was no GUI, I ignored it. I need the GUI for absolute positioning of objects - similar to VFP/Crystal/Jasper report builders. Will have another look at it. While I don’t do much reporting in Python these days, I would recommend a simple templating system like Jinja or Mako to create the HTML output, and an HTML-PDF converter to create the output. I did a quick google around and found this article: http://pbpython.com/pdf-reports.html . It looks pretty straightforward. -- Ed Leafe [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/00e9b59d-fbbd-7140-4493-c7fbed7f9...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
Thanks Ed. I had seen that before - but as there was no GUI, I ignored it. I need the GUI for absolute positioning of objects - similar to VFP/Crystal/Jasper report builders. Will have another look at it. While I don’t do much reporting in Python these days, I would recommend a simple templating system like Jinja or Mako to create the HTML output, and an HTML-PDF converter to create the output. I did a quick google around and found this article: http://pbpython.com/pdf-reports.html . It looks pretty straightforward. -- Ed Leafe ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/00fd9302-b325-b212-3f34-526fe133d...@ua-group.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
I've checked it out, I can see your point, it's a beautiful tool, but too many dependencies and a long product chain. For simple database reports (that would be 98% of the time) I'll work with xlsxwriter and PollyReports which is close to the fox style but stays within python and keeps the design of your report and it's parameters within the language and will be easily portable. Regarding the remaining 2% if I can't dodge the bullet I'll probably end up doing what you suggest (thanks for the tips Ajit, hadn't heard about until you mentioned it) Cheers On 08/03/18 12:06, Ajit Abraham wrote: Thanks Ricardo, On 08/03/2018 01:39, Ricardo Araoz wrote: You could also check "relatorio" and "pod" if you are willing to work with open office. Gaetan's Appy Framework does exactly that. It works with odt documents. For simple reporting, it is ok. But for complex reports(which is easy in VFP), I found that had to do too much of tinkering. Also it needs Libreoffice to run in silent mode to generate the pdf. check out PollyReports which is not a graphical tool but a python lib Simply put, I have been spoilt by VFP. Hence hunting for the GUI Ok. Seems that I will settle in for JasperReport. These are the steps: 1. Prepare the data in XML format (Thanks to yattag library) Along with the table data, I can pass adhoc values like the report title etc 2. Design the report through the free JasperStudio (same like VFP report design tool) 3. Generate PDF through Jadson Ribeiro's pyreport which is a wrapper for JasperStarter command-line tool. This generates the PDF without any reporting service running in the background. Ajit [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/24a207b2-3843-c872-0975-f5116e4ea...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
Happy Happy Joy Joy they say. Needing 3 server environments to dev, test as well as prod because one upgrade or update can screw things up. Been there and done that. On Thu, Mar 8, 2018 at 10:15 AM, Alan Bourke wrote: > I've used JasperStudio alongside Servoy (which is essentially a > Java/Apache stack) to do this and it was the path of least resistance. Once > it was up and going it has worked fine creating complicated invoice PDF > files on demand from a database. > > But as is the way with development nowadays it's adding at least one other > third-party layer of dependencies into a toolkit that is already a mountain > of third party dependencies, and you're multiplying the potential points of > failure all the time. In this particular scenario you could update Java and > the whole thing might collapse. > > > > -- > Alan Bourke > alanpbourke (at) fastmail (dot) fm > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cajidmykutdkv9-q6tjn74kknbtjw5barz0ekhbr8jky0tbg...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
I've used JasperStudio alongside Servoy (which is essentially a Java/Apache stack) to do this and it was the path of least resistance. Once it was up and going it has worked fine creating complicated invoice PDF files on demand from a database. But as is the way with development nowadays it's adding at least one other third-party layer of dependencies into a toolkit that is already a mountain of third party dependencies, and you're multiplying the potential points of failure all the time. In this particular scenario you could update Java and the whole thing might collapse. -- Alan Bourke alanpbourke (at) fastmail (dot) fm ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1520525738.491870.1296224024.22018...@webmail.messagingengine.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
Thanks Ricardo, On 08/03/2018 01:39, Ricardo Araoz wrote: You could also check "relatorio" and "pod" if you are willing to work with open office. Gaetan's Appy Framework does exactly that. It works with odt documents. For simple reporting, it is ok. But for complex reports(which is easy in VFP), I found that had to do too much of tinkering. Also it needs Libreoffice to run in silent mode to generate the pdf. check out PollyReports which is not a graphical tool but a python lib Simply put, I have been spoilt by VFP. Hence hunting for the GUI Ok. Seems that I will settle in for JasperReport. These are the steps: 1. Prepare the data in XML format (Thanks to yattag library) Along with the table data, I can pass adhoc values like the report title etc 2. Design the report through the free JasperStudio (same like VFP report design tool) 3. Generate PDF through Jadson Ribeiro's pyreport which is a wrapper for JasperStarter command-line tool. This generates the PDF without any reporting service running in the background. Ajit ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/a9f686d1-94dd-ea32-6e90-5d5f37d11...@ua-group.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
I googled a bit. The ideal thing would be something that generates RML (ReportLab Markup Language) and then use python's rml2pdf library, but I havent found any graphical RML generator. You could also check "relatorio" and "pod" if you are willing to work with open office. For a tool which uses detail bands, and total, subtotal, and group bands as well as page headers and footers you could check out PollyReports which is not a graphical tool but a python lib which depends on ReportLab, but allows good control for database reports, as for accuracy it works with points (that would be 72 points to an inch), or you could use ReportLab.lib.units which allows you to work in inches, cm, mm and pica. HTH ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/f297423c-b31a-f259-c2c2-42fbfea48...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
On Mar 7, 2018, at 9:03 AM, Ajit Abraham wrote: > > Thanks Ed. I had seen that before - but as there was no GUI, I ignored it. > I need the GUI for absolute positioning of objects - similar to > VFP/Crystal/Jasper report builders. Well, there *is* the Dabo ReportWriter, which has a GUI layout inspired by VFP. Not sure how well it runs with modern Python libraries, though, as it really hasn’t been actively updated in almost 5 years. -- Ed Leafe ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9337882f-b7fc-469a-a0fa-36cbf5057...@leafe.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
Thanks Ed. I had seen that before - but as there was no GUI, I ignored it. I need the GUI for absolute positioning of objects - similar to VFP/Crystal/Jasper report builders. Will have another look at it. While I don’t do much reporting in Python these days, I would recommend a simple templating system like Jinja or Mako to create the HTML output, and an HTML-PDF converter to create the output. I did a quick google around and found this article: http://pbpython.com/pdf-reports.html . It looks pretty straightforward. -- Ed Leafe ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/e382a7dc-2d51-2961-f5c0-0beb4a171...@ua-group.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
On Mar 7, 2018, at 4:23 AM, Ajit Abraham wrote: > Before I make the final leap to Jasper, I want to ask those who are working > with Python - as to what they are using for a GUI reporting tool similar to > VFP and that which does not involve a reporting service to be run in the > background! While I don’t do much reporting in Python these days, I would recommend a simple templating system like Jinja or Mako to create the HTML output, and an HTML-PDF converter to create the output. I did a quick google around and found this article: http://pbpython.com/pdf-reports.html . It looks pretty straightforward. -- Ed Leafe ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/50958657--4c05-be98-200089594...@leafe.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Reporting in Python (Django)
The bottom line is I doubt you'll find anything as simple as the Visual FoxPro report writer in the sphere in which you are working. This isn't a Django/Python/Windows/Linux thing, it's just how things are now especially in the web development world. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1520427187.3378875.1294651864.3ee49...@webmail.messagingengine.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.