Troubles with fanfold labels

Posted by: iw1dov on 4 August 2017, 2:58 pm EST

  • Posted 4 August 2017, 2:58 pm EST

    Hi all.


    I am having some troubles in printing fanfold labels with a 9-pin dot matrix printer. I believe I am setting the right page size (in particular, page height), but when printing, the first two labels come out perfect, while the third gets wrong, as you can see in the attached image.


    It seems that an unwanted form feed is being issued at the bottom of the third label, just before printing the company logo.  All the labels before the third one are wrong in the same manner; that is, no further form feed seems to be issued.


    I am using ActiveReport 2.0 Pro with the latest service pack, on VB6 with the last service pack (SP6).


    What am I doing wrong?


    Thank you,


     


    Gianfranco


     



  • Replied 4 August 2017, 2:58 pm EST

    Thank you for the answer!


    No, I don't get the problem when emulating the printout with Word. In fact, I have to replace a Word MailMerge that generates the labels. Word gives me many troubles, but I have to admit that the printout (when I manage to get it) is OK.


    The label dimensions are 172 x 101,5 mm (6,77" x 4") and the printer is an Epson LX400 on a Windows 98 system. I cannot try the printer on a newer system, because the only PC I have with a parallel port is the Win98 one.


     In this moment I am very busy and I have no time to post the report, but I will do within a few hours.


    Thanks again,


    Gianfranco.

  • Replied 4 August 2017, 2:58 pm EST

    If you try to emulate this report in a sample Excel sheet or a Word document, do you get the same problem in the printout? Can you post the report you are using (DSR/DSX files) and give us the dimensions of the label in that printer.
  • Replied 4 August 2017, 2:58 pm EST

    Nobody can help me? :(
  • Replied 4 August 2017, 2:58 pm EST

    I am very sorry for the delay.


    Here there are the report files; I enclosed also the bitmap of the client's logo. I hope it is useful.


    Thank you very much for your attention and your patience,


     


    Gianfranco


    2006/10/rptArticoli.zip
  • Replied 4 August 2017, 2:58 pm EST

    I tried setting all the controls' CanGrow property to false, but it had no effect.


    The third record has nothing special: I inspected it an it seems all right. And, after all, the problem gets out also choosing another customer to print (these labels are for the items ordered by customers), always on the third label.


    Anyway, I deleted the third record for the customer "Livio Fenoglio", the one you see on the image I posted at the beginning, and the error simply shifts on the former fourth record.

  • Replied 4 August 2017, 2:58 pm EST

    I haven't seen this problem before and all I can recommend is you try few more things. Is this problem only occurs in printing but the report appears correctly in the viewer? Have you tried exporting to PDF and printing the PDF file instead? How about printing to any other printer loaded with paper of equal size to the labels.
  • Replied 4 August 2017, 2:58 pm EST

    You're right! In the print preview I can see three labels on a single sheet of paper; and the third label does not fit entirely on the sheet. I didn't activate the print preview before your suggestion (my fault) because it makes not much sense previewing a strip of labels...


    Now: OK, the paper size is not set correctly, but the question is: what have I to do, to correct the situation? In addition to setting them in the GUI, now I am trying to set the PaperHeight and PaperWidth properties in the ReportStart event, but it has no effect.


    What am I doing wrong now?

  • Replied 4 August 2017, 2:58 pm EST

    I tried it, but it doesn't work :(


    I set the left, bottom, and right margins a little bit larger than the smallest margin allowed by Word. The smallest top margin results to be zero, so I left it zero.


    Nothing changed: the first two labels print out OK, while the third goes wrong. After that, no other errors occur, so that all subsequent labels print with the company logo on top, instead of bottom, of the page.


    Ah, one more thing. I found an USB to LPT adapter, so now I am trying on a Win XP SP2 pc; nothing changes.

  • Replied 4 August 2017, 2:58 pm EST

    What if you temporarily set all the controls' CanGrow property to false. Is there something special about the third record? If you exclude the third record, would the subsequent cards in your report appear misaligned also?
  • Replied 4 August 2017, 2:58 pm EST

    I see that your report has zero margins on all sides. Please try to add a little margin so that the page is within the printable region of your printer.
  • Replied 4 August 2017, 2:58 pm EST

    Well, I think there is nothing different: I copied the paper settigs just from the property page...


    Anyway, here it is the code I am using:


    Private Sub ActiveReport_ReportStart()


       Printer.DeviceName = gszPrnLabels
       Printer.RenderMode = 1   'cfr. Knowledge base del 23/04/2003



       PageSettings.PaperSize = 255
       PageSettings.PaperHeight = 5755 '101.5 [mm] * 56.7 [twips/mm] => 5755.05[twips]
       PageSettings.PaperWidth = 9752
    End Sub


    gszPrnLabels is a global string variable that is to hold the name of the printer choosen to print these labels, as the printing device must be configurable on a per-user basis.
     

  • Replied 4 August 2017, 2:58 pm EST

    That's great. Honestly, I don't know why the code worked while the designer page settings didn't probably there was something difference. If you post the code you used, I could compare it to the report settings you had in the sample you sent me. It would be helpful also for other users searching the forum looking for a solution to similar problem.
  • Replied 4 August 2017, 2:58 pm EST

    I found it! :)


    I had to set the paper size in code. First of all, I set the printing device, and after that setting the paper size finally has effect and the report prints out correctly.


    But, just as curiosity: why setting the printer and paper in the development environment does not work? Am I doing something wrong?


    Thank you very much for your help,


     


    Gianfranco.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels