locked
foxipreviewer with incuded reports RRS feed

  • Question

  • Hello all,

    Any body knows how to use proxiviewer with reports that are included to the exe file

    Thanks

    upendralk

    Friday, March 2, 2012 12:58 PM

Answers

  • Actualy with normal mode report files can be included to the exe and functioning well, but with complete mode it is not functioning.

    Uppendralk,

    The usage in the "Complete" mode is totally disencouraged. This was the main usage 2.5 years ago, when Foxypreviewer was released, but since version 2.0 this mode has been left away. It brings several issues, like:

    1 - You can't embed your reports in the EXE
    2 - You can't embed your images in your EXE
    3 - The newest features, like Watermarks, Tagged formatting are not available, among others
    4 - Harder to setup and configure, among others
    5 - NOT SUPPORTED ANY MORE, it will probably keep working in the next versions, but probably most of the new features to be implemented will NOT be availabe in the Complete mode.

    Anyway, if you insist using it that way, you have to include in your EXE the file FOXYPREVIEWERCALLER.PRG, that is in the "\SOURCE" folder of FoxyPreviewer. Then, to use it, just follow this sample:

    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") && ' The RANGE clause is optional !
    	.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")
    	OTHERWISE
    		MESSAGEBOX("Report Preview was closed without saving or printing",48, "Report status")
    	ENDCASE
    ENDWITH

    BTW, all this is already documented, and can be found in the main Documentation page of Foxypreviewer: http://foxypreviewer.codeplex.com/documentation

    Look for the word "FoxyPreviewerCaller"

    Hope that helps

    Cesar


    • Proposed as answer by CChalom Friday, March 2, 2012 5:59 PM
    • Edited by CChalom Friday, March 2, 2012 6:01 PM
    • Marked as answer by upendralk Saturday, March 3, 2012 10:18 AM
    Friday, March 2, 2012 5:59 PM

All replies

  • Hi,

    Do you encounter a problem? 

    Reportfiles included into your exe should not stop FoxyPreviewer to function.

    Can you print such an included report, not making use of FP but the default Reportlistener.vcx and Reportbehavior 90 ?

    Koen

    Friday, March 2, 2012 4:47 PM
  •  Hi Koen,

    Acctualy with normal mode report files canbe included to the exe and functioning well, but with complete mode it is not functioning

    Thanks

    Upendralk

    Friday, March 2, 2012 5:15 PM
  • Actualy with normal mode report files can be included to the exe and functioning well, but with complete mode it is not functioning.

    Uppendralk,

    The usage in the "Complete" mode is totally disencouraged. This was the main usage 2.5 years ago, when Foxypreviewer was released, but since version 2.0 this mode has been left away. It brings several issues, like:

    1 - You can't embed your reports in the EXE
    2 - You can't embed your images in your EXE
    3 - The newest features, like Watermarks, Tagged formatting are not available, among others
    4 - Harder to setup and configure, among others
    5 - NOT SUPPORTED ANY MORE, it will probably keep working in the next versions, but probably most of the new features to be implemented will NOT be availabe in the Complete mode.

    Anyway, if you insist using it that way, you have to include in your EXE the file FOXYPREVIEWERCALLER.PRG, that is in the "\SOURCE" folder of FoxyPreviewer. Then, to use it, just follow this sample:

    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") && ' The RANGE clause is optional !
    	.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")
    	OTHERWISE
    		MESSAGEBOX("Report Preview was closed without saving or printing",48, "Report status")
    	ENDCASE
    ENDWITH

    BTW, all this is already documented, and can be found in the main Documentation page of Foxypreviewer: http://foxypreviewer.codeplex.com/documentation

    Look for the word "FoxyPreviewerCaller"

    Hope that helps

    Cesar


    • Proposed as answer by CChalom Friday, March 2, 2012 5:59 PM
    • Edited by CChalom Friday, March 2, 2012 6:01 PM
    • Marked as answer by upendralk Saturday, March 3, 2012 10:18 AM
    Friday, March 2, 2012 5:59 PM