Re: Listbox Printing

2017-08-15 Thread Keith Culotta via 4D_Tech
I see how that works. What tripped me up initially was discovering what looked like an exception. Run the app "LBPrint" and you'll see the listbox populates in the printout. Then run "Host" which has no forms or methods. It uses LBPrint as a component. The the listbox does not populate. In

Re: Listbox Printing

2017-08-14 Thread Keisuke Miyako via 4D_Tech
FORM LOAD simply loads the form definition. the data source (variables and arrays) are not bound automatically in print. you need to populate the objects by their names: SET PRINT PREVIEW(True) If (OK=1) OPEN PRINTING JOB FORM LOAD("Form1") $aA:=OBJECT Get pointer(Object named;"Column1")

Re: Listbox Printing

2017-08-14 Thread Keith Culotta via 4D_Tech
I did not mean to miss your point, but the following does not work when called from within the component either. The code I uploaded has it outside the print job. All variations have worked when used in the matrix structure. OPEN PRINTING JOB FORM LOAD("Form1")

Re: Listbox Printing

2017-08-14 Thread Keith Culotta via 4D_Tech
One correction - the Listbox appears when I use the Name. (The component built in an unused location when I tested your suggestion) The listbox already appears in the current form, and does print as expected. However when the app is compiled as a component, and its method called from the

Re: Listbox Printing

2017-08-14 Thread Keisuke Miyako via 4D_Tech
I am not sure I understand your code; are you not supposed to populate the arrays AFTER you call FORM LOAD (unless the listbox already exists in the current form) ? > 2017/08/14 23:29、Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> のメール: > > I tried with the name as well. It works that way

Re: Listbox Printing

2017-08-14 Thread Keith Culotta via 4D_Tech
I tried with the name as well. It works that way too, but not when run as a component. SET PRINT PREVIEW(True) If (OK=1) ARRAY LONGINT(aA;0) ARRAY TEXT(aB;0) For ($i;1;10) APPEND TO ARRAY(aA;$i) APPEND TO ARRAY(aB;"Text"+String($i))

Re: Listbox Printing

2017-08-13 Thread Keisuke Miyako via 4D_Tech
have you tried using the object name instead ? > 2017/08/13 5:46、Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> のメール: > $obj:=(->Box_Sum) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive:

Re: Listbox Printing

2017-08-13 Thread Arnaud de Montard via 4D_Tech
> Le 12 août 2017 à 22:46, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > All code and the form are in the component.[...] Hi Keith, I remember I tried to use a component form as a template for 'Print object': failed :-( From here:

Re: Listbox Printing

2017-08-12 Thread Keith Culotta via 4D_Tech
I tried several combinations of the code below showing a button method on the form "SumForm". The parent method gets passed some arrays, opens its form "SumForm", displays them in the LB, and provides a button with the below code. The button method prints fine in a DB. When the DB is used as

Re: Listbox Printing

2017-08-02 Thread Keisuke Miyako via 4D_Tech
https://github.com/miyako/4d-tips-print-form-print-object-combo 2017/08/03 12:34、miyako > のメール: I don't see any reasons why they won't work in tandem. ** 4D Internet Users

Re: Listbox Printing

2017-08-02 Thread James Crate via 4D_Tech
I had forgotten about Print Object. However, this is a listbox embedded in a form with lots of other fields/variables, it doesn’t look like Print Object can work in combination with Print Form. I did figure out how to fake it. There will normally be 4-8 rows, the space can accommodate 12

Re: Listbox Printing

2017-08-02 Thread John Baughman via 4D_Tech
** 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: Listbox Printing

2017-08-02 Thread Keisuke Miyako via 4D_Tech
have you looked into "Print object"? http://doc.4d.com/4Dv16/4D/16/Print-object.301-3035768.en.html > 2017/08/03 3:18、James Crate via 4D_Tech <4d_tech@lists.4d.com> のメール: > > I am printing a listbox on a form which just has a detail section (i.e. Print > Form). The listbox is printing, but

Re: Listbox Printing

2017-08-02 Thread Nigel Greenlee via 4D_Tech
Jim FYI. If you want to print a list box The code is rather slow. Its actually better to convert it to a Quick report. The following code will print any listbox area. As you can see I have not optimised this for V16. I need to look at the way it is setting the font and size etc, it also uses