Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Network Printing Issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Network Printing Issue

    I finally got my database up and running (A4 -> A5v9 Conversion) and everything is working perfect except the printing. I am running a 3 user network using the runtime version. The printer is connected to one of the machines via a USB port. The 2 machines not connected to the printer work fine, but the machine connected to the printer will not print because the path is different. The 2 machines are seeing the printer through a network path (\\desktop1\printer1) where the connected machine is seeing (\printer1). How do I get around this. I tried adding the printer again to the connected machine as a network printer but that does not work. Any suggestions?

    A a side note I have a push button script on a form that prints a report automatically without any other user input. I don't want the user to be involved with selecting the printer.

    #2
    Re: Network Printing Issue

    Hi Chris,

    Have you named the printer and path in your application? Just let it be the default.

    To prevent the user seing the printer selection dialog box, uncheck the Display Print/Preview prompt at runtime?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Network Printing Issue

      I have unchecked the prompt user box previously. The path to the printer is named, but the paths in reality are different which is causing the problem. The computer with the printer sees it as a local printer while the other machine sees it with a network path.

      Comment


        #4
        Re: Network Printing Issue

        Can you make the shared printer the default for all machines and then make that setting in the layout to be printed? (default printer)

        Then it shouldn't matter what the path is.
        There can be only one.

        Comment


          #5
          Re: Network Printing Issue

          Unfortunately I can't. The printer that is printing this report is loaded with 3 part carbonless forms as it is printing work orders. Therefore I have to make sure that it is only being used for that report. All other documents will go to another printer with plain white paper.

          Comment


            #6
            Re: Network Printing Issue

            Chris, I don't have experience with this but this might be a case where your script needs to use

            REPORT.PRINTER_OVERRIDE()

            to set the desired printer depending upon which workstation the script is running on.

            -- tom

            Comment


              #7
              Re: Network Printing Issue

              Hi Chris,

              You might save yourself some hair on this one.

              Went through this a few years back.

              1. Will the impact printer work on a little print server?
              2. Do you have a old computer laying around doing nothing, you could control it with Remote Desktop Connection, and not use a monitor, etc.. install the impact printer on it, and use it as just a print server?

              As you found out the path will mess you up. Alpha likes the print driver in Windows Printers and Faxes to read exactly the same(same spelling and spaces). especially for the Alpha reports of course.

              I can't remember(don't think this will work) if you share the printer on the machine it is connected to. Rename all the share names to be alike, in each computer. Make sure all the driver names in Windows Printers and Faxes are identical. Then point Alpha Report to it. Pretty sure Alpha will give you the printer name with ne01 or ne 02 etc. after it, so this probably will still not work.

              I had to revert to my 1. and 2. above. Lot less frustration. That way all the machines see the same share and driver name in Windows.

              Ed

              Comment


                #8
                Re: Network Printing Issue

                We have a situation where workers can request files from one of 2 different file rooms in the building. What we do is to print a "request" form on a specific printer (not the default) even though the report is set to default. We use the printer override.

                Here is a sample of the code:

                Code:
                on error goto errors2
                'vcprinter should never be blank Code makes sure we dont send of a blank request
                
                [COLOR="red"]'***************************************************
                '  Below are the names of the printers as they are shared on the network. 
                ' the printers need to be defined on each machine as well
                '*****************************************************[/COLOR]
                IF FLOR="3" .and. close3<>"X" THEN
                	[COLOR="Red"]vcprinter = "FileRoom3"[/COLOR]  
                  elseif FLOR="4"
                	[COLOR="red"]vcprinter = "FileRoom4"[/COLOR]
                  elseif FLOR ="3" .and. close3 = "X"
                  	[COLOR="red"]vcprinter = "FileRoom4" [/COLOR] 'print 3rd floor requests to 4th floor when 3 is closed
                  else
                	ui_msg_box(aa.bcbss.agency+" File Room System","No Valid File Room Printer Specified, "+chr(13)+"File Room "+FLOR +" Specified - Cannot Print Request")
                  	end
                end if
                
                a5_previous_printer_name=ui_printer_default_get()
                delete options
                dim options as p
                options.dummy=1
                options_text=<<%str%
                <papersize="Letter 8 1/2 x 11 in">
                
                %str%
                property_from_string(options,options_text)
                delete options.dummy
                delete oldOptions
                dim oldOptions as p
                oldOptions.dummy = 1
                old_printer_name = report.Printer_override(a5_previous_printer_name,options,oldOptions)
                delete oldOptions.dummy
                
                on error goto errors2 'if they cannot communicate with the printer will error, and this restores the default if so
                temp=ui_printers_get()
                'Select the correct printer name this should work for any OS
                ans = alltrim(*for_each(foo,if((vcprinter $ word(temp,*counter(),crlf())),word(temp,*counter(),crlf()),""),temp))
                if ans =""
                ui_msg_box("ERROR","No printer named")
                end
                end if 
                if w_count(ans,crlf())>1
                ui_msg_box("ERROR","Duplicate printer names print job will be canceled")
                end
                end if
                :report.printer_override(ans)
                :Report.Print("Case Request [email protected]",query.filter,query.order)
                'after printing we must reset the printer back to the way it was when we started
                :report.printer_override("")
                
                'make sure they get back to Case # index
                dbh1.index_primary_put("case1")
                
                  
                ' ****  Tell them where to go...   ******
                IF FLOR="3" .and. close3 <>"X" THEN 
                	sent_to = "Your Request has been Printed in the 3rd Floor Fileroom"+CHR(13)+"Please allow sufficient time for the file to be pulled."
                  ELSEIF FLOR="4"
                	sent_to = "Your Request has been Printed in the 4th Floor Fileroom"+CHR(13)+"Please allow sufficient time for the file to be pulled."
                  elseif FLOR ="3" .and. close3 = "X"
                  	sent_to = "Your 3rd Floor Request has been Printed in the 4th Floor Fileroom"+CHR(13)+"Please allow sufficient time for the file to be pulled."	
                  ELSE
                	ui_msg_box(aa.bcbss.agency+" File Room System","No Valid File Room Printer Specified, "+chr(13)+"File Room "+FLOR +" Specified - Cannot Print Request")
                  	end
                END IF
                
                ui_msg_box(aa.bcbss.agency+" File Request", sent_to, 64)
                end
                I hope this helps.

                Tom

                Comment


                  #9
                  Re: Network Printing Issue

                  The problem is that these are not printers connected to the network directly. They are attached to individual computers via USB cables. Therefore the name is different because of the path.

                  Comment


                    #10
                    Re: Network Printing Issue

                    The only option there is that you need to identify the individual computers, and modify the code to use the proper path depending on where you are coming from.

                    Put some sort of tag file on the machines. It should only be that the machine that uses the USB port would be different.


                    Code:
                    if file_exists("c:\tag.txt")     'tag file on machine with the printer
                        printerpath = "local printer"  'however it is designated locally
                      else
                        printerpath = "remote printer"  ' you would need to use the proper share name here
                    end if
                    Tom
                    Last edited by Tom Henkel; March 25, 2009, 01:54 PM. Reason: can't type

                    Comment


                      #11
                      Re: Network Printing Issue

                      No need for a tag file. Just use API_GETMACHINENAME() [Presuming that in a network they all have to have different names!]. This is how I set up all workstations in a network to use whatever printer is most convenient for a particular type of print job. One user is set to use 1st floor printer A, Tray 3 for a printout whereas another user would be set to use 2nd floor printer B, Tray 2 for the same job. All this using printer_override() reading a table of settings for each machine in the network (I have a routine for setting up each computer for each type of job--B/W letterhead, Color Letterhead, legal size paper, labels, etc.). Then each print job on a button or menu item specifies the type of job, e.g., legal size paper, and automatically sends the job to the proper printer, tray, etc. and it could be different for each computer. If the print button or menu item does not specify this, the job just goes to the default printer for the machine, or to whatever the layout might specify (printer_override() overrides everything else).

                      Raymond Lyons.

                      Comment

                      Working...
                      X