-
Apr 26th, 2014, 07:39 AM
#1
Thread Starter
Addicted Member
not set left margin in printer please help quick
Hello,
i create a datareport6 and set LeftMargin = 720 and RightMargin = 720 but when i print on paper left margin is 1440 (its means 1 inch left side of paper) then print start on paper how can set leftmargin = 720 on datareport6 please help my paper size 8.5''
i also used but faild
Printer.CurrentX = 0.5 * 1440
DataReport6.PrintReport False
Last edited by kako0000000; Apr 26th, 2014 at 07:43 AM.
-
Apr 26th, 2014, 08:25 AM
#2
Re: not set left margin in printer please help quick
try setting the margin using vbInches....some printers will not allow left edge printing....yours may not...but try this
Code:
Printer.ScaleMode = vbInches
Printer.CurrentX = 1
Printer.CurrentY = 1
Printer.Print "hello"
Printer.EndDoc
EDIT: I don't use datareports, so don't know if that would help you or not...but, if you run this small code, at least you can see if the printer will allow you to print at the left edge of your paper
Last edited by SamOscarBrown; Apr 26th, 2014 at 08:39 AM.
-
Apr 26th, 2014, 08:39 AM
#3
Re: not set left margin in printer please help quick
I often set the left margin to 0 to get the printer to print closer to the left edge.
Margin settings seem to start from the first printable area and in many cases that is up to 1/2 inch from the left then they add whatever margin to that
btw I would not expect setting currentx to do anything at all in this case.
The report settings will determine what gets printed and where.
Currentx and currenty is for use with the printer.print method
-
Apr 26th, 2014, 08:45 AM
#4
Thread Starter
Addicted Member
Re: not set left margin in printer please help quick
-
Apr 26th, 2014, 08:47 AM
#5
Re: not set left margin in printer please help quick
did you try setting the margin to 0?
-
Apr 26th, 2014, 08:49 AM
#6
Thread Starter
Addicted Member
Re: not set left margin in printer please help quick
set datareport leftmargin 720 but when i using printer DataReport6.PrintReport False command printer print report is ok but left side left one inch.
but i set leftmargin is 720
-
Apr 26th, 2014, 10:09 AM
#7
Re: not set left margin in printer please help quick
So set it to a lower value, did you try 0? If not then try it and see what happens.
-
Apr 26th, 2014, 12:15 PM
#8
Re: not set left margin in printer please help quick
Printers (or their drivers) often limit the printable area on a sheet of paper with implied margins.
-
Apr 26th, 2014, 01:42 PM
#9
Thread Starter
Addicted Member
Re: not set left margin in printer please help quick
i try but is not work please any idea how can print using leftmargin 0 start print on paper
-
Apr 26th, 2014, 08:42 PM
#10
Re: not set left margin in printer please help quick
Originally Posted by dilettante
Printers (or their drivers) often limit the printable area on a sheet of paper with implied margins.
That is what I said in Post #2, hence the small code to check to see if the printer would actually NOT limit the printable area or not...guess OP doesn't want to even check that....oh well.
-
Apr 27th, 2014, 10:42 AM
#11
Re: not set left margin in printer please help quick
Yes I know. I was just trying to repeat the point, hoping to get through to him.
-
Apr 27th, 2014, 12:03 PM
#12
Re: not set left margin in printer please help quick
As for the margin I do not use the datareport tool but assuming it has a property for leftmargin and it supports a value of 0 then that is turnign off any margin added by the report. Any margin that remains is coming from the printer or the driver.
I would think that a setting of 0 would have reduced the margin from what it was when set at 720 which would have been reduced from when it was at 1440, unless of course you set the margin incorrectly.
In any case since the OP did not tell us what happened when set to 0 ["not work" tells us nothing] nor do we have any idea how he/she is setting the margin there is not much more to say here.
-
Apr 27th, 2014, 12:43 PM
#13
Thread Starter
Addicted Member
Re: not set left margin in printer please help quick
-
Apr 27th, 2014, 02:21 PM
#14
Re: not set left margin in printer please help quick
See Bleed (printing).
Many printers have a bleed area that they cannot print into.
-
Apr 27th, 2014, 08:11 PM
#15
Thread Starter
Addicted Member
Re: not set left margin in printer please help quick
but when i use MS Word and its papersize set leftmargin is 0 then printer good print on the paper left side where i write how can possible this only not set datareport leftsidemargin net set but thanks help
-
Apr 27th, 2014, 08:40 PM
#16
Re: not set left margin in printer please help quick
Seems to work fine here.
Make sure you have VB6 SP6 installed. The DataReport got a lot of changes around the time of SP4, such as the Orientation property. This suggests there may have been margin handling changes as well.
See: FIX: Error Message "Report Width Is Larger Than the Paper Width" When Showing Data Report in Landscape
But no guarantees.
-
Jul 15th, 2018, 07:45 AM
#17
New Member
Re: not set left margin in printer please help quick
Hello,
I also have this problem. I want to set leftmargin set to 0. Post #2 code is working correctly. But I want for DataReport.
I'm using thermal bill printer. When Post #2 code is used, left margin size is 5mm. But it is 10mm when DataReport is used.
Please help.
-
Jul 15th, 2018, 07:50 AM
#18
Re: not set left margin in printer please help quick
Did you read post #16 (make sure you have SP6 installed) and go to the link dilettante provided?
-
Jul 15th, 2018, 10:25 AM
#19
New Member
Re: not set left margin in printer please help quick
Dear SamOscarBrown,
Many thanks for you. SP6 worked. But I have a another problem. DataReport adding option exist One PC(solved My problem). Other PC haven't. see the picture.
Please help.
-
Jul 15th, 2018, 01:55 PM
#20
Re: not set left margin in printer please help quick
If the following doesn't resolve your problem, you should start your own thread.
- With your project loaded, press Ctrl+T (or select Components from Project menu)
- When the components window opens, select the "Designers" tab near top of the window
- Ensure "Data Environment" and "Data Report" are checked and click the "Ok" button
- Now try to add your data report
-
Jul 16th, 2018, 01:00 AM
#21
New Member
Re: not set left margin in printer please help quick
Hello,
In addition to Post 17, My problem is not solved yet. when I use Data Report and POS machine, can not adjust left margin size to 5mm(on paper. it is viewing as 0 margin on PC). But other all times ( Data Report with other printer, Post #2 code or any other document with POS machine), can adjust left margin size to 5mm. what I said on Post 19 as "SP6 worked", I misunderstood. It was with another printer. How can I solve this? Please help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|