Page 4 of 10
Re: Grid2Print - Suggestions
Posted: Sat Aug 23, 2008 10:58 pm
by Roberto Lopez
Roberto Lopez wrote:
IMHO 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, with (perhaps) the exception, of some 'off grid' optional things like headers, footers, etc.
And... IMHO... maybe parameters 3 y 4 (headers and Types) could be optional too, using grid headers as column print headers could be right.
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sat Aug 23, 2008 11:04 pm
by Roberto Lopez
Roberto Lopez wrote:
And... IMHO... maybe parameters 3 y 4 (headers and Types) could be optional too, using grid headers as column print headers could be right.
Anyway... Why do you need the 'Types' array?
Yes... this could be a silly question, but I've not reviewed your code deeply enough... I'm sorry in advance
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 2:33 am
by Rathinagiri
Roberto Lopez wrote:rathinagiri wrote:Hi Friends,
Here comes the latest version of GridPrint with some bug fixes and changes:
A little bug.
When you select a big font size, causes preview problems:
Regards,
Roberto.
It is NOT a bug. It shows, that, it cannot print the whole data in a paper with this fontsize selected. That is the width of the grid data exceeds the paper size! So, what you have to do? One of the following:
1. Change the orientation of the paper from Portrait to Landscape
2. Reduce some left and right margin
3. If possible have a larger paper
4. Truncate the character/text type columns by reducing the width (mm) && (I am now working on wordwrap)
5. Disable some column(s) which is not required for this report.
6. If none of the above is not possible there is no other way, you have to reduce the fontsize
However, if the report width is exceeding paper width, Print button is DISABLED.
Please tell your suggestions in this regard.
Thanks.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 2:52 am
by Rathinagiri
Roberto Lopez wrote:Roberto Lopez wrote:
IMHO 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, with (perhaps) the exception, of some 'off grid' optional things like headers, footers, etc.
And... IMHO... maybe parameters 3 y 4 (headers and Types) could be optional too, using grid headers as column print headers could be right.
Regards,
Roberto.
Yes. You are right. But, unfortunately, headers property is not available inside programs. I am afraid it is available at the time of control definition only.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 2:54 am
by Rathinagiri
Roberto Lopez wrote:Roberto Lopez wrote:
And... IMHO... maybe parameters 3 y 4 (headers and Types) could be optional too, using grid headers as column print headers could be right.
Anyway... Why do you need the 'Types' array?
Yes... this could be a silly question, but I've not reviewed your code deeply enough... I'm sorry in advance
Regards,
Roberto.
Yes. Types array is to know about the justifications only. If we can get the justification from the grid control itself as a read only property that is also not required.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 12:17 pm
by Roberto Lopez
rathinagiri wrote:Roberto Lopez wrote:rathinagiri wrote:Hi Friends,
Here comes the latest version of GridPrint with some bug fixes and changes:
A little bug.
When you select a big font size, causes preview problems:
Regards,
Roberto.
It is NOT a bug. It shows, that, it cannot print the whole data in a paper with this fontsize selected. That is the width of the grid data exceeds the paper size! So, what you have to do? One of the following:
1. Change the orientation of the paper from Portrait to Landscape
2. Reduce some left and right margin
3. If possible have a larger paper
4. Truncate the character/text type columns by reducing the width (mm) && (I am now working on wordwrap)
5. Disable some column(s) which is not required for this report.
6. If none of the above is not possible there is no other way, you have to reduce the fontsize
However, if the report width is exceeding paper width, Print button is DISABLED.
Please tell your suggestions in this regard.
Thanks.
I'm sorry. It's ok
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 12:19 pm
by Roberto Lopez
rathinagiri wrote:Roberto Lopez wrote:Roberto Lopez wrote:
IMHO 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, with (perhaps) the exception, of some 'off grid' optional things like headers, footers, etc.
And... IMHO... maybe parameters 3 y 4 (headers and Types) could be optional too, using grid headers as column print headers could be right.
Regards,
Roberto.
Yes. You are right. But, unfortunately, headers property is not available inside programs. I am afraid it is available at the time of control definition only.
Yes, they are here....
Try something like this in any Grid sample:
MsgInfo ( Form_1.Grid_1.Header(1) )
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 12:20 pm
by Roberto Lopez
rathinagiri wrote:Roberto Lopez wrote:Roberto Lopez wrote:
And... IMHO... maybe parameters 3 y 4 (headers and Types) could be optional too, using grid headers as column print headers could be right.
Anyway... Why do you need the 'Types' array?
Yes... this could be a silly question, but I've not reviewed your code deeply enough... I'm sorry in advance
Regards,
Roberto.
Yes. Types array is to know about the justifications only. If we can get the justification from the grid control itself as a read only property that is also not required.
I'll work on that!
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 12:31 pm
by Roberto Lopez
Roberto Lopez wrote:
Yes. Types array is to know about the justifications only. If we can get the justification from the grid control itself as a read only property that is also not required.
You can retrieve alignment array for a grid as follows:
i := GetControlIndex ( cControlName , cWindowName )
aJustify := _HMG_SYSDATA [ 37 ]
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 12:40 pm
by esgici
Very interesting
in c:\hmg\source\h_init.prg :
_HMG_SYSDATA [ 37 ] -> _HMG_aControlBrushHandle
Regards
--
esgici