This topic is locked

Mailing labels

3/10/2011 4:22:43 PM
PHPRunner General questions
bbarker author

I read all of the old postings about mailing labels.
Does anyone have a sample solution that they could post here? Or maybe an overview of instructions?
I'd like to:

  1. select a range of records, then
  2. format into two columns (Avery 5962 (14 labels with 2 rows of 7) and
  3. print.
    Trying to stay simple.

Sergey Kornilov admin 3/10/2011

Microsoft Word with MailMerge is still the best option.

bbarker author 3/10/2011



Microsoft Word with MailMerge is still the best option.


Shoot... I was hoping that you weren't going to say that. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=56984&image=1&table=forumreplies' class='bbc_emoticon' alt=':huh:' />
So are the steps to

  1. create a report?
  2. allow export to xls
  3. import using Word
    It seems that page breaks and other formatting things mess up the export output from most PHPR reports...
    NEW INPUT:

    I just tried it and it appears easier to just export directly to WORD.
    Now - last quesiton- what's the best way to do this while excluding the formatting and page breaks?

Sergey Kornilov admin 3/10/2011

You don't need to do anything with PHPRunner in order to use Word's Mailmerge. Mailmerge is able to connect directly to most databases: MS Access, Excel or any ODBC-enabled database.
Good Mail Merge tutorial can be found here:

http://mistupid.com/technical/mailmerge/
This process doesn't involve PHPRunner at all.

bbarker author 3/10/2011

Okay, I'll give that a try.
First impressions are:
-- The referenced website is pretty weak, (I'll try to find a better one),

-- Word 7 doesn't use the term MySQL, so their instructions are challenging,

-- I'm concerned about my Database users having to know the server connection information
I'll continue to experiment with this solution and will report back here.
Thanks Sergey.

Sergey Kornilov admin 3/11/2011

Bill,
I didn't realize that were for your users.
The best approach your users can use is to export data to Excel using built-in PHPRunner export and then follow instructions you need to write use this Excel file as a source for Word Mail Merge.

bbarker author 3/11/2011

Thanks... I realized that I wasn't clear after I began my search. Whether the end-user prints the labels, or a trusted database editor does it, makes a big difference.
WORD: I got this to work, but as you noted, then I need to modify the users PC - add MySQL ODBC, add ID/PW for the database, configure the lable template, etc.... <<probably not something that I want to do to a couple of their PC's.
FPDF: This shows some promise... <<more later.

bbarker author 3/13/2011

I have FPDF working now inside PHP Runner...Hooray. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57024&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />
But I need to figure out how to use the variables from the SELECT functions on the standard pages. Rather than re-create a sorting or selection function, it would be great to just use the existing (standard) one. Once I get this figured out, I'll post ALL OF THE CODE!!!!
So, my question is: If I select records numbered 500 to 550 (VendorID), what variable can I use in the query?
EXAMPLE:
$sql = "SELECT * FROM tblvendors WHERE VendorID > $nnn and < $NNN";
Where the $nnn and $NNN would come from the SEARCH BETWEEN function.