Index
2019-05-15 14:05MB Software Solutions, LLC : How would you generate this report?
2019-05-15 15:46Kevin Cully : Re: How would you generate this report?
2019-05-15 15:48MB Software Solutions, LLC : Re: How would you generate this report?
2019-05-15 15:54Frank Cazabon : Re: How would you generate this report?
2019-05-15 16:04MB Software Solutions, LLC : Re: How would you generate this report?
2019-05-15 16:11Frank Cazabon : Re: How would you generate this report?
2019-05-15 17:57Frank Cazabon : Re: How would you generate this report?
Back to top
How would you generate this report?

Author: MB Software Solutions, LLC

Posted: 2019-05-15 14:05:25   Link

Screenshot of Word document in question (with notations for where

content is dynamic; some parts blurred just to protect the players): 

https://www.screencast.com/t/vOJd9eBwPaX

Currently, my colleague did so many of these documents MANUALLY in

Word.  I'd pull my hair out if I had to do that, especially since I've

got VFP.  The trick here is to dynamically enter the names for each

letter to an organization.  Each organization can have 1:M names in this

report.

The quick thought is a VFP FRX Report, using XFRX (or something else) to

save the output to a Word document.  And given that the text above the

dynamic organization name and user names/emails part is static, I could

do it.  But like you've probably encountered before, I don't like to

force the Line-breaks in the VFP Report Writer if I can avoid it (PITA).

So how would you produce these dynamic Word documents easily?

Flattened cursor for this would have this structure:

* OrgName

* OrgID (e.g., P0135)

* Name

* Email

* AcctType

That's it.  User would select the Yes/No values and return to us.  Task

here is generated these 100 reports without having to manually do it

(and obviously avoid the human error factor).

tia,

--Mike

---

This email has been checked for viruses by Avast antivirus software.

https://www.avast.com/antivirus

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: https://leafe.com/archives

This message: https://leafe.com/archives/byMID/5e9413df-b3db-21ed-3392-848e4bf27cce@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2019 MB Software Solutions, LLC
Back to top
Re: How would you generate this report?

Author: Kevin Cully

Posted: 2019-05-15 15:46:08   Link

I've been creating my "reports" in HTML lately as a flexible, wicked

fast way of producing output.  With CSS you have great control over

looks and layout.  Images, no problem.  Links, no problem.  Content

wrapping, no problem.  Page breaks, no problem. The only issue is full

control over headers and footers ... to an extent.  It's what I use to

create invoices with.

$0.02.

-Kevin

On 05/15/2019 03:05 PM, MB Software Solutions, LLC wrote:

> Screenshot of Word document in question (with notations for where

> content is dynamic; some parts blurred just to protect the players):

> https://www.screencast.com/t/vOJd9eBwPaX

>

> Currently, my colleague did so many of these documents MANUALLY in

> Word.  I'd pull my hair out if I had to do that, especially since I've

> got VFP.  The trick here is to dynamically enter the names for each

> letter to an organization.  Each organization can have 1:M names in

> this report.

>

> The quick thought is a VFP FRX Report, using XFRX (or something else)

> to save the output to a Word document.  And given that the text above

> the dynamic organization name and user names/emails part is static, I

> could do it.  But like you've probably encountered before, I don't

> like to force the Line-breaks in the VFP Report Writer if I can avoid

> it (PITA).

>

> So how would you produce these dynamic Word documents easily?

>

> Flattened cursor for this would have this structure:

>

>  * OrgName

>  * OrgID (e.g., P0135)

>  * Name

>  * Email

>  * AcctType

>

> That's it.  User would select the Yes/No values and return to us. Task

> here is generated these 100 reports without having to manually do it

> (and obviously avoid the human error factor).

>

> tia,

> --Mike

>

>

>

>

> ---

> This email has been checked for viruses by Avast antivirus software.

> https://www.avast.com/antivirus

>

>

> --- StripMime Report -- processed MIME parts ---

