Skip to main content
I just discovered (joyfully) that we could print and email (by way of Cups-PDF post processing options) any D3 report to a PDF file by defining a shared printer that outputs its contents through Cups-PDF (we use D3/Linux).  The printer also respects the CUPS options passed to it (I have only tested -o landscape and -o cpi=17 so far).

Coming out of this discovery, here is an initial list of wish I hads:
  1. The ability to directly mail the reports to the consumers rather than having to forward them from a single central mailbox.
  2. The ability to inject the title of the report into the PDF document and also name the resultant file for ease of identification.
  3. The ability to colorize elements of the report.  I guess this would have to come from some DEVICE file definition.
  4. The ability to archive the reports based on title and date/time generated.
Any help in respect of the above would be appreciated.

Finally, is ROCKET planning to develop anything in this regard.

Best regards and keep safe,

Vincent "Kim" Elliott
ITC, Bearings & Accessories Ltd.
83 Harbour Street,
Kingston, Jamaica

Tel: 876-922-1950
Fax: 876-922-8129
Cell: 876-315-2739
I just discovered (joyfully) that we could print and email (by way of Cups-PDF post processing options) any D3 report to a PDF file by defining a shared printer that outputs its contents through Cups-PDF (we use D3/Linux).  The printer also respects the CUPS options passed to it (I have only tested -o landscape and -o cpi=17 so far).

Coming out of this discovery, here is an initial list of wish I hads:
  1. The ability to directly mail the reports to the consumers rather than having to forward them from a single central mailbox.
  2. The ability to inject the title of the report into the PDF document and also name the resultant file for ease of identification.
  3. The ability to colorize elements of the report.  I guess this would have to come from some DEVICE file definition.
  4. The ability to archive the reports based on title and date/time generated.
Any help in respect of the above would be appreciated.

Finally, is ROCKET planning to develop anything in this regard.

Best regards and keep safe,

Vincent "Kim" Elliott
ITC, Bearings & Accessories Ltd.
83 Harbour Street,
Kingston, Jamaica

Tel: 876-922-1950
Fax: 876-922-8129
Cell: 876-315-2739
Hi, Vincent. Brian Cram here. It's been a while since we talked. Hope you are doing well.

To your question about CUPS PDF printing, I don't know if any of this is currently on the radar, and if I had to bet, I would bet that it is not. Would you like me to enter some enhancement requests on your behalf?

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------
Hi, Vincent. Brian Cram here. It's been a while since we talked. Hope you are doing well.

To your question about CUPS PDF printing, I don't know if any of this is currently on the radar, and if I had to bet, I would bet that it is not. Would you like me to enter some enhancement requests on your behalf?

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------
Hi Brian,
Yes...it has been a long time and hope that you are also keeping well.

I think it would be a good idea to enter the enhancement requests given the current climate of remote work.  Soft copies of reports delivered electronically I think is definitely something that should be brainstormed and implemented.

Another good to have is an Excel spreadsheet generated from the SS 
connective.

Best regards and keep safe,

Vincent "Kim" Elliott
ITC, Bearings & Accessories Ltd.
83 Harbour Street,
Kingston, Jamaica

Tel: 876-922-1950
Fax: 876-922-8129
Cell: 876-315-2739


Hi Brian,
Yes...it has been a long time and hope that you are also keeping well.

I think it would be a good idea to enter the enhancement requests given the current climate of remote work.  Soft copies of reports delivered electronically I think is definitely something that should be brainstormed and implemented.

Another good to have is an Excel spreadsheet generated from the SS 
connective.

Best regards and keep safe,

Vincent "Kim" Elliott
ITC, Bearings & Accessories Ltd.
83 Harbour Street,
Kingston, Jamaica

Tel: 876-922-1950
Fax: 876-922-8129
Cell: 876-315-2739

Hi Vincent,

When our staff were sent home during COVID I had to come up with a way to print D3 reports and to print network documents remotely in people's homes. They also needed to generate PDF documents from network documents and Office documents generated by D3.

I had no idea how to do this but managed to wing my way through it by writing a few subroutines and utility programs to help along the way.

My solution centred on CSV files and plain text files. We use HostAccess as our terminal emulator and I used some of their ideas for file transfers to make my own.
For plain text files, i.e. D3 reports, I set everyone's default printer using SP-ASSING HSF99. This only ever creates a Hold File with a form queue of 99, easy to spot in the LQ listing. I then wrote an EXPORT utility program that sends the hold file to a common network location everyone has access to, in our case Z:\\Temp. The users can then pick up the report and do with it as they please.

For Excel spreadsheets, I noted there is a way to produced TSV output from a SORT or LIST command. See the D3 Reference Manual gem below:

Tabbed Output

AQL allows another form of output referred to as tab delimited output for use when transferring data from D3 to PC applications. Optionally, this can be selected by modifying the AQL command that is used in the AQL sentence. This is done by adding an additional mode ID (53) to the third value of attribute 2 of the master dictionary definition of the AQL command that is being used. AQL produces output delimited by tabs and each line of data is terminated with a CR for transfers to applications running on PCs.

I created 2 new verbs SORTT and LISTT which are copies of the SORT & LIST verbs with the change to attrib 2 as noted above. It works just fine and produces a TSV file. There is a caveat though, it does not produce a header row. I have asked Rocket for a solution but none was forthcoming. I began writing a utility program to insert a header row but alas, sadly, I never managed to get it going sufficiently to make it a proper working utility. It only works for VERY simple AQL statements.

For D3 reports generated programmatically by the application, I have a subroutine that generates CSV records from a dynamic array. It is a generic CSV utility sub that generates CSV records by default, but you can specify what field delimiter and value delimiter to use if the standard comma and quote characters are not suitable. I append the generated CSV records into a dynamic array and send it to the network using a utility program/sub that creates a Q-Pointer to the network Share be used for the file transfers (Z:\\Temp in our case). Excel can then automatically import the CSV file and create a worksheet from it.

I must admit, I rarely use the SORTT or LISTT verbs, preferring to write report programs (which give me more freedom in selection, formatting and presentation), then generating CSV records from the report lines and finally exporting the generated item to the network.

I'm happy to share my code with you if you like to get an idea of the process or to use it in your business if needed. It's not glorious code, just gets the job done in the short space of time available to me.


------------------------------
Walter Kiess
SA Police Super
------------------------------
Hi Vincent,

When our staff were sent home during COVID I had to come up with a way to print D3 reports and to print network documents remotely in people's homes. They also needed to generate PDF documents from network documents and Office documents generated by D3.

I had no idea how to do this but managed to wing my way through it by writing a few subroutines and utility programs to help along the way.

My solution centred on CSV files and plain text files. We use HostAccess as our terminal emulator and I used some of their ideas for file transfers to make my own.
For plain text files, i.e. D3 reports, I set everyone's default printer using SP-ASSING HSF99. This only ever creates a Hold File with a form queue of 99, easy to spot in the LQ listing. I then wrote an EXPORT utility program that sends the hold file to a common network location everyone has access to, in our case Z:\\Temp. The users can then pick up the report and do with it as they please.

For Excel spreadsheets, I noted there is a way to produced TSV output from a SORT or LIST command. See the D3 Reference Manual gem below:

Tabbed Output

AQL allows another form of output referred to as tab delimited output for use when transferring data from D3 to PC applications. Optionally, this can be selected by modifying the AQL command that is used in the AQL sentence. This is done by adding an additional mode ID (53) to the third value of attribute 2 of the master dictionary definition of the AQL command that is being used. AQL produces output delimited by tabs and each line of data is terminated with a CR for transfers to applications running on PCs.

I created 2 new verbs SORTT and LISTT which are copies of the SORT & LIST verbs with the change to attrib 2 as noted above. It works just fine and produces a TSV file. There is a caveat though, it does not produce a header row. I have asked Rocket for a solution but none was forthcoming. I began writing a utility program to insert a header row but alas, sadly, I never managed to get it going sufficiently to make it a proper working utility. It only works for VERY simple AQL statements.

For D3 reports generated programmatically by the application, I have a subroutine that generates CSV records from a dynamic array. It is a generic CSV utility sub that generates CSV records by default, but you can specify what field delimiter and value delimiter to use if the standard comma and quote characters are not suitable. I append the generated CSV records into a dynamic array and send it to the network using a utility program/sub that creates a Q-Pointer to the network Share be used for the file transfers (Z:\\Temp in our case). Excel can then automatically import the CSV file and create a worksheet from it.

I must admit, I rarely use the SORTT or LISTT verbs, preferring to write report programs (which give me more freedom in selection, formatting and presentation), then generating CSV records from the report lines and finally exporting the generated item to the network.

I'm happy to share my code with you if you like to get an idea of the process or to use it in your business if needed. It's not glorious code, just gets the job done in the short space of time available to me.


------------------------------
Walter Kiess
SA Police Super
------------------------------
Thanks, Walter. I've done the same thing with PDFs, CSVs and the like from D3. I have sample code.

Vincent, before I enter those enhancement requests, I'd like your take a whether you'd be interested in the techniques that Walter has mentioned.

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------
Thanks, Walter. I've done the same thing with PDFs, CSVs and the like from D3. I have sample code.

Vincent, before I enter those enhancement requests, I'd like your take a whether you'd be interested in the techniques that Walter has mentioned.

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------
Good night, I did it a little differently, within my system I have a 2 includes to start and end printer commands
I did the following when starting the printer, I record the report in hold, and balance the ID of it, when I enter the part of closing the printer I take this ID from the hold, and I pass the small Java program I wrote, which reads the txt and the pdf output (using the itext lib). and then I send the file to the user's machine via kermit (I use accuterm).that way I kept the structure of all my reports, without needing to change any program. i have 2 projects in progress (actually paused) for creating pdfs and xlxs files directly in basic (without using third party tools), giving the option to generate more graphical reports directly in d3

------------------------------
Alberto Leal
Systems Analyst
Millano distribuidora
Campo Grande Brazil
------------------------------
Thanks, Walter. I've done the same thing with PDFs, CSVs and the like from D3. I have sample code.

Vincent, before I enter those enhancement requests, I'd like your take a whether you'd be interested in the techniques that Walter has mentioned.

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------
Brian,
I like both Walter's and Albert's approaches and would like to see more of what each does.

However, I think that a more seamless approach would be to have an "Excel" printer (much like what Cups-PDF does, but instead generate Excel files) and an associated DEVICE record.  That way PRINT @(-xxx) from basic would be consistent irrespective of which printer any particular report is sent to.

Depending on the amount of information present in the generated files, with some effort, the delivery could then be scripted.

Thanks again to both Walter and Albert.

Best regards and keep safe,

Vincent "Kim" Elliott
ITC, Bearings & Accessories Ltd.
83 Harbour Street,
Kingston, Jamaica

Tel: 876-922-1950
Fax: 876-922-8129
Cell: 876-315-2739


Brian,
I like both Walter's and Albert's approaches and would like to see more of what each does.

However, I think that a more seamless approach would be to have an "Excel" printer (much like what Cups-PDF does, but instead generate Excel files) and an associated DEVICE record.  That way PRINT @(-xxx) from basic would be consistent irrespective of which printer any particular report is sent to.

Depending on the amount of information present in the generated files, with some effort, the delivery could then be scripted.

Thanks again to both Walter and Albert.

Best regards and keep safe,

Vincent "Kim" Elliott
ITC, Bearings & Accessories Ltd.
83 Harbour Street,
Kingston, Jamaica

Tel: 876-922-1950
Fax: 876-922-8129
Cell: 876-315-2739

Hi Vincent,

I'm happy to share my approach(es). Let me know which one (or all) and I'll provide more info and source code for you (privately or via the forum).

