Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Cesar
  Where is Cesar?
 
 Brazil
 Cesar
 Tags
Subject: FoxyPreviewer.APP usage
Thread ID: 254671 Message ID: 254671 # Views: 148 # Ratings: 5
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Thursday, February 25, 2010 6:01:40 PM         
   


FoxyPreviewer consists of a collection of classes, libraries and images, that allow you to export your reports into several output types, PDF, RTF, basic XLS and Images, with a modern and more powerful set of tools in the preview toolbar.
http://weblogs.foxite.com/vfpimaging/archive/2010/02/21/10127.aspx

Some people have been asking about how to distribute the files, etc...

My first recommendation is to include all classes, VCX/VCT, images, the header files (*.H), and the file FoxyPreviewer.Prg in your Project, and compile. That's all.


But, just to make things easier for those who are starting with FoxyPreviewer, I'm shipping an APP version of the library - FoxyPreviewer.APP, and a helper file, FoxyPreviewerCaller.PRG
This APP contains all the Classes, custom ReportListeners, DLLs and images needed. ALL IN JUST A SINGLE FILE.

The usage is almost the same:
Store the file FoxyPreviewer.App in the same folder that you have your EXE or the Report*.App files.
Add to your main project just one file: FOXYPREVIEWERCALLER.PRG

The usage is EXACTLY the same - the only difference is that instead of starting the FoxyPreviewer class directly, you'll access the Helper class that I created that you'll include in your EXE.
This was necessary in order to allow FoxyPreviewer to access the FRX files from your EXE. Being an external library, FoxyPreviewer.App can't access directly the FRX that are in your EXE. That's the reason that I'm asking you to include the helper file, FoxyPreviewerCaller.Prg in your EXE. That way, the helper class is inside your EXE, and it can access your FRX, and pass them to the Previewer class.

Behind the scenes, this helper class stores a copy of the FRX classes from your EXE in a TEMP file, that is used by FoxyPreviewer. This helper class does the needed cleanups, deleting the temporary files. All the properties available in the main class are available in the helper as well, so you'll use it the same way:


SET PROCEDURE TO FoxyPreviewerCaller.prg ADDITIVE 

LOCAL loReport as "FoxyPreviewerCaller" OF "FoxyPreviewerCaller.Prg"
loReport = CREATEOBJECT("FoxyPreviewerCaller")

WITH loReport as ReportHelper
	.AddReport("Sample.frx", "RANGE 1,1 NODIALOG")
	.RunReport()
	
	DO CASE
	CASE .lPrinted	
		MESSAGEBOX("Report was printed !",64, "Report status")
	CASE .lSaved
		MESSAGEBOX("Report was saved as file:" + CHR(13) + .cDestFile,;
			64, ;
			"Report status")
		=Thisform.OpenFile(.cDestFile)
	OTHERWISE
		MESSAGEBOX("Report Preview was closed without saving or printing",48, "Report status")
	ENDCASE
ENDWITH






The APP distributed is using the English language translation by default.
If you want to change it to your own language, we have already 6 options available: English, portuguese, spanish, turkish, german and italian. Just edit the file Foxypreviewer.Prg, uncomment your desired language in the 1st lines, and recompile it, generating your localized FoxyPreviewer.App file.

Hope this clarifies the usage.

You may get the needed files from here:
http://weblogs.foxite.com/vfpimaging/archive/2010/02/21/10127.aspx


Regards,

Cesar
My Blog



COMPLETE THREAD
FoxyPreviewer.APP usage Posted by Cesar @ 2/25/2010 6:01:40 PM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 2/26/2010 2:26:08 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/26/2010 1:37:49 PM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 2/26/2010 8:31:42 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/28/2010 7:56:47 PM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 3/1/2010 3:04:02 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/1/2010 3:54:22 AM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 3/1/2010 9:03:30 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/1/2010 9:25:59 PM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 3/1/2010 9:49:49 PM
RE: FoxyPreviewer.APP usage Posted by Luis @ 3/4/2010 3:54:42 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/4/2010 12:44:34 PM
RE: FoxyPreviewer.APP usage Posted by Luis @ 3/4/2010 8:21:53 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/4/2010 8:46:44 PM
RE: FoxyPreviewer.APP usage Posted by Marat Chariev @ 3/4/2010 2:44:59 PM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 3/4/2010 8:01:25 PM
RE: FoxyPreviewer.APP usage Posted by Luis @ 3/4/2010 8:15:25 PM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 3/4/2010 8:39:06 PM
RE: FoxyPreviewer.APP usage Posted by Marat Chariev @ 3/5/2010 6:39:09 AM
RE: FoxyPreviewer.APP usage Posted by Marat Chariev @ 2/28/2010 3:22:21 PM
RE: FoxyPreviewer.APP usage Posted by Andrew Nickless @ 2/28/2010 7:18:45 PM
RE: FoxyPreviewer.APP usage Posted by Marat Chariev @ 3/1/2010 3:08:01 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/1/2010 3:37:45 AM
RE: FoxyPreviewer.APP usage Posted by Dranreb @ 2/26/2010 2:55:40 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/26/2010 1:38:34 PM
RE: FoxyPreviewer.APP usage Posted by Dranreb @ 2/27/2010 2:02:47 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/27/2010 2:25:26 AM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 2/26/2010 1:45:47 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/26/2010 2:00:42 PM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 2/26/2010 6:05:22 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/26/2010 6:10:25 PM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 2/26/2010 6:28:29 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/26/2010 6:42:54 PM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 2/26/2010 6:49:58 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 2/26/2010 7:14:18 PM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 3/1/2010 10:23:05 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/1/2010 11:25:31 AM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 3/1/2010 12:35:20 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/1/2010 1:10:28 PM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/1/2010 1:25:08 PM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 3/1/2010 8:45:11 PM
RE: FoxyPreviewer.APP usage Posted by Kevin @ 3/2/2010 12:04:20 AM
RE: FoxyPreviewer.APP usage Posted by Cesar @ 3/2/2010 12:10:10 AM
RE: FoxyPreviewer.APP usage Posted by Imran Khan @ 3/3/2010 6:16:41 PM
RE: FoxyPreviewer.APP usage Posted by Bilal Budhani @ 2/27/2010 8:16:03 AM