×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

FoxyPreviewer: Error when exporting to PDF, HTML, etc.

FoxyPreviewer: Error when exporting to PDF, HTML, etc.

FoxyPreviewer: Error when exporting to PDF, HTML, etc.

(OP)
I am trying to use the "tagged formatting" feature in FoxyPreviewer. According to the docs, this allows you to apply some basic formatting (like bold and italic) to individual parts of a field. To do this, you place <TF> in the field's user data, then surround the relevant text with HTML tags (like <i> ... </i>).

This works perfectly. The formatting shows up correctly in the report.

However, when I try to export the report, I see this error message:

Quote:

Error creating report data. The output will not be rendered correctly.

After clicking OK, the Debugger opens. If I then click Resume (in the Debugger) the export continues normally. And (as far as I can see), the output is completely correct. This happens when exporting to PDF, HTML and RTF (I haven't tried other formats).

I can see the offending code in the Debugger's Trace window. It consists of a MessageBox() followed by SET STEP ON.

I can live with this when I run my app for my own use. But I will eventually want to distribute it as an EXE. In that case, the SET STEP ON will ignored. But I won't want the message to come up.

Two questions:

- Has anyone seen this before?

- Any suggestions for how I might fix it.

Thanks in advance for any help.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

Hi Mike,

I found thia code to give a bit more context:

CODE

SELECT OA.*, ; && OA = Output Alias
			TempFrx.* ;
				FROM (This.cOutputAlias) OA ;
				JOIN TempFrx ON OA.FrxRecno = TempFrx.nRecno ;
				WHERE FRXINDEX = m.n ;
				ORDER BY Page ;
				INTO CURSOR (m.laTempData(m.n)) READWRITE


		IF _TALLY = 0
			MESSAGEBOX("Error creating report data. The output will not be rendered correctly.", 16, "Error")
			SET STEP ON 
		ENDIF 
		USE IN SELECT("TempFRX") 

I don't see this being triggered by usage of formatting, but when the report has no output data (i.e. when _TALLY=0, because the query has no result records). Can you debug this and see what data is queried here, especially whether the cOutputAlias is sensible at this stage?

Chriss

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

(OP)
Thanks for your help with this, Chris. I'll delve a bit further.

Also, when I started this thread, I couldn't find the FP source code, but I then went back to the original download, and found the source there. So I could simply remove the error message and re-compile the APP, but I'm reluctant to do that in case it causes unknown side effects.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

Hi Mike,

Do you have latest version v299z41?

IMHO, Cesar fixed a few bugs with <TF> in FP 3.0.

mJindrova

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

Quote (Mike)

I'm reluctant to do that in case it causes unknown side effects.

I wouldn't be afraid of this. But the source code points out the problem is indeed 0 records in the report workarea, not <TF> formatting. So you should investigate the source of the problem more than the FP source code. Then, likely, you don't need to change anxthing, just before you report check you have records to report and you avoid the situation anyway.

Chriss

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

(OP)
Martina,

Yes, I have version v299z41. I didn't see this listed in the bug fixes for 3.0, although I might have missed that. I am reluctant to spend money on 3.0 if it doesn't solve the problem, but I'll probably go ahead and do that anyway.

In any case, I'll email Cesar - not necessarily to expect him to fix it, but he mig0ht find the information useful.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

(OP)
Chris,

Yes, I can see that there is an intermediate cursor that has zero records, and I can see where this might be going wrong. But it's going to take a bit more work to see how to fix it.

It's definitely not the case that my report has zero records. I've often used FP in those circumstances, and it never produces an error; it simply declines to run.

I think that, for now, I will just comment out the MESSAGEBOX() and the SET STEP. And I'll check carefully that the report is still 100% correct.

For the benefit of anyone else faced with this problem, the code in question is around line 89 in the GetFullFRXData method of the DBListener class. This is for FP version v299z41. I'll also report it to Cesar.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

Mike,

IMHO, cursor (This.aFRXTables(m.n)) has not data for <TF>. This cursor fill TFAddToOutput method in FoxyListener class.

mJindrova

RE: FoxyPreviewer: Error when exporting to PDF, HTML, etc.

I have the source for v3.152 and I found the above code referenced in two different class methods (both have the same method name) - class dbflistener and pr_htmllistener15. Both of these SQL SELECTs are in a FOR loop which creates multiple cursors based on the number of alias in use. So, the error that you are experiencing may also be in the current code base of V3.xxx. See screen shots below of code:



Greg

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close