I personally don't know anything about CUPS and since I'm retiring, don't see the need to change our system to a new method. I'll leave that up to my replacement.

------------------------------
Walter Kiess
SA Police Super
------------------------------
Brian,
I like both Walter's and Albert's approaches and would like to see more of what each does.

However, I think that a more seamless approach would be to have an "Excel" printer (much like what Cups-PDF does, but instead generate Excel files) and an associated DEVICE record.  That way PRINT @(-xxx) from basic would be consistent irrespective of which printer any particular report is sent to.

Depending on the amount of information present in the generated files, with some effort, the delivery could then be scripted.

Thanks again to both Walter and Albert.

Best regards and keep safe,

Vincent "Kim" Elliott
ITC, Bearings & Accessories Ltd.
83 Harbour Street,
Kingston, Jamaica

Tel: 876-922-1950
Fax: 876-922-8129
Cell: 876-315-2739

Hey, Vincent, when would you be available for a phone call to discuss this Excel printer / DEVICE item thing? And what phone# should I call?

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------
Hey, Vincent, when would you be available for a phone call to discuss this Excel printer / DEVICE item thing? And what phone# should I call?

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------

Brian,

It is now 1pm here.  I can be available about 3pm my time.

 

To add to the conversation, I sent a mail to Volker Behr (the author of Cups-PDF) asking if it was possible to develop such a thing.  In his final reply he suggested that what would probably be easier was to add a post-processing script to the Cups-PDF printer that would do a PDFtoText transform the result of which Excel could then pickup as a .csv file and import.

 

Best regards and keep safe,

 

Vincent "Kim" Elliott

ITC Coordinator

Bearings & Accessories Ltd.

83 Harbour Street

Kingston

Jamaica, W.I.

 

Tel: 876-922-1950

Cell: 876-315-2739

Email: vincent.e@bearingsandaccessories.com

 

 



Hey, Vincent, when would you be available for a phone call to discuss this Excel printer / DEVICE item thing? And what phone# should I call?

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------

Brian,

I forgot the phone number...it is 876-315-2739.

 

Best regards and keep safe,

 

Vincent "Kim" Elliott

ITC Coordinator

Bearings & Accessories Ltd.

83 Harbour Street

Kingston

Jamaica, W.I.

 

Tel: 876-922-1950

Cell: 876-315-2739

Email: vincent.e@bearingsandaccessories.com

 

 



Brian,

It is now 1pm here.  I can be available about 3pm my time.

 

To add to the conversation, I sent a mail to Volker Behr (the author of Cups-PDF) asking if it was possible to develop such a thing.  In his final reply he suggested that what would probably be easier was to add a post-processing script to the Cups-PDF printer that would do a PDFtoText transform the result of which Excel could then pickup as a .csv file and import.

 

Best regards and keep safe,

 

Vincent "Kim" Elliott

ITC Coordinator

Bearings & Accessories Ltd.

83 Harbour Street

Kingston

Jamaica, W.I.

 

Tel: 876-922-1950

Cell: 876-315-2739

Email: vincent.e@bearingsandaccessories.com

 

 


I'll ping you around then ( noon my time ). Ask me about Python and Excel.

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------

Brian,

I forgot the phone number...it is 876-315-2739.

 

Best regards and keep safe,

 

Vincent "Kim" Elliott

ITC Coordinator

Bearings & Accessories Ltd.

83 Harbour Street

Kingston

Jamaica, W.I.

 

Tel: 876-922-1950

Cell: 876-315-2739

Email: vincent.e@bearingsandaccessories.com

 

 


Here's the links to D3 documents, including D3 with Python:

https://www3.rocketsoftware.com/rocketd3/support/documentation/d3server.jsp

As far as that Python course we discussed, Google "automate the boring stuff with python" and the book, the PDF, the Udemy course links will all come up.

I'll take another look at LPPICK and see about passing down a file name to CUPS and get back to you.

------------------------------
Brian Cram
Senior Technical Support Engineer
Rocket Software
------------------------------