> multipart/alternative

>  text/plain (text body -- kept)

>  text/html

> ---

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: https://leafe.com/archives

This message: https://leafe.com/archives/byMID/f027d962-b360-0ed4-8e6d-ebc282d120f4@cully.biz

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2019 Kevin Cully
Back to top
Re: How would you generate this report?

Author: MB Software Solutions, LLC

Posted: 2019-05-15 15:48:16   Link

Thanks for the 2 cents, Kevin!

Still wanting to output these to Word documents though for end-user

familiarity.  We email these documents to 100 organizations currently. 

Better design would be some sort of integration into our website but

that's Version .Next.

On 5/15/2019 4:46 PM, Kevin Cully wrote:

> I've been creating my "reports" in HTML lately as a flexible, wicked

> fast way of producing output.  With CSS you have great control over

> looks and layout.  Images, no problem.  Links, no problem. Content

> wrapping, no problem.  Page breaks, no problem. The only issue is full

> control over headers and footers ... to an extent. It's what I use to

> create invoices with.

>

> $0.02.

>

> -Kevin

>

>

>

> On 05/15/2019 03:05 PM, MB Software Solutions, LLC wrote:

>> Screenshot of Word document in question (with notations for where

>> content is dynamic; some parts blurred just to protect the players):

>> https://www.screencast.com/t/vOJd9eBwPaX

>>

>> Currently, my colleague did so many of these documents MANUALLY in

>> Word.  I'd pull my hair out if I had to do that, especially since

>> I've got VFP.  The trick here is to dynamically enter the names for

>> each letter to an organization.  Each organization can have 1:M names

>> in this report.

>>

>> The quick thought is a VFP FRX Report, using XFRX (or something else)

>> to save the output to a Word document.  And given that the text above

>> the dynamic organization name and user names/emails part is static, I

>> could do it.  But like you've probably encountered before, I don't

>> like to force the Line-breaks in the VFP Report Writer if I can avoid

>> it (PITA).

>>

>> So how would you produce these dynamic Word documents easily?

>>

>> Flattened cursor for this would have this structure:

>>

>>  * OrgName

>>  * OrgID (e.g., P0135)

>>  * Name

>>  * Email

>>  * AcctType

>>

>> That's it.  User would select the Yes/No values and return to us.

>> Task here is generated these 100 reports without having to manually

>> do it (and obviously avoid the human error factor).

>>

>> tia,

>> --Mike

>>

>>

>>

>>

>> ---

>> This email has been checked for viruses by Avast antivirus software.

>> https://www.avast.com/antivirus

>>

>>

>> --- StripMime Report -- processed MIME parts ---

>> multipart/alternative

>>  text/plain (text body -- kept)

>>  text/html

>> ---

>>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: https://leafe.com/archives

This message: https://leafe.com/archives/byMID/9330e9cb-05b0-1c09-ff5e-1a1ebdc559a6@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2019 MB Software Solutions, LLC
Back to top
Re: How would you generate this report?

Author: Frank Cazabon

Posted: 2019-05-15 15:54:48   Link

I do stuff like that using Bookmarks in a Word template and automating

their replacement.

Frank.

Frank Cazabon

On 15/05/2019 03:05 PM, MB Software Solutions, LLC wrote:

> Screenshot of Word document in question (with notations for where

> content is dynamic; some parts blurred just to protect the players):

> https://www.screencast.com/t/vOJd9eBwPaX

>

> Currently, my colleague did so many of these documents MANUALLY in

> Word.  I'd pull my hair out if I had to do that, especially since I've

> got VFP.  The trick here is to dynamically enter the names for each

> letter to an organization.  Each organization can have 1:M names in

> this report.

>

> The quick thought is a VFP FRX Report, using XFRX (or something else)

> to save the output to a Word document.  And given that the text above

> the dynamic organization name and user names/emails part is static, I

> could do it.  But like you've probably encountered before, I don't

