Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. how to print mailing labels?

how to print mailing labels?

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
7 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lisana
    wrote on last edited by
    #1

    I'm doing a vb application, and there is one problem I have and I don't know how to do it from VB. One sheet 8.5"x11", 6 Labels 3.333"x4" each Label, this is the Label sheet standar. I have to create a form to print this Labels in correct position. I don't have any idea to do this in VB form. should I have a datagrid and bind the mail address data to it, or a textbox or other controls, any ideas? Lisa

    R 1 Reply Last reply
    0
    • L Lisana

      I'm doing a vb application, and there is one problem I have and I don't know how to do it from VB. One sheet 8.5"x11", 6 Labels 3.333"x4" each Label, this is the Label sheet standar. I have to create a form to print this Labels in correct position. I don't have any idea to do this in VB form. should I have a datagrid and bind the mail address data to it, or a textbox or other controls, any ideas? Lisa

      R Offline
      R Offline
      Ranoush
      wrote on last edited by
      #2

      Try using Crystal Reports, this will help you in getting the right position..I\m afraid you have to do it in a manual way till you get the right x,y but it's i'll be really easy once you have an out line for the labels,,you just have to position the report against the real labels to check

      L 1 Reply Last reply
      0
      • R Ranoush

        Try using Crystal Reports, this will help you in getting the right position..I\m afraid you have to do it in a manual way till you get the right x,y but it's i'll be really easy once you have an out line for the labels,,you just have to position the report against the real labels to check

        L Offline
        L Offline
        Lisana
        wrote on last edited by
        #3

        I have tried using Crystal Reports, And I have problem with it. First, I have 6 parameters for the 6 labels entityID, the query like this: Select name, address From company -- In the select expert Company.entityid is one of ?ID1, ?ID2, ?ID3, ?ID4, ?ID5, ?ID6..when I input values, nothing shows in preview. I don't know how to correct bind to the 6 labels when the parameters have input. and how can I put the right label, the first two labels already used, so I want to choose the third label to print, how can I do that in the Crystal Reports? Lisa

        R 1 Reply Last reply
        0
        • L Lisana

          I have tried using Crystal Reports, And I have problem with it. First, I have 6 parameters for the 6 labels entityID, the query like this: Select name, address From company -- In the select expert Company.entityid is one of ?ID1, ?ID2, ?ID3, ?ID4, ?ID5, ?ID6..when I input values, nothing shows in preview. I don't know how to correct bind to the 6 labels when the parameters have input. and how can I put the right label, the first two labels already used, so I want to choose the third label to print, how can I do that in the Crystal Reports? Lisa

          R Offline
          R Offline
          Ranoush
          wrote on last edited by
          #4

          Lisa, I'm not sure if i got you right...but here it is First you have to create a parameter field To create a parameter field Check to make sure your report is open in the Design tab. On the View menu, click Field Explorer. The Field Explorer dialog box appears. Select Parameter Fields and click New. The Create Parameter Field dialog box appears. Enter a name for the parameter in the Name field Lets say (ID) Enter the desired prompting text in the Prompting text field Select the appropriate Value type from the list. Since you have 6 IDs , check (Allow multiple values) then Click Set default values. The Set Default Values dialog box appears. Make sure the Browse table is set to Company. From the Browse field drop-down list, select entityid. Start moving your Defaults IDs This will enables you to choose from any of the IDs. Click OK. The Create Parameter Field dialog box appears. Click OK. The Field Explorer dialog box appears with the ID parameter selected. Drag and drop the ID parameter into your report. Note: If you don't want to see the parameter field you dropped in your report, place it in a section you can suppress, such as a report header or footer. To incorporate the parameter into the selection On the Report menu, click Select Expert. The Choose Field dialog box appears. Select entityid from the Company table, then click OK. The Select Expert appears. Choose is equal to from the drop-down list. Choose the parameter from the adjacent drop-down list. {?ID}. Click OK. Click the Preview tab. The Enter Parameter Values dialog box appears. Select the ID to base the report on. Click OK. The Change in Record Selection Formula dialog box appears. Click Refresh Data. ------- So now everytime you refresh your report you get a prompt to choose your ID..and based on that the relative data will appear based on your selection query just design your report as if you're drawing the labels and place the info in each lable area... hope that will help

          L 2 Replies Last reply
          0
          • R Ranoush

            Lisa, I'm not sure if i got you right...but here it is First you have to create a parameter field To create a parameter field Check to make sure your report is open in the Design tab. On the View menu, click Field Explorer. The Field Explorer dialog box appears. Select Parameter Fields and click New. The Create Parameter Field dialog box appears. Enter a name for the parameter in the Name field Lets say (ID) Enter the desired prompting text in the Prompting text field Select the appropriate Value type from the list. Since you have 6 IDs , check (Allow multiple values) then Click Set default values. The Set Default Values dialog box appears. Make sure the Browse table is set to Company. From the Browse field drop-down list, select entityid. Start moving your Defaults IDs This will enables you to choose from any of the IDs. Click OK. The Create Parameter Field dialog box appears. Click OK. The Field Explorer dialog box appears with the ID parameter selected. Drag and drop the ID parameter into your report. Note: If you don't want to see the parameter field you dropped in your report, place it in a section you can suppress, such as a report header or footer. To incorporate the parameter into the selection On the Report menu, click Select Expert. The Choose Field dialog box appears. Select entityid from the Company table, then click OK. The Select Expert appears. Choose is equal to from the drop-down list. Choose the parameter from the adjacent drop-down list. {?ID}. Click OK. Click the Preview tab. The Enter Parameter Values dialog box appears. Select the ID to base the report on. Click OK. The Change in Record Selection Formula dialog box appears. Click Refresh Data. ------- So now everytime you refresh your report you get a prompt to choose your ID..and based on that the relative data will appear based on your selection query just design your report as if you're drawing the labels and place the info in each lable area... hope that will help

            L Offline
            L Offline
            Lisana
            wrote on last edited by
            #5

            Thanks, Ranoush.. I follow your steps, and it shows the correct result in each page, if I input 6 values, they show in 6 different pages. But I want them in one pages, how can I do it? I created 6 formula field call @label1, @label2, @label3, @label4, @label5, @label6, and put it to a 6 diferrent location in a page. I don't know how to do it. and one more thing is if there is @label1 and @label2 are already used, I want to print the new labeb in position @label3, is there anyway I can do it in Crystal Reports? and the ID Parameter is passing from VB. Thanks! Lisa

            1 Reply Last reply
            0
            • R Ranoush

              Lisa, I'm not sure if i got you right...but here it is First you have to create a parameter field To create a parameter field Check to make sure your report is open in the Design tab. On the View menu, click Field Explorer. The Field Explorer dialog box appears. Select Parameter Fields and click New. The Create Parameter Field dialog box appears. Enter a name for the parameter in the Name field Lets say (ID) Enter the desired prompting text in the Prompting text field Select the appropriate Value type from the list. Since you have 6 IDs , check (Allow multiple values) then Click Set default values. The Set Default Values dialog box appears. Make sure the Browse table is set to Company. From the Browse field drop-down list, select entityid. Start moving your Defaults IDs This will enables you to choose from any of the IDs. Click OK. The Create Parameter Field dialog box appears. Click OK. The Field Explorer dialog box appears with the ID parameter selected. Drag and drop the ID parameter into your report. Note: If you don't want to see the parameter field you dropped in your report, place it in a section you can suppress, such as a report header or footer. To incorporate the parameter into the selection On the Report menu, click Select Expert. The Choose Field dialog box appears. Select entityid from the Company table, then click OK. The Select Expert appears. Choose is equal to from the drop-down list. Choose the parameter from the adjacent drop-down list. {?ID}. Click OK. Click the Preview tab. The Enter Parameter Values dialog box appears. Select the ID to base the report on. Click OK. The Change in Record Selection Formula dialog box appears. Click Refresh Data. ------- So now everytime you refresh your report you get a prompt to choose your ID..and based on that the relative data will appear based on your selection query just design your report as if you're drawing the labels and place the info in each lable area... hope that will help

              L Offline
              L Offline
              Lisana
              wrote on last edited by
              #6

              hello, Ranoush, I tired to use the mail label templet, it works for the 6 labels in a page.. the only problem I have that it's the position. for example, you already used the first label in your label template, then next time when you want to print another labels, you want it to start from the second label position. how schould I do this in Crystal Reports. Thanks all your help! Lisa

              R 1 Reply Last reply
              0
              • L Lisana

                hello, Ranoush, I tired to use the mail label templet, it works for the 6 labels in a page.. the only problem I have that it's the position. for example, you already used the first label in your label template, then next time when you want to print another labels, you want it to start from the second label position. how schould I do this in Crystal Reports. Thanks all your help! Lisa

                R Offline
                R Offline
                Ranoush
                wrote on last edited by
                #7

                Lisa, when you've chosen the Label Template, these options were showing: Printing Direction The Printing Direction section enables you to specify the path that the program follows when printing the data on your labels. Across then Down Prints data left to right across the first row of labels, then across the second row, and so on. Down then Across Prints data down the first column of labels, then down the second column, and so on. you can change your printing direction or you can play with margins you want to print fewer labels across than the number calculated (fewer columns), increase the size of the right margin, left margin, or horizontal gap until the calculation changes to the number across that you want.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups