Suppress blank lines at top of page ?

Whether you're using the Standard or Professional Edition of Quartam Reports, this is the place to ask general questions about using this industry-level reporting tool for LiveCode.
Locked
NingImport
Posts: 87
Joined: Sun Jul 18, 2010 5:23 pm

Suppress blank lines at top of page ?

Post by NingImport » Sun Jul 18, 2010 7:44 pm

Suppress blank lines at top of page ?

Posted by Pete Whittet on March 14, 2010 at 8:47pm

In the context of printing from a database query, is there a way to use the "Printing condition" (or anything else) to suppress blank lines at the top of a new page ?

Checking whether the line of data itself is empty should be straightforward, but I also need to detect when we are on line 1 of a new page. (I have the standard edition of Quartam Reports 1.1.4)

Many thanks.

Pete

Edit: thinking about it, I don't know how to check whether the line is empty, either. It will probably be a blank line in a multi-line field. Which means that using "Printing condition" won't work.

Doh. Any ideas ?

=====

Reply by Jan Schenkel on March 17, 2010 at 10:17pm

Hi Pete,

Getting rid of empty lines in a text can be achieved by using some sort of 'filtering' function in your data field expression.
E.g. if your database column is named 'cust_Comments' you could have a data field expression:
##
RemoveEmptyLines(cust_Comments)
##
And then you define the function 'RemoveEmptyLines' in another library stack:
##
function RemoveEmptyLines pText
filter pText without empty -- removes empty lines
return pText
end RemoveEmptyLines
##

As for suppressing blank lines at the top of a page, I'm slightly confused: is the problem that you have stretching text fields that may contain empty lines (if so, the above trick should work) or that there may be detail lines (=records) that don't have anything to print (in that case, the best approach would be to refine the query)?

HTH,

Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com

=====

Reply by Pete Whittet on March 18, 2010 at 1:10pm

Hi Jan,

Many thanks for your reply. I have a database of hundreds of tasks, each with a task name (single line), and a description (anything from 1 paragraph long, potentially up to 6 or 7 short paragraphs). Typically I will select about 20 tasks to be reported at any one time.

The descriptions need blank lines between paragraphs, to make them readable for my clients, and these text fields will sometimes stretch over a page break. This is when you may get a blank line at the top of the new page. The blank line is a necessary part of the description field, but if I could find a way of suppressing these "top of page" blank lines, the printed result would be tidier.

I'm not sure that there is a way of doing this, short of gritting my teeth and developing my own printing routines, but if you have any flashes of inspiration, I would be most grateful.

Best wishes,

Pete

=====

Reply by Jan Schenkel on March 18, 2010 at 11:09pm

Hi Pete,

Thanks for explaining your use case in more detail. As it makes perfect sense to get rid of leading newlines (I already strip off leading spaces), I will add that in the next update to Quartam Reports. I'm tracking down a few reported-but-hard-to-reproduce issues at the moment, so I'll fold it into that maintenance release, a few weeks from now.

Cheers,

Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com

=====

Reply by Pete Whittet on March 19, 2010 at 8:46am

Tremendous - thanks Jan.
===== The above post was imported from the old forum hosted at quartam.ning.com =====

Locked