Why I hate report generators ? :)

Source code related resources

Moderator: Rathinagiri

User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: Why I hate report generators ? :)

Post by fchirico » Fri Jul 03, 2009 3:04 am

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.
Saludos, Fernando Chirico.

User avatar
Roberto Lopez
HMG Founder
Posts: 3873
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 6 times
Been thanked: 99 times

Post by Roberto Lopez » Fri Jul 03, 2009 3:40 am

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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Post by fchirico » Fri Jul 03, 2009 3:45 am

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.
Saludos, Fernando Chirico.

User avatar
Rathinagiri
Posts: 5036
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 76 times
Been thanked: 87 times
Contact:

Post by Rathinagiri » Fri Jul 03, 2009 4:03 am

I had tested the report generator and I like the approach very much.

Thanks a lot Roberto.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Rathinagiri
Posts: 5036
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 76 times
Been thanked: 87 times
Contact:

Post by Rathinagiri » Fri Jul 03, 2009 4:10 am

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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Fri Jul 03, 2009 5:40 am

Hello Master Roberto,
Excellent!!! :)
Thank you very much.
Regards.
Sudip
With best regards,
Sudip

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Fri Jul 03, 2009 5:54 am

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
With best regards,
Sudip

User avatar
Roberto Lopez
HMG Founder
Posts: 3873
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 6 times
Been thanked: 99 times

Post by Roberto Lopez » Fri Jul 03, 2009 12:18 pm

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.
Attachments
report2.rar
(14.52 KiB) Downloaded 180 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Rathinagiri
Posts: 5036
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 76 times
Been thanked: 87 times
Contact:

Post by Rathinagiri » Fri Jul 03, 2009 1:01 pm

Thanks Roberto. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Roberto Lopez
HMG Founder
Posts: 3873
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 6 times
Been thanked: 99 times

Post by Roberto Lopez » Fri Jul 03, 2009 1:27 pm

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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest