Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8527073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:27:11+00:00 2026-06-11T08:27:11+00:00

I am creating a VB app which will move xls reports from a directory

  • 0

I am creating a VB app which will “move” xls reports from a directory to a ReportSafe app. I am also working in an existing VB app which does just that, so I am using it for reference.

It isn’t as simple as moving files from one directory to another, because ReportSafe requires an lpr command to tell it (ReportSafe) which file to pick up.

Here is what I have so far:

Imports System.IO
Module Module1

Sub Main()

    ''Declarations
    Dim Files As ArrayList = New ArrayList()
    Dim FileName As String

    ''Write All Files in *directory* to ReportSafe
    Files.Clear()
    Files.AddRange(Directory.GetFiles(*directory*))
    For Each FileName In Files

        Dim RPname As String
        Dim RealName As String
        RPname = FileName.ToString
        RealName = "/"
        RealName = RealName & RPname.Remove(0, 34)

        Dim a As New Process
        a.StartInfo.FileName = "C:\Windows\system32\lpr.exe"
        a.StartInfo.Arguments = "-S*ServerName* -Plp -J" & Chr(34) & RealName & Chr(34) & " " & Chr(34) & RPname & Chr(34)
        a.StartInfo.UseShellExecute = False

    Next
End Sub

End Module

The whole lpr command/arguments are throwing me for a loop. I’m not sure if my question is specific to ReportSafe, and if that’s the case, I may be out of luck here. I have pulled this code from the already existing app which moves reports to ReportSafe, and adjusted for my own use, but no luck so far.

FYI, I had to turn on LPR Monitor services to obtain to the lpr.exe

Questions:
What are the proper arguments to pass through to this lpr command?
Is there a problem with the logic that is causing the issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:27:13+00:00Added an answer on June 11, 2026 at 8:27 am

    I continued to tinker and look at my reference code and discovered some flaws in logic:

    For one, the report name I was passing did not include the complete file path.
    Another thing is that I never started the process with a.Start(). Rookie mistakes for sure… haha

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating just a simple android app which will respond to received. I
I am creating an app which will have a question in a UILabel and
I'm creating a gallery section for my app which will be used to show
I am creating an app which will be used to upload images to a
I am Creating an app which will store data of songs in database, i
I'm planning on creating an app which will utilise Phonegap, however the app is
I am creating an app for android which will be used by gym members.
I'm creating an app that has a UITableView. The data will be comming from
I'm creating an android app which will call a method which parses the selected
I am creating a generic app which will have different builds for different customers.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.