LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-07-2006, 07:22 PM   #1
linbl352
LQ Newbie
 
Registered: May 2006
Posts: 6

Rep: Reputation: 0
about general report function


hi,

Does anybody have an idea about how to write a general report generator module using panda library?

Right now, I can create a PDF report file by coding the specific position on a page. codes like following:
panda_textbox(File, Page, 100, 100, 200, 300, "Hello");
It means It prints the string "Hello" at the location starts from (100, 100) to(200,300).
So, If I want to print the text at another location, I have to change the numberic data one by one. That is repeated work.
Does it have any solution for it to reduce the times of modifying numberic data?

Thanks
 
Old 06-07-2006, 07:37 PM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
As a general rule you would want to break the positioning of you report in sections, left margin, top margin, column width, column separator, line height etc, and then instead of having literals (100, 200 etc), you might have a list of variables, such as:
LeftMargin + ColumnWidth + ColumnSeparator + FirstLineIndent
and
TopMargin + (LineNo * LineHeight)
 
Old 06-08-2006, 07:42 PM   #3
linbl352
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you for your adivse
I have got it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lire (log analysis, log report) no report in Mandriva 2005 LE (desktop usage) Emmanuel_uk Mandriva 0 01-16-2006 02:11 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 01:31 PM
How can I report the Error Report? domeili Linux - Newbie 1 10-30-2003 05:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration