Page 2 of 3

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Fri May 08, 2009 4:15 pm
by sudip
rathinagiri wrote: In HMG, the dimension of width and height of the paper is measured in millimeters and not columns. For example, if we choose an 'A4' paper, it is 210 mm wide and 297 mm high.

From this we can reduce the top, left, right and bottom margins say 25 mms (approx. 1 inch).

Then, we start printing like this @ 25,25 print 'This is to be printed' font "Arial" size 10

Hence, if you want to have the same proportion like your old dos, we can have here a small udf to convert the column number to mm.

@ c2mm(10),c2mm(10) print 'This as the first column' font "Arial" size 10
@ c2mm(10),c2mm(20) print 'This as the second column' font "Arial" size 10

Now, the function c2mm() is like this.

function c2mm(ncol)
return (ncol/80 * 210) // 80 is the number of columns in your old dos application. 210 is the width of the paper in windows. :)

I think I hadn't messed you more.
Rathi,

Thanks a lot! And I am learning so many things about printing today! Thank you Swapan for this topic :)

Now I have a suggestion. IMHO, may I change your code as:

@ r2mm(10),c2mm(10) print 'This as the first column' font "Arial" size 10
@ r2mm(10),c2mm(20) print 'This as the second column' font "Arial" size 10

...
...
Function R2mm(nRow)
return (nRow/66 * 297)

...
...

Now is there any function(s) to get the current Page Width and Current Page Height (PAPERWIDTH / PAPERLENGTH :?: ). And is there any function to get current row or column position like PROW(), PCOL()?

BTW, I am storing your posts in this this thread in my computer (like I did in case of MySql).

Thank you again.

Regards.

Sudip

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Fri May 08, 2009 4:54 pm
by Rathinagiri
It is nice to have a function for row too.

I don't think that there are functions like prow() and pcol() available :(

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 4:05 am
by swapan
rathinagiri wrote: Hence, if you want to have the same proportion like your old dos, we can have here a small udf to convert the column number to mm.

@ c2mm(10),c2mm(10) print 'This as the first column' font "Arial" size 10
@ c2mm(10),c2mm(20) print 'This as the second column' font "Arial" size 10

Now, the function c2mm() is like this.

function c2mm(ncol)
return (ncol/80 * 210) // 80 is the number of columns in your old dos application. 210 is the width of the paper in windows. :)
Rathi, its wonderful for your being so supportive....., hope others will also share their "ways" to tackle windows printing for those with a HANGOVER OF DOS PRINTING CONCEPT!
rathinagiri wrote: I think I hadn't messed you more.
No not at all! Infact you've blessed this thread with your valuable inputs!

In this regard would love to know if Dot Matrix Printers are still prevailing in other countries?

With regards,

Swapan

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 4:20 am
by swapan
sudip wrote: Now I have a suggestion. IMHO, may I change your code as:

@ r2mm(10),c2mm(10) print 'This as the first column' font "Arial" size 10
@ r2mm(10),c2mm(20) print 'This as the second column' font "Arial" size 10

...
...
Function R2mm(nRow)
return (nRow/66 * 297)

...
...

Now is there any function(s) to get the current Page Width and Current Page Height (PAPERWIDTH / PAPERLENGTH :?: ). And is there any function to get current row or column position like PROW(), PCOL()?

BTW, I am storing your posts in this this thread in my computer (like I did in case of MySql).

Thank you again.

Regards.

Sudip

Thanks Sudip for taking interest in this topic. Yes your this function is also required. I'm done with a simple Master Entry form and now my next agenda was to print this data as Master List & later on print one sheet with all the related info. of an individual master record. Without the support of this forum wouldn't have come so far.......in any case there's lot...lot to learn.

Regards,

Swapan

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 9:17 am
by sudip
Hi Swapan,
swapan wrote: In this regard would love to know if Dot Matrix Printers are still prevailing in other countries?
Regarding DMP, please try to convert all your programs to use Windows Printing ASAP. Becase, now a days, all new DMP printers are connected with USB port only. If you transfer all your reports to windows printer compatible, then you don't have to worry about whether it is DMP or any other printer.

With best regards.

Sudip

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 9:23 am
by Rathinagiri
Even, in our forum itself, we have a small software to convert dot matrix printing to windows printing as such!

That would also be useful, you can use old style of printing. It can be useful if you have old printers too.

The only problem is we can't have preview.

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 10:56 am
by swapan
Guys .........

Now the issue of giving page-break in Potrait & Lanscape mode.

In Clipper-Dos application, I use :
if ln=1 or ln>60
RepoHead() && this routine prints the heading
endi
ln=iif(ln>60,1,ln) && where ln denotes line no.

Now tell me we've to give similar kind of treatment here also, and Is it so:-

if Potrait mode
nHeight=297
elseif Landscape mode
nHeight=210
endif
if ln>nHeight && ln=current row
end printpage
ln=0 && or 1
start printpage
endif

Or I'm again getting messed up with DOS printing hangover!

Regards,

Swapan

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 11:03 am
by sudip
rathinagiri wrote:Even, in our forum itself, we have a small software to convert dot matrix printing to windows printing as such!

That would also be useful, you can use old style of printing. It can be useful if you have old printers too.

The only problem is we can't have preview.
So, you may guess what I shall request ;) How can I download that software ?

Thanks in advance.

Regards.

Sudip

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 11:04 am
by swapan
rathinagiri wrote:Even, in our forum itself, we have a small software to convert dot matrix printing to windows printing as such!

That would also be useful, you can use old style of printing. It can be useful if you have old printers too.

The only problem is we can't have preview.
Is it taking care of 132 cols. reports in compressed mode? I mean 225/232 chars. gets printed horizontally on a DMP in compressed mode, what happens to such reports with this utility? BTW is it the same Sudip was referring to in this thread?

Take care..... will be a bit busy attending mairrage ceremonies ( :lol: ), but when I'm back hope to see you guys with fresh inputs.

Re: HOW TO PRINT A SIMPLE REPORT IN WINDOWS FORMAT

Posted: Sat May 09, 2009 11:21 am
by sudip
Hello Swapan,

I hope you should go thru the reference file /hmg/DOC/print.html, written by Robergo Lopez. It is extremely helpful.

Regards.

Sudip