Troubles with fanfold labels

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

  • Posted 4 August 2017, 2:58 pm EST

    <FONT face=Arial>Hi all. </FONT>

    <FONT face=Arial>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. </FONT>

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

    <FONT face=Arial>I am using ActiveReport 2.0 Pro with the latest service pack, on VB6 with the last service pack (SP6).</FONT>

    <FONT face=Arial>What am I doing wrong? </FONT>

    <FONT face=Arial>Thank you, </FONT>

    <FONT face=Arial></FONT> 

    <FONT face=Arial>Gianfranco</FONT>


  • Replied 4 August 2017, 2:58 pm EST

    <FONT face=Arial>Nobody can help me? :(</FONT>
  • 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

    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

    <FONT face=Arial>Thank you for the answer!</FONT>

    <FONT face=Arial>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.</FONT>

    <FONT face=Arial>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. </FONT>

    <FONT face=Arial> In this moment I am very busy and I have no time to post the report, but I will do within a few hours. </FONT>

    <FONT face=Arial>Thanks again, </FONT>

    <FONT face=Arial>Gianfranco.</FONT>

  • Replied 4 August 2017, 2:58 pm EST

    <FONT face=Arial>I tried setting all the controls' CanGrow property to false, but it had no effect. </FONT>

    <FONT face=Arial>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. </FONT>

    <FONT face=Arial>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. </FONT>

  • Replied 4 August 2017, 2:58 pm EST

    <FONT face=Arial>I am very sorry for the delay. </FONT>

    <FONT face=Arial>Here there are the report files; I enclosed also the bitmap of the client's logo. I hope it is useful.</FONT>

    <FONT face=Arial>Thank you very much for your attention and your patience, </FONT>

    <FONT face=Arial></FONT> 

    <FONT face=Arial>Gianfranco </FONT>

  • 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

    <FONT face=Arial>I tried it, but it doesn't work :( </FONT>

    <FONT face=Arial>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. </FONT>

    <FONT face=Arial>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. </FONT>

    <FONT face=Arial>Ah, one more thing. I found an USB to LPT adapter, so now I am trying on a Win XP SP2 pc; nothing changes. </FONT>

  • Replied 4 August 2017, 2:58 pm EST

    <FONT face=Arial>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...</FONT>

    <FONT face=Arial>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. </FONT>

    <FONT face=Arial>What am I doing wrong now? </FONT>

  • Replied 4 August 2017, 2:58 pm EST

    <FONT face=Arial>Well, I think there is nothing different: I copied the paper settigs just from the property page... </FONT>

    <FONT face=Arial>Anyway, here it is the code I am using:</FONT>

    <FONT face="Courier New">Private Sub ActiveReport_ReportStart()</FONT>

    <FONT face="Courier New">   Printer.DeviceName = gszPrnLabels
       Printer.RenderMode = 1   'cfr. Knowledge base del 23/04/2003</FONT>

    <FONT face="Courier New">

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

    gszPrnLabels<FONT face=Arial> 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. </FONT>

  • 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

    <FONT face=Arial>I found it! :)</FONT>

    <FONT face=Arial>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.</FONT>

    <FONT face=Arial>But, just as curiosity: why setting the printer and paper in the development environment does not work? Am I doing something wrong? </FONT>

    <FONT face=Arial>Thank you very much for your help, </FONT>

    <FONT face=Arial></FONT> 

    <FONT face=Arial>Gianfranco.</FONT>

  • 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.
Need extra support?

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

Learn More

Forum Channels