Page 2 of 6

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 3:04 am
by fchirico
Roberto Lopez wrote:Hi All,

So, I coded a little and we have now a very early prototype of the 'HMG report writer'! (attached to this message).

Enjoy!

Roberto.
SPANISH
Roberto, la verdad me parece FABULOSO!

No sé como quedará la versión final, pero se le podría pasar a la función 2 parámetros nuevos:

ExecuteReport ( <cReportName> , <lPrintPreview> , <lSelectPrinter>, <cFilter>, <cCondition> )

<cFilter> Sería un SET FILTER TO....
<cCondition> Sería por ejemplo "TEST->code > 10 .and. TEST->code < 20"


ENGLISH
Roberto, I think the truth FABULOUS!

I do not know how the final version, but it could happen to feature 2 new parameters:

ExecuteReport (<cReportName>, <lPrintPreview>, <lSelectPrinter> [color = # 0080FF] <cFilter>, <cCondition> [/ color])

It would be a <cFilter> SET FILTER TO ....
It <cCondition> such as "TEST-> code> 10. and. TEST-> code <20"
Muchas gracias!!

Saludos, Fernando Chirico.

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 3:40 am
by Roberto Lopez
fchirico wrote: I do not know how the final version, but it could happen to feature 2 new parameters:

ExecuteReport (<cReportName>, <lPrintPreview>, <lSelectPrinter> [color = # 0080FF] <cFilter>, <cCondition> [/ color])
Now, it works on current workarea, so, the only thing that you should do to select records to print, is to create a filter prior executing report.

And... sadly, never will be something like a 'final version'... always be something to add :)

Regards,

Roberto.

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 3:45 am
by fchirico
Roberto Lopez wrote: Now, it works on current workarea, so, the only thing that you should do to select records to print, is to create a filter prior executing report.
Me parece correcto lo del filtro!
De todas formas estaría bueno lo de la condición.
Roberto Lopez wrote: And... sadly, never will be something like a 'final version'... always be something to add :)
Perdón :|

Tienes toda la razón!

Saludos, Fernando Chirico.

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 4:03 am
by Rathinagiri
I had tested the report generator and I like the approach very much.

Thanks a lot Roberto.

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 4:10 am
by Rathinagiri
My humble suggestions:

1. Sub-total,grand-total and page-wise total facility by grouping the records according to some criteria and selecting the columns to be summed up.

2. Grid lines (I think even now it can be done using BEGIN LINE ... END LINE.)

3. A variable for the total pages like _totalpages. It will help to print like "Page Number 5 of 10"

4. Printing a graph already created using draw graph command any where in the report.

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 5:40 am
by sudip
Hello Master Roberto,
Excellent!!! :)
Thank you very much.
Regards.
Sudip

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 5:54 am
by sudip
Hello Master Roberto,
Is there any way to use custom papersize with this report generator?
For example:

Code: Select all

      BEGIN LAYOUT 
         //PAPERSIZE   PRINTER_PAPER_A4
         PAPERSIZE PRINTER_PAPER_USER 
         PAPERLENGTH (6*25.4) 
         PAPERWIDTH (10*25.4)
         ORIENTATION   PRINTER_ORIENT_PORTRAIT 
      END LAYOUT
With best regards.
Sudip

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 12:18 pm
by Roberto Lopez
Thanks to all for the suggestions.

I agree with most of them.

I'm looking for 'easy to code' ways to implement more features. This will make my work slower.

I added a summary band. It will be printed (if defined) at eof().

The new version is attached to this message.

Regards,

Roberto.

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 1:01 pm
by Rathinagiri
Thanks Roberto. :)

Re: Why I hate report generators ? :)

Posted: Fri Jul 03, 2009 1:27 pm
by Roberto Lopez
rathinagiri wrote: 3. A variable for the total pages like _totalpages. It will help to print like "Page Number 5 of 10"
This could be a problem, since the table to report could be filtered and/or indexed, so, the only way to know the total report pages prior to generate the report is use the COUNT command to know record count and then calculate the pages. The problem is that this process could be very slow on big tables (remember that I supposing filtered/indexed tables).

Regards,

Roberto.