Printer class question - RESOLVED

User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Printer class question

Post by Silvio.Falconi »

TimStone wrote:Silvio,

I likely have about 60 printouts, and they can be quite different. Each has it's own .prg.

For example, on any workorder, there are 3 options: Estimate, Invoice, and Worksheet. So in one .prg, as it goes through the process I mentioned earlier, it may print different data or formats. How does it know ? You can use IF ... ENDIF statements or the the good DO CASE option. You set an array of flags to .f., and then before printing you select the option you want for the format. That changes the value of the proper flag to .t., and the printout outputs those options.

If you requier multiple reports, you could first show a checklist. Then, you call a single Function that will print each report that is checked. You will need a key for the data to use ( in my case it is the workorder number ), but your reports can all draw the proper data based on that key.

To put it simply, each type of form has it's own .prg.
You start with a selection / options screen that allows you to decide which form(s) to print
The data for that specific job is then applied to each form and it outputs them.
Each form can have a unique design based on the needs and requirements of the client, or even the government.

Tim

Tim,
or example, on any workorder, there are 3 options: Estimate, Invoice, and Worksheet. So in one .prg, as it goes through the process I mentioned earlier, it may print different data or formats. How does it know ? You can use IF ... ENDIF statements or the the good DO CASE option. You set an array of flags to .f., and then before printing you select the option you want for the format. That changes the value of the proper flag to .t., and the printout outputs those options.
my intention is just this: I too should make many prg one for each print, I thought instead of building a dbf to store all the print formats.
Each field should have the print condition

It is easy to say use ER or use quetaltra program, then we have to make a pile of documents to print and as you rightly say many have 3/4 different forms also according to the government provisions, here in Italy they have even modified document called "transport document alias DDT" which was simple to make it even more complicated.

At school, I am a practical technical teacher and for some years I have been seconded to the Technical Office, i.e. we collaborate with the school secretary for the supply of school materials (paper, records, cleaning materials, electronics, computers), so we have to dealing with suppliers.
If we have to buy an object we have to make at least 5 estimates and then to 5 different suppliers and then make the comparison document, since I did the program of the technical office (with fwh) the prints are obsolete and slowly I'm only redoing them that I broke my balls to make prints by hand and wanted to create something simpler in my spare time.

By now the view is not like it used to be and I get tired of building the print forms with the mouse and with programs that don't work and make you waste only time, these programs are good only for those who have to make few prints and who have a lot of free time to spend.

I am convinced that this procedure that I am creating is also useful to Mr. Otto (mod_harbour) because it is a dbf archive that can be modified and the function reads the format from the archive and prints the document
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Printer class question - RESOLVED

Post by TimStone »

Silvio,

As stated before, I do not use any report generators. I code everything directly.

I also do not use any resource editor. I code everything in my .rc file directly.

For me, because I have done it this way for many years, I can modify any report in minutes, and I can create new reports very quickly. Although I have looked at the various generators, many of the printed documents my clients want are far too complex for the report generators.

Because of the way I do them, it is very easy for me to have one .prg file containing a report that can be output in multiple ways using flags. It also allows me to create Excel outputs from the same source.

FOR ME, this is the best way. I know many find success with other approaches, and/or tools, but my personal methods produce what my clients want. In the end, programming for the needs of our clients is the most important method.

I am happy you are finding a way to do what you want to accomplish.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Printer class question - RESOLVED

Post by Otto »

Hello Tim,
Reading your post, it came to my mind that using a hardcoded style with HARBOURINO could make sense.
Would you mind to post a sample of a prg.


Best reagards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Marc Venken
Posts: 727
Joined: Tue Jun 14, 2016 7:51 am

Re: Printer class question - RESOLVED

Post by Marc Venken »

I also spend time in looking for a good approuch for printing layouts with boxes, logo's, colors enz..for many forms

I ended up using a single line of code for all the graphics works (logo, boxes, colors, static text)

mybitmap(oPrn,0.8,0.8,19.5,27.7,"c:\marc\factuur.bmp")

So I generate a the form in my favorite graphics program, save it and call it from FWH.

Then I only need to print the data from the working program into it. Since this is very often simple cmsay positions, you can put the positions and variables call into a xbrowse for maintenance and/or repositioning.
Works very well for me.
Marc Venken
Using: FWH 20.08 with Harbour
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Printer class question - RESOLVED

Post by Otto »

Hello Marc,
That's a good idea. Could you post an example so we can get a feel for the resolution of the bitmaps and then the print quality looks like.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Printer class question - RESOLVED

Post by Otto »

Hello Marc,
I also have a nice ADD-ON for EasyReport.
It shows me all the reports in my program and I can simply select and edit the areas.

Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Printer class question - RESOLVED

Post by Silvio.Falconi »

Otto,
I don't understand why you insist on using ER.
this program does not work well and I have already listed all the problems for some time, the designer as I have already explained several times, has been poorly structured, in myRpt the designer works better than ER because it has been structured in classes instead ER uses a window and then

Do you remember? this was one of the many examples I showed you that it didn't work well

Image
if I take a line with the mouse, the position is actually lower than the line, look at the box in gray color,

