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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Foxpro HTML report listener: how to get rid of messages 1

Status
Not open for further replies.

clmcgrath

Programmer
Mar 5, 2011
5
US
I am trying to use the HTML report listener within one of my forms. It works great except it keeps displaying listener messages. Any idea how to get rid of those? I thought using quietmode = .T. would work. No such luck.

Here is my code:

cfile = ALLTRIM(mfiled)+"\"+ALLTRIM(hrpt) +'-'+dtos(DATE())+ ".HTML"
ox = .NULL.
do (_reportoutput) with 5, ox
ox.TargetFileName = cfile
ox.QuietMode = .T.
ox.ListenerType = 5
REPORT FORM (hrpt) OBJECT ox

When the Report form command runs, it generated my html file perfectly but also displays the following messages on my form.

.T.
.NULL.
GFXNORENDER
LISTENER.VCX
LISTENER.VCX
LISTENER.VCX
End of Locate scope.
.F.
.T.
.T.
.NULL.

I have searched the internet and VFP help files and can't find anything on this topic. Anybody know how to suppress these messages?

Thanks for the help.
 
Okay dan,

But we can even put the cursor in the line to move:

Code:
EditSource(HOME()+'FFC\_reportlistener.vcx',9,'fxListener','LoadReport')

Bye, Olaf.
 
Heh,

If we're totally going to make it easy, we could use WriteMethod() and do the whole deed. Some things *are* best left as an exercise for the reader. ;-)

Dan
 
Dan, ;)

Sorry, clmcgrath. We're making a little fun of you.

For a programmer it should not be "too technical" to move one line of code before one other line. So I think you was lost in this description to solve the bug in some way. It still makes me wonder why, though.

Supressing output is something I suggested and this is finefor this one case. If you set _screen.Allowoutput = .f. you won't need to also hide it, but that also suggests no output at all by ? or other commands writing on the _screen or any forms canvas. And this is normally the case in my apps. Others might have other needs.

So Dan is right: This is best be fixed at the root. I pointed you towards VFPX in my first answer, saying "This may already be ammended in the newer VFPX version". Now that it's weekend and I have some time, I downloaded the FFC classes frmo there and the LoadReport Method still looks the same. Maybe they fixed it another way by removing any TALK ON. I'll have a look into that and see if there still needs to be a fix in the VFPX version.

The fact remaining is, this is a bug of the FFC reportlisteners and should be fixed.

Bye, Olaf.

 
Ok, here is my findings:

1. As I already said the VFPX fxlistener class does not differ from the SP2 version of Foxpro in LoadReport().

2. I first checked, if the unmodified versions of both the SP2 fxlistner and the VFPX fxlistener create any output on the screen. And they did not to me, even if explicitly SET TALK ON before running a report. This means I couldn't reproduce your problem.

3. As you do use _reportoutput, I opened the reportoutput project (MODIFY PROJECT Home()+"tools\xsource\vfpsource\reportoutput\reportoutput.pjx")
and - surprise there is no fxlistener class in there.

So from that point of view the bug in the fxlistener class has nothing to do with the output to the form/screen, as that is not included in the reportoutput.app.

The reportoutput.app has a totally different set of listener classes in the projects listener.vcx library. It's not based on the ffc reportlisteners. So the problem must be somewhere else.

Judging from the output it still does not look like a problem in your report, but somewhere within the reportoutput.app sources. It's hard to find the problem without a repro of the error, though.

I suggest you try to create a repro report with data from the sample database Home()+"Samples\Northwind\Northwind.dbc" and attach this to a new post here, so we can debug it.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top