Printing

I am having trouble using the printer_redirection code.  My printer will act like it wants to start printing, but nothing comes out. I am testing with the testprintraw cobol project.  My printer acts like it wants to start printing, but nothing happens.  What I am looking to do is build a report, save it to a file with headers and data and then print those results to my windows printer.  I am using the Micro Focus Cobol for Visual Studio 2012 version.

Tags:

Parents
  • No, that was an example for assigning to an environment variable because you mentioned you were using an external name which uses an environment variable.

    If your select statement is assigning directly to a file name then you do not specify EXTERNAL in the select and you do not need to do the display and accept of the environment variable either.

    So it would read:

    select test-file assign to  'C:\users\....\salesrpt'

    and then this would be the name of the file that you set in the PC_PRINT_FILE call as well.

    Question: is this a native code project or a managed code project that you are using?

    The example in the knowledgbase is for a managed code project so I just wanted to make sure we were on the same page here and then I can send you a complete sample.

Reply
  • No, that was an example for assigning to an environment variable because you mentioned you were using an external name which uses an environment variable.

    If your select statement is assigning directly to a file name then you do not specify EXTERNAL in the select and you do not need to do the display and accept of the environment variable either.

    So it would read:

    select test-file assign to  'C:\users\....\salesrpt'

    and then this would be the name of the file that you set in the PC_PRINT_FILE call as well.

    Question: is this a native code project or a managed code project that you are using?

    The example in the knowledgbase is for a managed code project so I just wanted to make sure we were on the same page here and then I can send you a complete sample.

Children
No Data