I barely took the line drawn under the ruler

instead the line when one the change should be in its place

with boxes and figures it is almost difficult if not impossible

try it too, if you not belive me !!!


The EasyReport print engine seems to be working well. Not the designer, because dragging controls doesn't work properly, and things get worse when you add boxes, lines, etc.



I explain
in the eritems.prg source you will be able to see the graphic types

CASE nIndex = 1; cName: = "LineUp"
CASE nIndex = 2; cName: = "LineDown"
CASE nIndex = 3; cName: = "LineHorizontal"
CASE nIndex = 4; cName: = "LineVertical"
CASE nIndex = 5; cName: = "Rectangle"
CASE nIndex = 6; cName: = "Ellipse"

these types of charts are drawn not as object classes, so that is the question


and each Item action are in ElementActions function

so there's no any class for the graphic items

oItems:bMoved := {|| SetItemSize( i, nArea, cAreaIni ), MsgBarItem( i, nArea, cAreaIni,,, .T. ) }

oItems:bResized := {|| SetItemSize( i, nArea, cAreaIni ), MsgBarItem( i, nArea, cAreaIni,,, .T. ) }

oItems:bMMoved := {| nRow, nCol, nFlags | MsgBarItem( i, nArea, cAreaIni, nRow, nCol ) }

oItems:bRClicked := {| nRow, nCol, nFlags | oItems:SetFocus(), ;
ItemPopupMenu( oItems, i, nArea, nRow, nCol ) }


it takes a mother class and child classes to have a good result, ER is all bad
and you only waste time
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Printer class question - RESOLVED

Post by Silvio.Falconi »

Otto,
and now with Mod_harbour how do you do it? do you still use ER? Have you created a web-based visual report program?
my system could also be useful on the web, it certainly isn't visual but it could work
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Printer class question - RESOLVED

Post by Otto »

Silvio,

please post your system then we can use it.


For web I am testing Koolreport.com.
http://forums.fivetechsupport.com/viewt ... om#p215276

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Printer class question - RESOLVED

Post by Otto »

Silvio, the only solution we currently have for FIVEWIN is EASYREPORT or hard-coded. FastReport needs to be adapted. (A virus is always reported to me with new installations.)
We have to stop arguing about what is better or worse.
We should pull together.

Please release your code, and then we can evaluate which way to go.
Otherwise, it would be best if we improved the few things in the EasyReport Designer.
The print engine itself works flawlessly.

@Cristobal
Dear Cristobal, maybe you would be so nice and set up a GITHUB page where your copy of designer is. Then if someone has suggestions could improve directly.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Marc Venken
Posts: 727
Joined: Tue Jun 14, 2016 7:51 am

Re: Printer class question - RESOLVED

Post by Marc Venken »

Otto wrote:Hello Marc,
That's a good idea. Could you post an example so we can get a feel for the resolution of the bitmaps and then the print quality looks like.
Best regards,
Otto
The file are 300 dpi on real size. So the quality is no issue ? I print a good quality this way.

Image

If I was a commercial programmer, I think I still use this technique. As you know I use FW for personal use only for my company and so my only customer is 'My Wife'. The problem ?
They are the wurst customers :lol: :lol: :lol: No.. She also says can you put it here, and this here, and ..... (while creating output forms.) Now I can easily say, Honney please make a photoshop sample
how you you want it on a A4-size in 300 dpi... Thats it ! No writing code, changing code until they are happy. The Xbrowse and the data for printing (The idea is there, but for now I only have a hardcoded loop) would be very easy if the
jpg file from my wife is changed (ex. There is a extra promotional slogan) and you want some FW text. or positioning is changed.

But I see that you have it for ER. For Xbrowse it should also be very easy

I suspect also that many here are using this kind of printing technique
Marc Venken
Using: FWH 20.08 with Harbour
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Printer class question - RESOLVED

Post by Silvio.Falconi »

Otto wrote:Silvio,

please post your system then we can use it.


For web I am testing Koolreport.com.
http://forums.fivetechsupport.com/viewt ... om#p215276

Best regards,
Otto

Otto,
Maybe you didn't understand that in Italy we have some complicated modules, it's not just the simple invoice or the simple order, it's much more and no software is able to execute these modules except (as I've already seen) fastreport. But it is not a single module or ten or twenty, there are at least 50 groups and each group is divided into 30/40 modules


because you continue to write nonsense without recognition of the cause.

I understood that Otto is in love with ER because he is able to work with it, we are not able because ER has problems

The EasyReport print engine seems to work fine. Not the designer, because the dragging of the controls doesn't work properly and things get worse when you add boxes, lines, etc.

If we are not able to make it work it just means one thing that Otto has a 100% working version without the problems that we encounter and that we have always reported.
I can't spend hours and hours making a module and then if I have to work on it I don't have a capable zoom that magnifies that part up to 400% and then a line is crooked and destroys the whole module, but are we kidding?

You do not realize what you are saying

Fwteam should create a Visual Report Designer with balls not like Myrpt or like ER

I know that it can be done with very few object classes, I cannot tell you how and I am not able to do it but you who are more experienced than me I am sure you are capable
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply