Re: Printing ListBox that is longer than a single page

2017-06-05 Thread John Baughman via 4D_Tech
Oliver,

Thanks for pointing me in your direction. Your FSUty utility component 
is a treasure trove of utilities.

As for using Uty_PrintListBox, I’m not sure it will work in my 
particular case as the list box is built in the on load phase of the form while 
printing making creating  the print settings obj  difficult and I think may 
over complicate the process. Print Object works well in a repeat loop.

John






On Jun 4, 2017, at 9:32 PM, Flury Olivier via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> Hi John,
> 
> The  component "FSTypeahead" contains a component "FSUty". This component 
> contains a utility method called " Uty_PrintListBox".
> 
> This method prints the visible columns of a listbox using print object. It 
> adapts the column width to the available space (horizontally) and does the 
> necessary page breaks. The nice thing about doing it this way: its fully 
> generic.
> 
> You can download it from here:
> 
> https://www.asuswebstorage.com/navigate/s/B7C6589918CD438E95737E069CB5A0D4W
> 
> It's free and open source.
> 
> Best,
> 
> Olivier
> 
> -Ursprüngliche Nachricht-
> Von: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] Im Auftrag von John 
> Baughman via 4D_Tech
> Gesendet: Sonntag, 4. Juni 2017 00:03
> An: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: John Baughman 
> Betreff: Printing ListBox that is longer than a single page
> 
> I want to print a form that contains a single listbox. How do I make the list 
> box print beyond the first page? Works great if the list fits on a single 
> page, but only prints the first page if it is longer.
> 
> I have the listbox fully inside the detail area and have tried using PRINT 
> SELECTION and Print Form. There is a text variable that needs to print as 
> well above the listbox.
> 
> Looks like I need to use Print Object but need an example of how/where to use 
> it.
> 
> Thanks,
> 
> John
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

AW: Printing ListBox that is longer than a single page

2017-06-05 Thread Flury Olivier via 4D_Tech
Hi John,

The  component "FSTypeahead" contains a component "FSUty". This component 
contains a utility method called " Uty_PrintListBox".

This method prints the visible columns of a listbox using print object. It 
adapts the column width to the available space (horizontally) and does the 
necessary page breaks. The nice thing about doing it this way: its fully 
generic.

You can download it from here:

https://www.asuswebstorage.com/navigate/s/B7C6589918CD438E95737E069CB5A0D4W

It's free and open source.

Best,

Olivier

-Ursprüngliche Nachricht-
Von: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] Im Auftrag von John Baughman 
via 4D_Tech
Gesendet: Sonntag, 4. Juni 2017 00:03
An: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: John Baughman 
Betreff: Printing ListBox that is longer than a single page

I want to print a form that contains a single listbox. How do I make the list 
box print beyond the first page? Works great if the list fits on a single page, 
but only prints the first page if it is longer.

I have the listbox fully inside the detail area and have tried using PRINT 
SELECTION and Print Form. There is a text variable that needs to print as well 
above the listbox.

Looks like I need to use Print Object but need an example of how/where to use 
it.

Thanks,

John
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Printing ListBox that is longer than a single page

2017-06-03 Thread John Baughman via 4D_Tech
OK. I got it working. Perhaps this might be of help to someone else in the 
future.

My list box is an array based list box which is being populated at print time. 
The listbox on load form event uses LISTBOX INSERT COLUMN and a few object 
commands to build the listbox with previously populated arrays. I got it to 
work with the following…

PRINT SETTINGS
$printed:=0
If (ok=1)
OPEN PRINTING JOB
If (ok=1)
FORM 
LOAD([_Constants];"HouseCallsFirstNames.Print")

Repeat 
$end:=Print 
object(*;"HCFirstNameReport")

If (Not($end))
LISTBOX GET 
PRINT INFORMATION(*;"HCFirstNameReport";lk last printed row number;$printed)

If ($printed=42)
PAGE 
BREAK

End if 

End if 

Until ($end)

End if 

CLOSE PRINTING JOB

End if 

Note that for this to work the loading of the listbox has to be in the listbox 
on load event, not the forms on load event.

John





> On Jun 3, 2017, at 12:03 PM, John Baughman via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I want to print a form that contains a single listbox. How do I make the list 
> box print beyond the first page? Works great if the list fits on a single 
> page, but only prints the first page if it is longer.
> 
> I have the listbox fully inside the detail area and have tried using PRINT 
> SELECTION and Print Form. There is a text variable that needs to print as 
> well above the listbox.
> 
> Looks like I need to use Print Object but need an example of how/where to use 
> it.
> 
> Thanks,
> 
> John
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Printing ListBox that is longer than a single page

2017-06-03 Thread John Baughman via 4D_Tech
I want to print a form that contains a single listbox. How do I make the list 
box print beyond the first page? Works great if the list fits on a single page, 
but only prints the first page if it is longer.

I have the listbox fully inside the detail area and have tried using PRINT 
SELECTION and Print Form. There is a text variable that needs to print as well 
above the listbox.

Looks like I need to use Print Object but need an example of how/where to use 
it.

Thanks,

John
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**