> like to force the Line-breaks in the VFP Report Writer if I can avoid

> it (PITA).

>

> So how would you produce these dynamic Word documents easily?

>

> Flattened cursor for this would have this structure:

>

>  * OrgName

>  * OrgID (e.g., P0135)

>  * Name

>  * Email

>  * AcctType

>

> That's it.  User would select the Yes/No values and return to us. Task

> here is generated these 100 reports without having to manually do it

> (and obviously avoid the human error factor).

>

> tia,

> --Mike

>

>

>

>

> ---

> This email has been checked for viruses by Avast antivirus software.

> https://www.avast.com/antivirus

>

>

> --- StripMime Report -- processed MIME parts ---

> multipart/alternative

>  text/plain (text body -- kept)

>  text/html

> ---

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: https://leafe.com/archives

This message: https://leafe.com/archives/byMID/2ce1f0c6-569e-e0c5-ff9f-41059622122d@gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2019 Frank Cazabon
Back to top
Re: How would you generate this report?

Author: MB Software Solutions, LLC

Posted: 2019-05-15 16:04:06   Link

How do you dynamically add the rows?  Via Office Automation code?  If

so, care to share?

On 5/15/2019 4:54 PM, Frank Cazabon wrote:

> I do stuff like that using Bookmarks in a Word template and automating

> their replacement.

>

> Frank.

>

> Frank Cazabon

>

> On 15/05/2019 03:05 PM, MB Software Solutions, LLC wrote:

>> Screenshot of Word document in question (with notations for where

>> content is dynamic; some parts blurred just to protect the players):

>> https://www.screencast.com/t/vOJd9eBwPaX

>>

>> Currently, my colleague did so many of these documents MANUALLY in

>> Word.  I'd pull my hair out if I had to do that, especially since

>> I've got VFP.  The trick here is to dynamically enter the names for

>> each letter to an organization.  Each organization can have 1:M names

>> in this report.

>>

>> The quick thought is a VFP FRX Report, using XFRX (or something else)

>> to save the output to a Word document.  And given that the text above

>> the dynamic organization name and user names/emails part is static, I

>> could do it.  But like you've probably encountered before, I don't

>> like to force the Line-breaks in the VFP Report Writer if I can avoid

>> it (PITA).

>>

>> So how would you produce these dynamic Word documents easily?

>>

>> Flattened cursor for this would have this structure:

>>

>>  * OrgName

>>  * OrgID (e.g., P0135)

>>  * Name

>>  * Email

>>  * AcctType

>>

>> That's it.  User would select the Yes/No values and return to us.

>> Task here is generated these 100 reports without having to manually

>> do it (and obviously avoid the human error factor).

>>

>> tia,

>> --Mike

>>

>>

>>

>>

>> ---

>> This email has been checked for viruses by Avast antivirus software.

>> https://www.avast.com/antivirus

>>

>>

>> --- StripMime Report -- processed MIME parts ---

>> multipart/alternative

>>  text/plain (text body -- kept)

>>  text/html

>> ---

>>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: https://leafe.com/archives

This message: https://leafe.com/archives/byMID/c80d9bd1-700f-80a2-b835-6c9bde04527c@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2019 MB Software Solutions, LLC
Back to top
Re: How would you generate this report?

Author: Frank Cazabon

Posted: 2019-05-15 16:11:35   Link

I'll have to look up the code but it's basically add a table with a row and columns and then add a row as needed. I may not get a chance to find it until tomorrow but Google should be able to give you the code

On 15 May 2019 17:04:06 GMT-04:00, "MB Software Solutions, LLC" <mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:

>How do you dynamically add the rows?  Via Office Automation code?  If

>so, care to share?

>

>

>On 5/15/2019 4:54 PM, Frank Cazabon wrote:

>> I do stuff like that using Bookmarks in a Word template and

>automating

>> their replacement.

>>

>> Frank.

>>

>> Frank Cazabon

>>

>> On 15/05/2019 03:05 PM, MB Software Solutions, LLC wrote:

