Re: Grid2Print - Suggestions
Posted: Fri Aug 22, 2008 7:17 pm
Hi,
very good job.
the memo field will be supported.
regards,
Luis Vasquez
very good job.
the memo field will be supported.
regards,
Luis Vasquez
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://mail.hmgforum.com/
Sorry, according to column headers I think that "digit only" cell are numeric in type.You wrote:I take everything as entered in Grid and that too only string item grids.
I mean by "formatting", converting a numeric value to a character string into more readable format. As you know, most easy way is using TRANSFORM() function. f.e:By formatting you mean, formatting the numbers as given by the user as parameter for the function? Please give me syntax, so that I can proceed.
Oh yes... nothing is ever finishedrathinagiri wrote:Thank you Roberto. It is just a beginning. Long way to go.
Yes. I am just working on that.esgici wrote:
I mean by "formatting", converting a numeric value to a character string into more readable format. As you know, most easy way is using TRANSFORM() function. f.e:
TRANSFORM(123456, "$999,999") // Result: $123,456
or
nValue := 123456.789
TRANSFORM( nValue , "999,999.999") // Result: 123,456.789
Certainly, you can use any formatting method into gird. My suggestion is about formatting while building print/report.
Next version solves this.esgici wrote: BTW some random sights:
- Converting numeric value to "verbal" is a big task. But it is not related directly with printing, it made larger the program and get hard to understanding.
- Using very little ( even single letter ) variable names also get difficult to understanding.
Yes. I will change.esgici wrote: - Since return always "True" , "iif(.t.,"True","False")" expression ( Sample.prg, line 27) is (sorry) meaningless.
Here is a modified grid2print for User Components Interface (UCI) demostration.rathinagiri wrote:
Thanks for your nice and exhaustive review.
Wonderful !..Roberto Lopez wrote: So, you'll have a new method for grid control called 'Print'.
Code: Select all
/*
Grid Test with GridPrint (UCI) Method
( Based Upon official HMG Sample\Grid_1 )
*/
#include "minigui.ch"
Set Procedure To GridPrint.Prg
Function Main
Local aRows [20] [3]
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 450 ;
HEIGHT 420 ;
TITLE 'Grid Test with GridPrint (UCI) Method ' ;
MAIN
aRows [1] := {'Simpson','Homer','555-5555'}
aRows [2] := {'Mulder','Fox','324-6432'}
aRows [3] := {'Smart','Max','432-5892'}
aRows [4] := {'Grillo','Pepe','894-2332'}
aRows [5] := {'Kirk','James','346-9873'}
aRows [6] := {'Barriga','Carlos','394-9654'}
aRows [7] := {'Flanders','Ned','435-3211'}
aRows [8] := {'Smith','John','123-1234'}
aRows [9] := {'Pedemonti','Flavio','000-0000'}
aRows [10] := {'Gomez','Juan','583-4832'}
aRows [11] := {'Fernandez','Raul','321-4332'}
aRows [12] := {'Borges','Javier','326-9430'}
aRows [13] := {'Alvarez','Alberto','543-7898'}
aRows [14] := {'Gonzalez','Ambo','437-8473'}
aRows [15] := {'Batistuta','Gol','485-2843'}
aRows [16] := {'Vinazzi','Amigo','394-5983'}
aRows [17] := {'Pedemonti','Flavio','534-7984'}
aRows [18] := {'Samarbide','Armando','854-7873'}
aRows [19] := {'Pradon','Alejandra','???-????'}
aRows [20] := {'Reyes','Monica','432-5836'}
aHeadArry := {'Last Name','First Name','Phone'}
@ 10,10 GRID Grid_1 ;
WIDTH 430 ;
HEIGHT 330 ;
HEADERS aHeadArry;
WIDTHS {140,140,140};
ITEMS aRows ;
VALUE 1
define button print
row 345
col 200
caption "Print"
action printsamplegrid()
end button
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
function printsamplegrid
Form_1.Grid_1.Print ( aHeadArry,{"C","C","C"} )
return nil
I'm afraid that I'm disagree with you....esgici wrote: I mean by "formatting", converting a numeric value to a character string into more readable format. As you know, most easy way is using TRANSFORM() function. f.e:
TRANSFORM(123456, "$999,999") // Result: $123,456
or
nValue := 123456.789
TRANSFORM( nValue , "999,999.999") // Result: 123,456.789
A little bug.rathinagiri wrote:Hi Friends,
Here comes the latest version of GridPrint with some bug fixes and changes:
ABSOLUTELY you are right ...Roberto Lopez wrote:...a 'Print' method for a grid, must print grid data 'as is', in the same way that the data is being shown in the screen,
Roberto Lopez wrote:
When you select a big font size, causes preview problems:
Regardsesgici wrote: ( At 13 Aug 2008 )
We ( Rathinagiri ) need a function such as
LenStrInPixel( <cString>, <aFont> ) --> <nLengthInPixel> (*)
(*) <aFont> : Font properties array: name, size, bold, italic ...