Sharing techniques

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Post Reply

Is sharing techniques something of value to you?

Poll ended at Sun Dec 19, 2010 3:54 pm

Yes, I would like to share also
2
100%
Yes, but don't expect me to share
0
No votes
Don't care
0
No votes
No don't want to share
0
No votes
 
Total votes: 2

gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Sharing techniques

Post by gtisdale »

At a meeting of the BRG board of directors today we duscussed, among other things BR, the possibility of sharing ideas, techiques and tips relating to existing features of BR as well as new features being added.

Some of this sharing might come from programs "ready to go" on a CD or thumb drive for BRG members, or simply posted here on the forum for anyone on the forum whether a member of the BRG or not.

To start this off I thought I'd share my technique for creating NWP/PDF forms that I can't steal from some existing place, like state or federal web sites. I recently picked up a payroll client in New Hampshire and will need to file New Hampshire unemployment tax returns quarterly. The on-line form is a two page landscape form that is odd sized. However the form that the department sends out for taxpayers to fill in and return is portrait and letter sized. Consequently I wanted the form.

Attached is the program that generates this form. The program by default creates the form as an NWP form using PREVIEW:/DEFAULT as the printer. To get a PDFD version simply un remark line 1140 and remark line 1142. change the file location for the saved PDF file on line 1140 to something that exists on your machine.

The program requires FNSNAP.dll that can be downloaded from the FTP site in the BRG_PUB directory as well as TT which also can be obtained from the same location. These file should be installed in a directory named "vol002" just below your starting directory (which is ofter "WB").

The purpose of the program is to show how I create forms and it makes extensive use of the functions FNPRINTNWP$ and FNPRINTBOX$. These are slightly different than the FNPRINTBOX that many of you have seen before (notice the $ in the new function name). They return a string that is then sent to the printer rather than actually sending characters and codes to the printer from the function. This methodology works much better in NWP, particularly with the ability to concantenante multiple instances of the function on the same line.

You should be able to just run the program, and then take a look at the code and logic. I hope this is helpful to you all.

FNGeorge
Attachments
wagetax.br
Program to create a New Hampshire Unemployment Quarterly return.
(33.18 KiB) Downloaded 388 times
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Post by John »

Please note - if you view this thread in the forum (this or fnGeorge's previous msg/rss) there is a one question survey if you wish to participate.

-John Bowman
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Post by Susan Smith »

Very nice demo, George! For those of you who might like to try it, and have an ancient PRINTER.SYS file (as I did), you first need to update it by adding this line to the file:

PRINTER TYPE NWP select PDF:

Before I did this, I wasn't getting the results I expected. But now it's great. I ran the demo both to PREVIEW and to PDF as George instructed and it works very nicely. It was hard to believe that all you have to do to create PDF files instead of printing to the printer was to change your open statement! I'm sure that prior presentations at the conferences mentioned this, but it wasn't really on my radar at that time and I forgot about it.

Thanks George!

-- Susan

P.S. Regarding the poll... I'd like to add another choice that says "I hope to contribute to the sharing in the future"
Post Reply