Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Form: How to show a complete page as the last page 4

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB
Hi

I have a question about the creation of a report form:

[ul]
[li]A report form has been created (myreport.frx)[/li]
[li]In the TITLE band are label and fields which only appear on page 1 of the report - Thats ok and what I need[/li]
[li]The PAGE HEADER band also contains label and fields which appear on subsequent pages which are > 1 - That's also what I need[/li]
[li]In the DETAILS band is a couple of fields, one of which is memo field (set to stretch as appropriate) which appear on all pages - Thats ok too[/li]
[li]The PAGE FOOTER band also contains a couple of labels and fields which appear on every page as you would expect[/li]
[/ul]

Now, what I can't figure out is how to add text and fields from a full page that I want to show as a last page. So what I mean by this is:

My report prints out correctly, showing title band, page headers (if more than one page), the details from the memos fields in the details band and the page footer information.

I have a full page of certain fields and text which are from the Parent table that are fixed and I want these to be part of the complete report. I can run the reports I have created independently such as:

Code:
REPORT FORM myreport PREVIEW FOR (Condition etc)
REPORT FORM mylastpage PREVIEW FOR (Condition etc)

but ideally I would want these to be one entity instead of two.

Causing two REPORT FORM statements is ok if you just want to "Straight forward" print out documents and thats fine but I want to save the report in certain formats and I have found foxypreviewer which works an absolute treat and converts the reports into pdf's, rtf's with ease.

So with this in mind, how can I add that last page to my report?

I have tried adding additional DETAIL bands, using a GROUP FOOTER band but when you extend these, the report is extended, loses it format amongst other things. I also tried using the SUMMARY band and whilst this does show after the last line of data shown in the DETAIL band, it is usually halfway up the page and again, causing havoc with the layout and does not show the full page of my last page.

As always some guidance would be very much appreciated.

Thank you


Lee
 
A quick question on this type of document creation:

I am sure this is a Microsoft Word issue as Google has turned up some answers in relation to it but I'm going to ask anyway.

When you create an .RTF (Rich Text Format) file from a VFP9 report (using foxypreviewer), the layout is perfect with no complaints.

However, when you try and spell check it (albeit the paragraphs etc are contained in text boxes) the following MS Word messagebox pops us:

Cannot find the proofing tools for Russaian. Check your office Language preferences to see if the required proofing tools are installed.

So with that in mind, yes, you can change the settings, yes you can download the language pack etc but thats not good if you have to ask a couple of hundred people to do that on their computers!

My question here is, does anyone know of any characters that may cause the above messagebox to appear?

My completed RTF document contains only text and lines, there are no special characters added to the report and the text is a mixture of Arial and Times New Roman.

I am using VFP9 with SP2, Microsoft Office 2010 and Windows 7

Thanks again


Lee
 
Lee,

Have you tried programmatically setting the language to, say, English. Something along these lines:

Code:
* Assume loDoc is an object ref to the document
loRange = odoc.Range(0, odoc.Characters.Count)
loRange.LanguageID = 2057  && (UK English; use 1033 for US English)
loRange.CheckLanguage = .F.

I haven't tested that, and I can't be sure that it will solve the problem, but it might be worth a few minutes of experimenting.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Good morning Mike

I'll give you suggestion a try and post back.

Many thanks


Lee
 
Mike

Having looked at your suggestion, I am sure this would work if I were creating an actual .doc type file.

The problem (well not so much a problem because I am happy with the end result using foxyprevier) is that the actual document created is a .rtf type file.

I have checked the help with foxyp and it makes no reference to this issue.

Perhaps a quick email asking them if they know of this issue and any way to resolve it.

Onwards and upwards I say!

Thank you

Lee
 
Lee,

But Word Automation works just the same with RTF files as it does with DOC files.

You said you were using Word to do the spell-checking. Presumably, it was the RTF you were checking. If you can spell-check an RTF file, you should be able to set its language.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike

I fully agree with you but this is a slightly different set up.

If I were to create a word type doc using something like this:

Code:
oWord = CREATEOBJECT('word.application')

etc
etc

loWord.quit
release loWord

then I'm sure what you suggested would work.

But with that app I'm using (don't want to mention it again for fear of advertising it!) it's a different command line:

Code:
REPORT FORM MYDOC OBJECT TYPE 12 TO FILE "leedoc.rtf" PREVIEW FOR LINK=mlink

I'm sure you are already aware but after the above is issued, word opens automatically and you can either save the document as is or rename it something else. When the document is open before you save it and you hit the spellcheck, thats when the messagebox appears.

Does that explain it a bit clearer Mike (my apologies)?

Lee

 
Lee,

No need to apologise.I should have re-read the earlier part of the thread.

So you are using FoxyPreviewer to create the RTF. Presumably Foxy is using a custom report listener. I can see why you can't use Word automation to control the settings.

You say you will check with the Foxy folk. That sounds like a good plan.

But, tell me, does it do the spell check by default? Do you need to do it? I don't see why it's necessary (or desirable) to spell check an automated report.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike

It doesn't spellcheck by default but when I asked three people to try out this app, the first thing I was asked was, "why does it tell me .... " and you know the messagebox that opens as above!

I am trying to avoid that so I will wait and see what replies I get.

Thanks for your contributions Mike

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top