how to print a csv as formatted table?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

how to print a csv as formatted table?

Mike Bonner via use-livecode
Hi,

i need to print a list of data or maybe create a pdf of it.  The list is provided in csv format and the number of lines varies.
I need to print/print to Pdf that data as a formatted table with this typical border around each field. There are only 20 rows per page allowed.
This should happen automatically without any user interaction.

What would be the best way to do it? Should i use Quartam Reports (i have still a license laying around here) or Quartam PDF library?
Or should i just create a  html table and use revprinttext, but my first tries were not successful.

I would of course prefer a very simple solution.

What do you think? Is Quartam Reports the way to go?


Regards,
Matthias



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: how to print a csv as formatted table?

Mike Bonner via use-livecode
Why not a table field or a dg?

On Thu, Apr 12, 2018 at 7:10 PM, Matthias Rebbe via use-livecode <
[hidden email]> wrote:

> Hi,
>
> i need to print a list of data or maybe create a pdf of it.  The list is
> provided in csv format and the number of lines varies.
> I need to print/print to Pdf that data as a formatted table with this
> typical border around each field. There are only 20 rows per page allowed.
> This should happen automatically without any user interaction.
>
> What would be the best way to do it? Should i use Quartam Reports (i have
> still a license laying around here) or Quartam PDF library?
> Or should i just create a  html table and use revprinttext, but my first
> tries were not successful.
>
> I would of course prefer a very simple solution.
>
> What do you think? Is Quartam Reports the way to go?
>
>
> Regards,
> Matthias
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: how to print a csv as formatted table?

Mike Bonner via use-livecode
Why not, indeed?

Is it more complicated than replacing all commas with tab?

Craig



--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: how to print a csv as formatted table?

Mike Bonner via use-livecode
In reply to this post by Mike Bonner via use-livecode
I played around a bit with Quartum PDF Library, and actually got a decent looking header working and a table for my data. It's not that difficult except that you have to grasp the concept that the x and y coordinate variables have to be set each time you want to draw something, so you have to keep track of what is being drawn and where to draw next. Also, you need to be mindful that a document is created with a coordinate system like inches and pixels, so you may need to use the built in functions to translate between them. It's better to use inches I think, but then you have to thing in terms of fractions of inches. Pixels are more exact, but lask the finer resolution.

It's a couple hours of trial and error to figure things out, but once you get it, you can produce fairly nice looking reports. I personally would like to see support for embedded fonts so I can use other fonts besides the built in ones which are extremely limited. A customer is likely to ask that I use the company font, which presently is not possible.

Bob S


> On Apr 12, 2018, at 16:10 , Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> Hi,
>
> i need to print a list of data or maybe create a pdf of it.  The list is provided in csv format and the number of lines varies.
> I need to print/print to Pdf that data as a formatted table with this typical border around each field. There are only 20 rows per page allowed.
> This should happen automatically without any user interaction.
>
> What would be the best way to do it? Should i use Quartam Reports (i have still a license laying around here) or Quartam PDF library?
> Or should i just create a  html table and use revprinttext, but my first tries were not successful.
>
> I would of course prefer a very simple solution.
>
> What do you think? Is Quartam Reports the way to go?
>
>
> Regards,
> Matthias


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode