Label Printing

Posted by: ericsch on 4 August 2017, 4:33 am EST

    • Post Options:
    • Link

    Posted 4 August 2017, 4:33 am EST

    Hi,



    I need to print a laser printer label sheet. I have read the ‘Creating Labels’ section in the Help documentation. But for me it’s not very clear, and it doesn’t work.

    I need to print the sheet by code. And there exist already a report. I need to reformat this report and print it to a label sheet.



    Do I need to use only .Run or .Restart, when I change the properties of the report?



    Is there somewhere an example how to do it?



    Thanks



    Eric

  • Posted 4 August 2017, 4:33 am EST

    Hello Eric–



    If you need to have a manual print job you will have to use the System Printer that is included in the Interop assembly here is an article that discusses how to use the System Printer: /Forums/showpost.aspx?PostID=1011



    If you are changing certain properties of the report it is usually not a bad idea to issue a .Restart and then a .Run after making the necessary changing to the report.

  • Posted 4 August 2017, 4:33 am EST

    Hi,

    I don't need a "manual print job", I don't need to send special chars.



    I would like to print DISABLED_ONly some labels in a newspaper column style.

    I have now a solution, which is working: I can't use the existing report, I need to copy the report (or layout) to a new report:



        objArd.SaveToObject mReportLabel

       ' mRep.Sections.Remove (0)

        'mRep.Sections.Remove (1)

      

        With mReportLabel.Sections("Detail")

            .ColumnCount = 3

            .ColumnDirection = ddCDAcrossDown

            .ColumnSpacing = 13# * 567

            .Height = 3.3 * 567

            .CanGrow = False

            .CanShrink = False

            .KeepTogether = True

        End With

       

        With mReportLabel

            Set mrepDetailLabel = .Sections("Detail")

            .Printer.Copies = 1

            .Printer.PaperSize = 9

            '1440 twips = 1 inch

            ' 567 twips = 10 mm

            .PageSettings.TopMargin = 1.3 * 567

            .PageSettings.LeftMargin = 0.8 * 567

            .PageSettings.RightMargin = 0.8 * 567

            .PageSettings.BottomMargin = 1.4 * 567

            .PageSettings.PaperSize = 9

            .PageSettings.PaperBin = 7

            .PageSettings.PaperWidth = .Printer.PaperWidth

            'Resets report

            .ResetScripts

            .Fields.RemoveAll

            .Restart

            .Run (False)

            .PrintReport (True)

        End With

       

        Set objArv.ReportSource = mReportLabel



    This code is working. But to question are left:

    - What is exactly "ColumnSpacing"? From where to where? Space between columns? Or the begin of every Column?

    - One problem is left. There's now image in the output. If I add a image in the designer, there's now image in the output.



    Thanks

    Eric

  • Posted 4 August 2017, 4:33 am EST

    Hello Eric–



    The column spacing property is for the spacing between columns in a multiple column report.



    I am not sure what you mean when you say that there is an image on the report when you add an image on the report the image is on the output can you explain?

  • Posted 4 August 2017, 4:33 am EST

    Hi Trent,



    Sorry, not very clear that with image.

    I mean, in the designer I add a picture (Not data bound).



    After I calling objArd.SaveToObject mReportLabel and the Initalization,

     I print the report and show the preview (Viewer "Set objArv.ReportSource = mReportLabel").

    There's is no picture.

    I don't know why, the picture isn't to big (size is ok).



    Thanks

    Eric

  • Posted 4 August 2017, 4:33 am EST

    Hello Eric–



    Can you put together a project that would show me the problem you are having?  I tried this in the Diamond Report sample that comes with ActiveReports 2 and I wasn’t able to reproduce the problem you are having.  Can you try this in the Diamond report sample and see if you are having the same problems in that sample?

  • Posted 4 August 2017, 4:33 am EST

    Hi Trent,



    Thanks for helping, but your nice Kim Nathans has solved the problem. I have mixed up the .PrintWidth and .ColumnSpacing property.



    Thanks

    Eric

  • Posted 19 November 2017, 5:06 pm EST

    HII

    I need a solution for canon printer issue. while using canon printer I got an error sometimes that my canon printer is not responding. Please suggest me the solution to this issue. https://notresponding.net/canon-printer-error-fix/

  • Posted 21 November 2017, 3:02 am EST

    Hello,

    This is a difficult issue to reproduce. I do not have Canon printer to test this at my end. Could you please provide me your application to test with Ricoh printer which I have at my end. Also let me know which version of AR you are working with?

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels