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

FoxyPreviewer - Source Not Available

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

Using VFP9sp2 on Windows 8-64

I'm getting an error "Source Not Available" and see no way of finding the underlying issue. I've recompiled both the app ans well as the FoxyPreviewer app, after first deleting all ,fxp files. The apps are on the d:\ drive with security set to "everyone has full on all".

In the debugger I see that it stops at the PreviewHelper.init event, but cannot see the code while its active.

I have an on error event and the array items are all returning "Expression could not be evaluated"...

What is the best way to debug this?

Set Procedure To '.\apps\FoxyPreviewer.App' Additive
Local loReport As "PreviewHelper" Of "FoxyPreviewer.App"
loReport = Createobject("PreviewHelper") <-----This line errors

Thanks, Stanley

 
Hi tbleken,

I was using the referred documentation to implement this. What do you see that indicates to you that I'm trying to do it the wrong way?

And, what part of the documentation should I be looking at? I'm heading off to there to look at it all...

Thanks,
Stanley
 
No way you have read any of the documentation I directed you to. You must have looked at another, old and outdated document. For instance, there's no reference to createobject() at all in the updated document, since the new design is totally different from the older version.

I suggest that you take the time to read the whole documentation, it will save you time in the long run. From page 14 and the next few pages you will find what you need to get started.
 
OK,

I've changed it to the new way of just using "Do FoxyPreviewer.App" as in...
Set REPORTBEHAVIOR 90
Do FoxyPreviewer.App
*Set Procedure To '.\apps\FoxyPreviewer.App' Additive
Local loReport As "PreviewHelper" Of "FoxyPreviewer.App"
loReport = Createobject("PreviewHelper")

With loReport As ReportHelper
*.AddReport("receipt", "NODIALOG For Transactions.trans_id = gnInvNum")
.AddReport("receipt", " For Transactions.trans_id = gnInvNum")
.cTitle='PDF Receipt Creation'
.cPrintJobName='Print Spooler Name'

So far I have not seen where I can set values to properties such as .cTitle and .cPrintJobName using this new way, unless I'm on the right track, but I doubt it because you just mentioned that CreateObject is not used in the new implementation.

Thanks for any other pointers, and in the mean time, back to the docs...
Stanley

 
Ok,

Page 17 in the pdf doc is showing how...

Thanks,
Stanley
 
OK, explain this,

On page 16, "Exporting without using the Report Preview"
Why do I have to use the configuration below when there are properties that should control that, such as _Screen.oFoxyPreviewer.cDestFile for the "to file" part and _Screen.oFoxyPreviewer.lDirectPrint for the "PREVIEW - Load output into default app" part.

REPORT FORM 'receipt' OBJECT TYPE 10 TO FILE "c:\TestReport.Pdf" PREVIEW

Thanks,
Stanley


 
Hi,

I'm making progress, however I keep getting this "Source Not Available" when running any of this different versions of code. The difference is & vs ().

Report Form 'receipt' For Transactions.trans_id = gnInvNum Object Type 10 To FILE (lcDestFile) Preview

Report Form 'receipt' For Transactions.trans_id = gnInvNum Object Type 10 To FILE &lcDestFile Preview

If I ignore the error, it works as expected. If the "Source Not Available" issue is solved, then......

Thanks,
Stanley


 
Read the doc before you break even more! You are doing it the wrong way, for instance you should NOT have any createobject lines in your code to work with FoxyPreviewer, every object is not "attached" to _screen, namely _screen.foxypreviewerorigoutput, _screen.foxypreviewerorigpreview and _screen.foxypreviewerorigreportbehavior. So the error you get is a result of calling something that isn't there anymore. Yes, it may have been there before, but now it's removed since the whole project has been rewritten.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top