>>> Screenshot of Word document in question (with notations for where

>>> content is dynamic; some parts blurred just to protect the players):

>

>>> https://www.screencast.com/t/vOJd9eBwPaX

>>>

>>> Currently, my colleague did so many of these documents MANUALLY in

>>> Word.  I'd pull my hair out if I had to do that, especially since

>>> I've got VFP.  The trick here is to dynamically enter the names for

>>> each letter to an organization.  Each organization can have 1:M

>names

>>> in this report.

>>>

>>> The quick thought is a VFP FRX Report, using XFRX (or something

>else)

>>> to save the output to a Word document.  And given that the text

>above

>>> the dynamic organization name and user names/emails part is static,

>I

>>> could do it.  But like you've probably encountered before, I don't

>>> like to force the Line-breaks in the VFP Report Writer if I can

>avoid

>>> it (PITA).

>>>

>>> So how would you produce these dynamic Word documents easily?

>>>

>>> Flattened cursor for this would have this structure:

>>>

>>>  * OrgName

>>>  * OrgID (e.g., P0135)

>>>  * Name

>>>  * Email

>>>  * AcctType

>>>

>>> That's it.  User would select the Yes/No values and return to us.

>>> Task here is generated these 100 reports without having to manually

>>> do it (and obviously avoid the human error factor).

>>>

>>> tia,

>>> --Mike

>>>

>>>

>>>

>>>

>>> ---

>>> This email has been checked for viruses by Avast antivirus software.

>>> https://www.avast.com/antivirus

>>>

>>>

>>> --- StripMime Report -- processed MIME parts ---

>>> multipart/alternative

>>>  text/plain (text body -- kept)

>>>  text/html

>>> ---

>>>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: https://leafe.com/archives

This message: https://leafe.com/archives/byMID/E75A0171-1878-4BC1-852A-8FB991CA9B83@gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2019 Frank Cazabon
Back to top
Re: How would you generate this report?

Author: Frank Cazabon

Posted: 2019-05-15 17:57:40   Link

LOCAL loWord AS WORD.APPLICATION

LOCAL loDoc AS WORD.DOCUMENT

loWord = CREATEOBJECT("Word.Application")

    loWord.Documents.ADD(oAppInfo.GroupPlanTemplate)    &&("GroupPlan.dot")

    m.loDoc = m.loWord.ActiveDocument

*   Retrieve the number of bookmarks defined in DOC

    m.lnCountMarks = m.loDoc.Bookmarks.COUNT

*   Store bookmarks in an array

    DIMENSION laMark[m.lnCountMarks]

    FOR lnCount = 1 TO m.lnCountMarks

        laMark[lnCount] = m.loDoc.Bookmarks(lnCount).NAME

    ENDFOR

*   Loop through all the bookmarks in the document

    FOR lnCount = 1 TO m.lnCountMarks

        m.lcMarkName = UPPER(laMark[lnCount])

        WITH m.loDoc.Bookmarks(m.lcMarkName).RANGE

            DO CASE

            * Claims expense breakdown

            CASE m.lcMarkName == UPPER("ClaimsExpense")

                oRange = m.loDoc.Bookmarks(m.lcMarkName).RANGE

                oTable = m.loDoc.Tables.Add( oRange, 1, 2)

                oTable.BORDERS.InsideLineStyle = .F.

                oTable.BORDERS.OutsideLineStyle = .F.

                oTable.Cell[1,1].Range.Font.Bold = .T.

                oTable.Cell[1,1].RANGE.InsertAfter("Expense Type")

                oTable.Cell[1,1].RANGE.ParagraphFormat.ALIGNMENT = wdAlignParagraphLeft

                oTable.Cell[1,2].Range.Font.Bold = .T.

                oTable.Cell[1,2].RANGE.InsertAfter("Total Expense")

                oTable.Cell[1,2].RANGE.ParagraphFormat.ALIGNMENT = wdAlignParagraphLeft

                m.lnRow = 1

                m.lnTotalExpense = 0

                SELECT c_ExpenseBreakdown

                SCAN

                    oTable.ROWS.ADD()

                    m.lnRow = m.lnRow + 1

                    oTable.Cell[m.lnRow,1].Range.Font.Bold = .F.

                    oTable.Cell[m.lnRow,1].RANGE.InsertAfter(c_ExpenseBreakdown.typ_name)

                    oTable.Cell[m.lnRow,2].Range.Font.Bold = .F.

                    oTable.Cell[m.lnRow,2].RANGE.InsertAfter(ALLTRIM(TRANSFORM(NVL(c_ExpenseBreakdown.ExpenseAmount, 0), "@R $$$,$$$,$$9.99")))

                    m.lnTotalExpense = m.lnTotalExpense + NVL(c_ExpenseBreakdown.ExpenseAmount, 0)

                ENDSCAN

                oTable.ROWS.ADD()

                m.lnRow = m.lnRow + 1

                oTable.Cell[m.lnRow,1].Range.Font.Bold = .T.

                oTable.Cell[m.lnRow,1].RANGE.InsertAfter("TOTAL")

                oTable.Cell[m.lnRow,2].Range.Font.Bold = .T.

                oTable.Cell[m.lnRow,2].RANGE.InsertAfter(ALLTRIM(TRANSFORM(NVL(m.lnTotalExpense, 0), "@R $,$$$,$$9.99")))

            ENDCASE

        ENDWITH

    ENDFOR

Frank.

Frank Cazabon

On 15/05/2019 05:04 PM, MB Software Solutions, LLC wrote:

> How do you dynamically add the rows?  Via Office Automation code?  If

> so, care to share?

>

>

> On 5/15/2019 4:54 PM, Frank Cazabon wrote:

>> I do stuff like that using Bookmarks in a Word template and

>> automating their replacement.

>>

>> Frank.

>>

>> Frank Cazabon

>>

>> On 15/05/2019 03:05 PM, MB Software Solutions, LLC wrote:

>>> Screenshot of Word document in question (with notations for where

>>> content is dynamic; some parts blurred just to protect the players):

>>> https://www.screencast.com/t/vOJd9eBwPaX

>>>

>>> Currently, my colleague did so many of these documents MANUALLY in

>>> Word.  I'd pull my hair out if I had to do that, especially since

>>> I've got VFP.  The trick here is to dynamically enter the names for

>>> each letter to an organization.  Each organization can have 1:M

>>> names in this report.

>>>

>>> The quick thought is a VFP FRX Report, using XFRX (or something

>>> else) to save the output to a Word document.  And given that the

>>> text above the dynamic organization name and user names/emails part

>>> is static, I could do it.  But like you've probably encountered

>>> before, I don't like to force the Line-breaks in the VFP Report

>>> Writer if I can avoid it (PITA).

>>>

>>> So how would you produce these dynamic Word documents easily?

>>>

>>> Flattened cursor for this would have this structure:

>>>

>>>  * OrgName

>>>  * OrgID (e.g., P0135)

>>>  * Name

>>>  * Email

>>>  * AcctType

>>>

>>> That's it.  User would select the Yes/No values and return to us.

>>> Task here is generated these 100 reports without having to manually

>>> do it (and obviously avoid the human error factor).

>>>

>>> tia,

>>> --Mike

>>>

>>>

>>>

>>>

>>> ---

>>> This email has been checked for viruses by Avast antivirus software.

>>> https://www.avast.com/antivirus

>>>

>>>

>>> --- StripMime Report -- processed MIME parts ---

>>> multipart/alternative

>>>  text/plain (text body -- kept)

>>>  text/html

>>> ---

>>>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: https://leafe.com/archives

This message: https://leafe.com/archives/byMID/e9f36cc0-6b57-9a3e-ddf1-0afcf62dc582@gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2019 Frank Cazabon