Foxite.COM Community Weblog

Foxite.COM Community Weblog - free weblog service for the Visual FoxPro Community.
Welcome to Foxite.COM Community Weblog Sign in | Join | Help
in
Home Blogs Forum Photos Forum Archives

VFP IMAGING



FoxyPreviewer 1.73

CodePlex FoxyPreviewer downloads page

Export your reports to Images, RTF, PDF, HTML or XLS super easy! Send them by email! Enhance the look of your previews!

*** v1.73 - UPDATED 2010-07-27*** 

  • Updated the Localizations table with the Spanish, Czech, Turkish and Arabic translations, Juan Antonio Santana and Rick Castro, Martin Krivka, Soykan Ozcelik and Dany Eid
  • Fix: FoxyPreviewerCaller.Prg adapted to work with the new settings possibilities. 

*** v1.72 - UPDATED 2010-07-26*** 

  • updated the Localizations table with the German and Indonesian translations, thanks to Stefan Wuebbe and Samir H.
  • Fix: the toolbar will be disabled when the Settings form will be called
  • Fix: in the language assignment at initialization

*** v1.71 - UPDATED 2010-07-24*** 

  • Updated the Localizations table in order to update the new settings form
  • New property: nButtonSize - Numeric, 1 = Small - 16x16 pixels (default), 2 = Big - 32x32 pixels

*** v1.70 - UPDATED 2010-07-22*** 

  • Fix: ExcelListener was raising an error when the report used the _PAGETOTAL variable
  • Fix: When the Miniatures form was minimized the miniaturesdid not show
  • Renamed property: Old name: PDFnPageMode; New name: nPDFPageMode
  • New Property: "lShowPrinters" - Logical, determines if the available printers combo will be shown
  • New Property: "nShowToolbar"  - Numeric, determines the visibility of the toolbar
     && 1 = Visible (default), 2 = Invisible, 3 = Use resource
  • New Property: "lShowSetup" - Logical, determines if the FoxyPreviewer setup button will be shown
  • New Property: "nMaxMiniatureDisplay" - Numeric, the number of miniature to display in the miniature form
  • New Property: "nShowToolBar" - numeric, determines if the toolbar will be visible or not at startup && 1 = Visible (default), 2 = Invisible, 3 = Use resource
  • New Property: "lShowSetup" - logical, determines if the setup button will be shown
  • New Property: "lShowPrinters" - logical, determines if the available printers combo will be shown
  • Other New Properties: for Email sending using CDOSYS
     nEmailMode          && 1 = MAPI, 2 = CDOSYS, 3 = Custom procedure
     cSMTPServer  
     nSMTPPort    
     lSMTPUseSSL  
     cSMTPUserName
     cSMTPPassword 
     cEmailTo     
     cEmailSubject
     cEmailBody   
     cEmailFrom
  • New dialog forms:
           "Settings", allow user to define most of the available settings for the current and next session of Foxypreviewer
           "Send Email" Form allowing user to pass email information
  • When the user chooses to save as "XLS", it will allow saving using the XML extension, because the output file will be able to be opened by other tools, such as OpenOffice.
  • Tweaks in the sample distribution project, to adapt it to the new changes.
  • Fix: RTF and PDF Listeners now work with basic rounded shapes
  • Fix: FoxyPreviewerCaller.Prg cleanup improved, now PAPERSIZE and ORIENTATION are kept when the EXPRE cleanup is done (Thnaks to Nick Porfirys)
  • Several improvements on the settings form
  • New downloads page at CodePlex

*** v1.53 - UPDATED 2010-07-08*** 

  • Several new tweaks in translations
  • GoToPage form translations activated
  • Removed the exibition of the FRX nme if using the cTitle property
  • Changed all buttons to use the property SpecialEffect = 2, in order to keep the same appearance of the original report toolbar
  • Updated samples, using translated versions
  • Special thanks to Manuel B and Jacques Parent for their big contribution for this release, testing, providing suggestions and fixes. Very much apreciated !

*** v1.52 - UPDATED 2010-07-08*** 

  • New property: cLanguage, to determine the language for the dialogs and tooltips. Available at this moment: ENGLISH (default), PORTUGUES, ESPANIOL, GERMAN, TURKISH, ITALIANO, CZECH, PERSIAN, GREEK, FRENCH, POLISH, INDONESIAN
       Notice that I removed all the translations from FoxyPreviewer.H
       There I only kept information about the default language to be selected. This is to be used if you use FoxyPreviewer to set the global variable "_REPORTPREVIEW"
  • Several tweaks in FoxyPreviewerCaller
  • Fix in Report title, was showing "TMP_"

*** v1.49 - UPDATED 2010-06-30*** 

  • Improvement: Included the "PrinterPreferences" button to the Default Preview Toolbar, the one used without calling FoxyPreviewer.
  • New translations, Polish and Indonesian, thanks to Kazimierz Pszenny and Samir H.
  • Improvement: Allows using bigger icons, such as 32x32
  • Replaced original icons due to some doubts about licensing, now using icons from www.pixel-mixer.com, that are free to use for commercial use.
  • New definitions in FoxyPreviewer.H allow you to change the name of the image buttons to be used.

*** v1.45 - UPDATED 2010-06-19*** 

  • Fix: Property "lPrinted" now returns the correct value if user selected the "Printer Prompt" dialog (Printer preferences button), thanks to Martin Krivka
  • Updated Greek translation
  • Improvement: Now the preview title bar displays: "Page - PageTotal" when user selectes 1Page mode i.e.: "Page 5 - 1500" or: "Pages from %FP% to %LP%" when user selectes 2Page or 4Page mode i.e.: "Pages from 5 to 6" or "Pages from 5 to 8", thanks to Nick Porfyris

*** v1.43 - UPDATED 2010-06-16*** 

  • Fix: Page# will appear translated in the Preview Form titlebar

*** v1.42 - UPDATED 2010-06-15*** 

  • Fix: PDFListener was not rendering some strings when Dynamic properties were incorrectly set, reported by Anil Kamat 
  • Fix: AddReport() new tweaks, thanks to Carlos Morandin
  • New property: PDFnPageMode, numeric, Default = 0, 0 = Normal view, 1 = Show the outlines pane, 2 = Show the thumbnails pane, 3 = Full Screen
  • Improvement: Included support for labels (LBX) in FoxyPreviewerCaller.prg, thanks to Nick Porfyris

*** v1.41 - UPDATED 2010-06-14*** 

  • Fix: ExcelListener now renders "&" characters correctly
  • Improvement: New parameter allowed in method "AddReport(tcFRX, tcClauses, tcAlias)", allowing specifying the alias to be selected when the desired report will be executed.
  • Tweak: Miniatures form will not show the nvigtion buttons when the quantity of pges will not exceed the existing quantity of pages. (by Jacques Parent)

*** v1.40 - UPDATED 2010-06-13*** 

  • Fix: "SET TALK ON" bug in SP2 reporting bypassed. Now PDF and HTML outputs will not dirty the console http://cathypountney.blogspot.com/2009/04/set-talk-appears-to-be-on-when-running.html
  • Fix: "AddReport()" bug, was not allowing chained reports, thanks to Craig Boyd
  • New property - "lUseListener", when .F., REPORTBEHAVIOR will be set to 80 (old way), to generate good printings on dot-matrix printers.
  • Improvement: new internal function to detect if the output printer is Dot-Matrix type; 
    if positive, the report will be sent to the printer using REPORTBEHAVIOR 80
  • Improvement: Lots of cool tweaks from Jacques Parent, specially in the miniatures form, allowing to have all available pages miniatures
  • Improvement: French translation from Jacques Parent
  • New property "cEmailPRG"
       Character, receives the name of a PRG that will fire your custom email.
       In this PRG, you need to receive one parameter, ec tcFile, that is the temporary output file that you'll send by email.   
       A complete sample, "MYSENDMAIL.PRG" is available, showing you how you can send your emails
       Uses a CDOSYS class, courtesy of Sergey Berezniker
       http://www.berezniker.com/content/pages/visual-foxpro/send-email-msn-email-account
       http://www.berezniker.com/content/pages/visual-foxpro/cdo-2000-class-sending-emails

*** v1.31 - UPDATED 2010-04-28*** 

*** v1.30 - UPDATED 2010-04-26*** 

  • Fix: "Save As" menu working in Top-Level forms (Thanks to Tushar)

*** v1.26a - UPDATED 2010-04-01***

  • Fix: PDF Listener accepts GIFs
  • Fix: "Save As" menu working in Top-Level forms
  • Fix: PDF Listener will use Gdi+ to convert a not supported image
  • Enhancement: New MAPI function to send emails
  • Enhancement: The property "cDestFile" can be filled manually, in order to generate output files without previewing
  • Fix: Excel output files are saved in the desired folder

*** v1.25 - UPDATED 2010-03-28***

  • Fix: HTML output now works correctly in EXE.
  • Fix: Turned off SetConsole during PDF generation
  • The "Priting Preferences" button now activates the "PRINTER PROMPT" dialog, that enables users to change the current printer, and all available settings. This provides the maximum customization.
  • Included a new file - FoxyPreviewer.H, that contains the localized constants for the strings.
  • Included the CZECH, PERSIAN and GREEK localized strings in FoxyPreviewer.H. Now we have translations for 9 languages available.
  • New Property : "cCodePage" && Default = "CP1252", CodePage, to be used by PDF Listener
  • New Property : "lQuietMode" && Default = .T., determines the QuietMode property for the listeners used
  • New Property : "lPDFasImage" && Default = .F., the PDF document will be an image document
  • Enhancement: PDFx received some tweaks in order to generate smaller files when repeated images are used in reports. Thanks to Luis Navas
  • Updated FoxyPreviewerCaller.Prg to accept the new properties

*** v1.23 - UPDATED 2010-02-28***

  • New tweaks for Top-Level forms - now the parent form will have its "Closable" property set as false during report preview, and reset on preview release (Thanks to Stefan Wuebbe)
  • Fixes in RTF and PDF Listeners, now images with Isometric settings correctly rendered. (Thanks to Andrew Nickless)
  • Fix in PDF rendering for GIF conversion (Thanks to Kevin)

*** v1.22 - UPDATED 2010-02-23***

  • Improvement: New property: nDockType (see description below)
  • Improvement: New PRG, FoxyPreviewerCaller.Prg, to be included in the EXE. It allows using embedded reports in the EXE, using the APP file. TO be better documented soon. See sample in downloads file.

*** v1.21 - UPDATED 2010-02-22 ***

  • Fix: Enlarged label size for RTF output
  • Fix: Included file "FrxPreview.H" in distribution (needed by ExcelListener)
  • Tweak: Removed progress dialogs in spanish. All listeners have all progress dialogs disabled
  • New properties:
    • Output types allowed in the "Save as.." button from the toolbar
    lSaveAsImage
    lSaveAsHTML
    lSaveAsRTF
    lSaveAsXLS
    lSaveAsPDF
    • Defining the previewform.WindowState
nWindowState && 0 = Normal, 2 = Maximized

*** v1.20 - UPDATED 2010-02-21 ***

  • Improvement: PDFListener now draws backgrounds for fields and labels
  • Improvement: RTFListener now draws backgrounds for fields and labels
  • New feature: Basic Excel output available (Using ExcelListener by Alejandro Sosa, first implemented by Edwin Duran)
    • Important - Excel listener, differently from PDF and RTF listeners is being provided as is. I will not support new features or improvements to this listener. My goal is to offer another output possibility, but I really can't add fetures, or important fixes. As it is open source, feel free to add your improvements and fixes. I'll be happy to update the version distributed with FoxyPreviewer if you send it to me. Using version 1.02 from UT, having disabled the automatic file opening after generation, and also removed the CTL32 Progressbar

*** v1.18 - UPDATED 2010-02-18***

  • Fix: RTFListener now works correctly when _PageTotal is used
  • Fix: RTFListener now works with CMYK JPGs, TIFFs and PNGs
  • Fix: PDFxListener now works with all kinds of images
  • Fix: PDFxListener now draws transparent shapes 

*** v1.16 - UPDATED 2010-02-13***

  • Fix: TopForm property error in initialization
  • Fix: Now the _ReportPreview cache will be always cleared to avoid errors during toolbar rebuilding
  • Many tweaks in the _ReportPreview factory

*** v1.15 - UPDATED 2010-02-10***

  • Fix: Context menu now works normally in Top-Level forms.
  • MAJOR CHANGE: Now distributing a separate APP file that is a library that contains ALL the required files for FoxyPreviewer to run properly, including: LibHaru.dll, _GdiPlus.vcx, _ReportListener.vcx, FoxyPreviewer classes, PDFx, RTFListener, and all support images. This post will be updated soon, with more detailed information about these changes.

*** v1.11 - UPDATED 2010-02-09***

  • Fix: Context menu now works normally when the toolbar is invisible.

*** v1.10 - UPDATED 2010-02-07***

  • Fixed forced preview close (Vivek Deodhar)
  • Included new "Printer preferences" button in toolbar and context menu (using codes from Barbara Peisch)
  • Fixed "lPrintVisible" property error (Zen Tes)

*** UPDATED 2010-02-04***

  • Included translation to Italian (thanks to Fabio Lenzarini)
  • Fix: Printing in a network printer was not working correctly
  • Fix: method RunReport, missing "This" in some lines of code (Benny Thomas)
  • Fixed RTFListener colors initialization, thanks to Hector Urrutia
  • Removed the "NORESET" clause on merged reports. Users should add it by themselves in case they need
  • Renamed the ReportListener helper classes
    (PDFx became PR_PDFX and FRX_RTF became PR_RTFListener),
    in order to avoid people messing with the original versions from the authors.
    The versions distributed with FoxyPreviewer are tweaked ones

*** UPDATED 2010-02-03***

  • Included translation to Turkish (thanks to Soykan Ozcelik)
  • Fix: RTF Listener was omitting 1st page when Range clause was used
  • Fix: Property "lSaved" was not becoming 'True' when an image file was saved

*** UPDATED 2010-02-02***

  • Tweaked German translation
  • Fixed GotoPage dialog not working when toolbar was not visible
  • Fixed Default printer in Combobox

*** UPDATED 2010-02-01***

  • Included translation to German (Thanks to Tom Knauf)
  • Fixed toolbar regeneration when user closed the toolbar using the "X" button
  • Now compatible with VFP9 1st release and SP1 (SP2 strongly recommended)

 

FoxyPreviewer is my report generating class, that brings some cool and useful functions, as you can see in the pictures below.

 

FEATURES

 

1 - Preview Toolbar

The original toolbar was modified, with some new button images, and new buttons too !

 

2 - Printers ComboBox

The printers combobox will show you all the available printers (local and in the network), and allows you to change the deviate the output to any printer that you want.

3 - Copies spinner

Determine on the fly the quantity of copies that you want to print!

 

4 - Miniatures button

View miniatures of all pages of the current report. Clicking on any miniature will jump the output page to the selected one.

 

 

5 - Save As.

A new button that calls a context menu that allows you to save the current report as:

  • Image Files - EMF, PNG, JPG, BMP, GIF, TIFF
  • HTML
  • PDF
  • RTF, a MS-Word compatible format
  • XLS, a MS-Excel simplified worksheet new!

6 - Context menu

The report context menu was updated as well, receiving all the new buttons and pictures. For the case of the "Save as." button, a submenu brings all the output possibilities.

 

 

 

7 - Changing the Printer Preferences. New !

Now you can access the Printer Preferences dialog to change the default printer settings of the selected printer. Works on all Windows versions!

When you click on this button:

 

You'll get a printer dialog from your current printer. For my case I got:

 

 

 

8 - Translating ALL report windows, dialogs, tooltips and captions.

Have you noticed that the context menu above is in spanish ? You can determine in what language your report will be working with. Currently FoxyPreviewer is available in English, Portuguese and Spanish. It's up to you to decide in what language the dialogs will be shown.

 

Go to page dialog in spanish

 

 

USAGE

 

To test FoxyPreviewer, download this file, unzip it, and run the file TESTPREVIEWER.PRG. Please make sure to start VFP from this file, by doubleclicking on this file from Explorer, to make sure that the default path is automatically set, and all the needed files will be found.

 

To use it with your own reports is super simple, with just three lines of code:

LOCAL loReport AS "PreviewHelper" OF "FoxyPreviewer.prg"
loReport = CREATEOBJECT("PreviewHelper")
loReport.AddReport(_Samples + "\Solution\Reports\colors.frx", "RANGE 1,1 NODIALOG") && FRX File, Clauses
loReport.RunReport()

 

The main file is FOXYPREVIEWER.PRG that contains the PreviewHelper class that is the class that you need to instantiate to have the new toolbar options. It uses the ReportListener's ExtensionHandler class to make all the changes in the original toolbar. This file also brings the classes from Colin Nicholls, that generate the miniatures sheet.

For the RTF output, kudos go to Vladimir Zhuravlev's RTFListener class. Impressive how he managed to make it! No need of any external library, RTF Listener converts your report into an RTF file, that can be perfectly opened and viewed in MS-Word ! I applied some fixes in the original version, now allowing all the text output to be shown correctly, enabled colors for texts, backgrounds and shapes, and also images stored in general fields. Another small tweak was added to allow merging reports.

The PDF files are generated using Luis Navas' amazing PDFx class. It uses an external library, Haru Free PDF Library 2.0.8, from Takeshi Kanno. Super light weight, no need to install a ghostscript printer, no dependancies to generate your PDFs! More info at Luis Navas' blog: http://weblogs.foxite.com/luisnavas/archive/2008/10/06/7025.aspx. The original version from Luis also received some few tweaks, to allow merging reports, and also eliminating the need to use the GdiPlusX library from VFPX. Now it used the _GdiPlus.vcx FFC class, that is already stored in the Report*.App files, that are already available in all VFP9 sources. I decided doing that because the GDI+ usage was really very very simple, and the FFC classes were enough for that purpose. Hey ! I keep recommending to everybody to use GdiPlusX !!!

 

CUSTOMIZING

Of course, you may choose what features will be available in the report preview toolbar. There are some few and obvious properties that you may set in order to fit your needs. Below are the methods and properties available:

 

Methods - all obligatory

  • AddReport(tcFRXFile, tcClauses, tcAlias) 
    That's the place where you determine what report and which clauses will be used 
    tcFRXFile - character, the FRX to be run 
    tcClauses - character, the report clauses 
    eg.: .AddReport(_Samples + "\Solution\Reports\wrapping.frx", "NODIALOG FOR title = 'S' RANGE 3,3")

 

  • RunReport() 
    Runs the chosen report, and shows the preview window and FoxyPreviewer toolbar

 

Properties - all optional

  • cTitle - character, the preview window title
  • lSendToEmail - logical, determines if the "send to email" button will be shown (not available yet)
  • lSaveToFile - logical, determines if the "saveto file" button will be shown
  • lShowCopies - logical, shows the copies spinner
  • lShowMiniatures - logical, shows the miniatures page
  • nCopies - numeric, the default quantity of copies to be printed
  • lPrintVisible - logical, shows the print button in the toolbar
  • cDefaultListener - character or object, the name or object from the default listener to be used; the default one is "FXLISTENER"
  • nCanvasCount - numeric, the initial nr of pages rendered on the preview form. Valid values are 1 (default), 2, or 4.
  • nZoomLevel - numeric, the initial zoom level of the preview window. Possible values are:
    1-10%, 2-25%, 3-50%, 4-75%, 5-100% default, 6-150% ;
    7-200%, 8-300%, 9-500%, 10-whole page
  • lPrinterPref - logical, shows the "Change printer preferences" button in the toolbar new!
  • lSaveAsImage - logical, includes the "save as Image" option in menu new!
  • lSaveAsHTML - logical, includes the "save as HTML" option in menu new!
  • lSaveAsRTF - logical, includes the "save as RTF" option in menu new!
  • lSaveAsXLS - logical, includes the "save as XLS" option in menu new!
  • lSaveAsPDF - logical, includes the "save as PDF" option in menu new!
  • nWindowState - numeric, defines the previewform.WindowState 0 = Normal, 2 = Maximized new!
  • nDockType - logical or numeric (0-4). If False, the dock will follow the resource file used. Or numeric, to force the toolbar docking. new!
  • nMaxMiniatureDisplay - numeric, the quantity of reports to be shown in the miniatures form.
  • cFormIcon - character, the file name of the icon to be used in the preview and other helper forms
  • lEmailAuto - logical, Automatically generates the report output file
  • cEmailType - character, the file type to be used in Emails (PDF, RTF, HTML or XLS)
  • lEmailed - logical, returns .T. (true) if an email has been sent
  • cEmailPRG - character, the name of a PRG that will fire your custom email. In this PRG, you need to receive one parameter, tcFIle, that is the temporary output file that you'll send by email. A complete sample, "MYSENDMAIL.PRG" is available, showing you how you can send your emails. To use it, you need to set the value of this property, for instance: .cEmilPrg = "MySendMail.Prg"
  • cCodePage - character, the codepage to be used by the PDF listener && Default = "CP1252"
  • lUseListener - logical, determines if ReportListeners will be used during printing. The report previsualization will always use listeners. There are some situations or incompatibilities between some printers and report listeners so you may try setting this property to .F. to get an "old way" printing. So, when .F., REPORTBEHAVIOR will be set to 80. Useful for dot-matrix printers.
  • lQuietMode - logical, determines the QuietMode property for the listeners used && Default = .T.
  • lPDFasImage - logical, the PDF document will generated as an image document && Default = .F.
  • cDestFile - character, determines the filename of the output file to be generated when "RunReport()" is called. If you set this propertym the report will not be previewed
  • PDFnPageMode - integer, determines the Page mode for the PDF document. &&  Default = 0, 0 = Normal view, 1 = Show the outlines pane, 2 = Show the thumbnails pane, 3 = Full Screen

 

AUTOMATING WITH INTELLISENSE

I've also created a small PRG that updates the FOXCODE table in order to add an Intellisense script to use it. Please run the file INSTALLFOXCODE.PRG to update the Intellisense.

To test it, open any empty PRG or Method, and just type:

FOXYPREVIEW and a complete script with all available options will be shown. Obviously, you may delete or comment all the properties that you don't want to use.

 

CHANGING ALL PREVIEWS

Another cool feature is that you can also set the Global _REPORTPREVIEW variable to "FoxyPreviewer.prg", and all your reports, even those that will not create the Helper Object will have that look. Unfortunately, I could not add all the options from the toolbar to them, because it is impossible to retrieve the "FOR" clauses after a report is run.

Just type the following in your command window:

  _ReportPreview = "FoxyPreviewer.prg" 
  REPORT FORM _Samples + "Solution\Reports\Colors.frx" PREVIEW

Notice that some functions are not available in this option, but some cool ones remain, like the changes picture buttons, translations, the Miniatures is still avalable, and the save to file can only save the report in image file.

 

TRANSLATING TO NON ENGLISH LANGUAGES

 

To enable it, just open the FoxyPreviewer.H, and you'll find the language definitions. Comment the line that defines the default language to English, and uncomment the one that sets it to the desired language. It's very simple to add another language, just open FoxyPreviewer.prg and translate the #DEFINE's constants to your native language. I'll be very happy to add other localized languages to the main download ! Please, if you do translate it to another language, send to me your translation !

To enable the spanish language, for instance just leave the desired language uncommented

* #DEFINE PR_ENGLISH
* #DEFINE PR_PORTUGUES
* #DEFINE PR_GERMAN
* #DEFINE PR_ITALIANO
* #DEFINE PR_TURKISH
* #DEFINE PR_CZECH
* #DEFINE PR_GREEK
* #DEFINE PR_PERSIAN
* #DEFINE PR_FRENCH

#DEFINE PR_ESPANIOL

 

 

DISTRIBUTION

FoxyPreviewer consists of a set of separate utilities, that were adapted to work together.
These files include classes, prgs, images, dlls and header files.

In order to simplify the distribution and to avoid adding many individual files to your project, all the related files have been compiled into a single APP file - FoxyPreviewer.App

The usage is simple:
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 as if you were using the PRG - 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 9 options available: English, portuguese, spanish, turkish, german and italian. Just edit the file Foxypreviewer.H, uncomment your desired language in the 1st lines, and recompile it, generating your localized FoxyPreviewer.App file that you'll distribute.


The other option 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. This brings the advantage of including FoxyPReviewer in your executable:

  • pr_ExcelListener.vcx
  • pr_PDFx.vcx
  • pr_RtfListener.vcx
  • GdiPlus.vcx
  • _ReportListener.vcx
  • _FRXCursor.vcx

 

  • FoxyPreviewer.prg

 

  • FoxPro_Reporting.H
  • FoxyPreviewer.H
  • FrxPreview.H
  • GdiPlus.H
  • GdiPlus_locs.H
  • HPDF_consts.H
  • ReportListeners.H
  • ReportListeners_Locs.H
  • WinCrypt.H
  • _FrxCursor.H
  • _Reports.H

 

  • LibHPDF.dll

 

  • pr_IMAGES.bmp
  • pr_Bottom.bmp
  • pr_Close.bmp
  • pr_Close2.bmp
  • pr_Excel.bmp
  • pr_GoToPage.bmp
  • pr_Html.bmp
  • pr_Img.bmp
  • pr_Locate.bmp
  • pr_Mail.bmp
  • pr_Next.bmp
  • pr_Pdf.bmp
  • pr_Previous.bmp
  • pr_Print.bmp
  • pr_PrintPref.bmp
  • pr_Save.bmp
  • pr_Top.bmp
  • pr_Word.bmp
  • WWrite.ico

 

FUTURE IMPROVEMENTS

 

  • Another missing point is the "SendToEmail" option. This involves an HTML editor form, and a CDOSYS email class, lots of images, etc. I hope to add it to FoxyPreviewer soon. I already have this working in my own framework, but I still have to disconnect some objects in order to add them to this project, and to allow some other customizations, like allowing you to choose another email component to send your emails. The HTML editor was adapted from the original from Frederick Steczicky and Tracy Pearson, published in www.atoutfox.com .

 

SPECIAL THANKS / AUTHORS

As you could see, FoxyPreviewer is the result of some researches, and the use of some amazing tools provided as open source and free from other foxers. The VFP community is amazing !!!

 

Lisa Slater Nicholls - for the great job that she made with the reporting system of VFP9 SP2. And more than that, for her great blog, the excellent and well documented articles.

 

Colin Nicholls - He's the author of the Miniatures form; for his many great articles too regarding the new reporting system, specially for the article Exploring and Extending Report Previewing in VFP9. I took the miniatures preview form classes from there.

 

Luis Navas - He's the author of the PDF Listener. A terrific job, great code. More info about PDFx can be obtained in his blog: PDFx Update Support for some SP2 Features. This brings a new, lightweight and very reliable option for us to export our reports to PDFs. Thanks a lot for your support and help with this project !

 

Vladimir Zhuravlev - He's the author of the RTF Listener together with Dmitriy Petrov and Valeriy Liftshits with help of Vadim Pirozhkov. It was published in the Foxite downloads section - http://www.foxite.com/downloads/default.aspx?id=166. Another impressive and courageous work. Thanks very much !

Leandro Walfrans for testing and Luis Maria Guayan, for his continuous support and for the spanish translations. Tom Knauf, for the german translation.

Takeshi Kanno, the author of the HARU PDF library, and all his collaborators, for making PDFx come true with HARU library. More information about this great project: http://libharu.org/wiki/Main_Page

Barbara Peisch, for the codes to open the "Printer Preferences" dialog window, posted in the Foxite forums: http://www.foxite.com/archives/0000158197.htm

Edwin Duran, for the samples using ExcelListener, created by Alejandro Sosa

Sergey Berezniker, for the email CDO class used in the samples, and for some codes used to get printer information.

 

 

DISCLAIMER

This software ("FoxyPreviewer") and the distributed classes are provided "as is'.

You may use the Software for any commercial or noncommercial purpose, including distributing derivative works.

In return, we simply require that you agree:

1. Not to remove any copyright or other notices from the Software, or from the distributed classes, created by other authors.

2. That the Software comes "as is", with no warranties. None whatsoever. This means no express, implied or statutory warranty, including without limitation, warranties of merchantability or fitness for a particular purpose or any warranty of title or non-infringement.

3. That no contributor to the Software will be liable for any of those types of damages known as indirect, special, consequential, or incidental related to the Software or this license, to the maximum extent the law permits, no matter what legal theory it's based on. Also, you must pass this limitation of liability on whenever you distribute the Software or derivative works.

 

DOWNLOAD

CodePlex FoxyPreviewer downloads page

Hope you enjoy !

Published Saturday, July 24, 2010 4:10 AM by cesarchalom
Filed Under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

aarcs said:

thnaks a lot. this is very good and useful for reports new look.

Thanks Aarcs ! I apreciate your feedback.
January 31, 2010 5:36 AM
 

Michael said:

Hi, I have some trouble with Vladimir Zhuravlev's RTF class. It's about grouping records and calculating SUM in group footer. It never reset SUM for group, just continue SUM!

Hi, Yes, I knew about that issue. Please try the RTFListener class that I'm distributing with FoxyPreviewer. It was completely revised, and had received many fixes and improvements. Try it again, and tell me how it goes !
Just be careful, because now the usage is much more simpler, there is no need to pass any parameter in the RTF Listener initialization. Just "CREATEOBJECT" and set the new property "TargetFileName" with the destination file you desire.
I'm looking forward to your feedback regarding this !
Regards
Cesar
January 31, 2010 2:31 PM
 

Michael said:

Hi Cesar,
I replace RTF class from your Previewer into my, and for now, couple examples run, SUM in grouping footer is OK now.
Thanks for that correction!

And for simpler use, you can in Init receive "TargetFileName" and set that property.

Hi Michael,
Great !
Yes, I preserved the 1st parameter for the "TargetFileName". In that case, I wanted to make its instantiation like the HTML Listener. You'll find all the modifications that I made to the RTF Listener in the "mAbout" method of that class.
Thanks for the quick feedback!
January 31, 2010 9:28 PM
 

Bernard Bout said:

Hi Cesar

Another great class. Unfortunately I am unable to test and check it out because of this:
I accidently closed the toolbar while the previes window was open. Now I cannot see the toolbar anymore. Everytime I run the test prg, it shows no toolbar. I do not want to have to delete my Resource file so is there any other way to re enable the toolbar?

Because of this, I urge you to add another option to the popup menubar, to show the toolbar if it was closed and now not shown. This way if a user accidently closes the toolbar (and it is very easy since there is an "X" in the window to close it), there is a way to recover form this error state.

Not having a toolbar is not an option for a user and we cannot ask them to delete a Resource file to re-enable the toolbar.

Bernard
February 1, 2010 1:18 AM
 

Bernard Bout said:

Cesar

I must be going blind. You already have a Toolbar option on the popup menu. Sorry. Please ignore my previous message.

On to testing

Bernard

 

Hey Bernard,

Hehehe, I'm glad you found it !

Thanks a lot for testing I'm looking forward to your opinions / evaluation for this !

Cheers

Cesar

February 1, 2010 1:23 AM
 

Luis Maria Guayan said:

Gracias Cesar por tu trabajo. Traducire esta entrada para publicarla en www.PortalFox.com

Muchas gracias amigo ! Gracias por estares siempre disponible ! Thanks my friend ! Thanks for always being available.

February 1, 2010 2:32 AM
 

hongwin said:

Hi Cesar,  this class looks amazing !, But I can not try it, I always receive this message "Class definition FXLISTENER is not found"

Hi HongWin,

Thanks for your comment. FXLISTENER is a new ReportListener class that came with VFP9SP2, so you need to have SP2 to run it. Anyway, you can still run it, just setting one property.

In the file "TestPreviewer.Prg", replace the instruction in line 27, to add an instruction for the class to use a previous version of the Report listener:

.cDefaultListener = "ReportListener"

... and keep the rest as is. Please tell me how it goes, I hope to add a verification in the next update for the class, in order to make it work automatically in non SP2 users.

Thanks again

Cesar

PLEASE REFER TO THE ANSWER TO THE COMMENT FROM SAIFUDDIN BELOW FOR A MORE DETAILED EXPLANATION, IF YOU ARE NOT USING VFP9 SP2

February 1, 2010 4:15 AM
 

Cesar Chalom said:

February 1, 2010 4:18 AM
 

Saifuddin K Hussain said:

Hi
I am also facing the same problem as HongWin stated, even I copy/paste your code to the said place but the problem persist.

I add only the following:
.cDefaultListener = "ReportListener"

as "WITH loReport as ReportHelper" is already there.

Saif

 

Hi Saifudin,

I'm sorry.

I told you to redefine the ReportListener default property, but in that sample it was being defined again, later. Open again the file "TestPreviewer.prg", goto line nr 29, and just edit the contents.

Where you find

.cDefaultListener = "FXLISTENER"

Please change to

.cDefaultListener = "ReportListener"

Now open FoxyPreviewer.prg look for the line that contains

goHelper._cFRXFullName = loListener.CommandClausesFile

Just comment that line, adding an "*" at the beginning of the line!

I really hope that will work this time. Notice that TestPreview.Prg has many options, but the obligatory are only the methods "AddReport()" and "RunReport()".

In the next version I will add some code testing to avoid this issue, and make it compatible with non SP2 versions. Anyway, I do strongly recommend that you update to SP2. There are some really neat things that the reporting system can do!

Please let me know how it goes!

February 1, 2010 6:58 AM
 

Tom Borgmann said:

Hi Cesar,

this is again a great class. Will you make it a part of VFPX?
February 1, 2010 8:20 AM
 

Jun Tangunan said:

What a wonderful and powerful looking class!  Cesar, undeniably you are among the best minds who shares wonderful things!  Thanks!
February 1, 2010 8:26 AM
 

hongwin said:

Dear Cesar,
I followed as you have told me. But still I received the same message "Class definition FXLISTENER is not found". Kindly take a look at the modified codes below, is it correct?

SET PROCEDURE TO FoxyPreviewer.prg ADDITIVE
LOCAL loReport
loReport = CREATEOBJECT("PreviewHelper")
WITH loReport as ReportHelper
.cDefaultListener = "ReportListener"
.AddReport("colors2.frx")
* .AddReport(_Samples + "\Solution\Reports\colors.frx", "RANGE 1,1 NODIALOG")
.AddReport(_Samples + "\Solution\Reports\wrapping.frx", "NODIALOG FOR title = Sleep <img src=" /> RANGE 3,3")
* .AddReport("wrapping2.frx", "NODIALOG FOR title = Sleep <img src=" /> RANGE 3,3")

****..... and so on
February 1, 2010 8:29 AM
 

hongwin said:

Dear Cesar, right..., I am a non SP2 user. I have modified the codes as you told me, but still I received the same message "Class definition FXLISTENER is not found". Kindly take a look at the modified codes below. Thank a lot.

SET PROCEDURE TO FoxyPreviewer.prg ADDITIVE
LOCAL loReport
loReport = CREATEOBJECT("PreviewHelper")
WITH loReport as ReportHelper
.cDefaultListener = "ReportListener"
.AddReport("colors2.frx")
* .AddReport(_Samples + "\Solution\Reports\colors.frx", "RANGE 1,1 NODIALOG")

Hi HongWin,

Thanks for testing. Please see my answer to Saifuddin below that adresses the same problem. Hope that helps !

February 1, 2010 10:04 AM
 

Lucy said:

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

Lucy

http://dataentryjob-s.com
February 1, 2010 10:04 AM
 

Cesar Chalom said:

February 1, 2010 11:15 AM
 

Cesar Chalom said:

TrackBack from http://barnamenevis.org/forum/showthread.php?t=187534&page=3
February 1, 2010 1:59 PM
 

Luis Navas said:

Thank you for all the hard and wonderful work Cesar, and also thanks for the kind words!!!

Hi Luis, In fact, I must thank you !
PDFx is a real gem. Navigating through your code I was able to learn some new and cool things that I could use for example, when tweaking the RTF Listener.
Thanks very much, for all your efforts regarding this, and your continuous support. I hope you like the class the way it is right now, and if you find the need for any modification, such as disclaimers, texts, etc, PLEASE tell me.
Best regards
Cesar
February 1, 2010 8:20 PM
 

Vivek Deodhar said:

Superb Class! Thanks.

Vivek

Thanks Vivek !
February 1, 2010 8:47 PM
 

Michael said:

Hi Cesar, me again!

Just to say to others and you, I also use SP1 and see immediately "FxListener". So i realized that is SP2 based and i changed to work on my machine!

This is what i changed, and everything works fine :
------------------------------------------------------------------------------
TestPreviewer.prg :
 Line 28 : .cDefaultListener = "UpdateLISTENER"
------------------------------------------------------------------------------
foxypreviewer.prg :
 Line 170 : loListener = NEWOBJECT('UpdateListener', ADDBS(HOME()) + "FFC\_ReportListener.vcx")
 Line 209 : cDefaultListener = "UPDATELISTENER"
 Line 736 : Comment line
 

Hi Michael,

Thanks, in this new version this will be done automatically, if FXListener is not found, the base class ReportListener will be used.

BTW, I know many foxers called Michael - do we know each other already ? 

February 1, 2010 11:21 PM
 

Marcelo Figueiredo said:

César,

Estou testando aqui a classe e deu o seguinte erro:

Propriedade waitfornextreport não localizada
Realmente, a classe _reportlistener que tenho aqui não tem essa propriedade.

Qual a utilização dessa propriedade?

 

Olá Marcelo,

Ops, parece que ele está usando uma versão errada da classe. Esse erro está acontecendo nos exemplos que mandei junto com a classe, ou no seu ambiente de produçao, no executável ? Você conseguiu rodar os exemplos, e gerar um PDF ou RTF ?

Na pratica, a prop. WaitForNextReport é um flag que indica que haverá um novo relatório para ser juntado ao anterior. É usada com os listeners para a geraçao de PDF e RTF.

Abraço !

February 2, 2010 12:33 AM
 

hongwin said:

Hi Cesar, it is working now!. Thank you for the guidance.

Wonderful ! Thanks for the confirmation. Anyway, in the new version (higher than 1.00) this will be done automatically.

February 2, 2010 2:03 AM
 

Luis Maria Guayan said:

Spanish translation of this post, in PortalFox

*** Traducción al español de esta entrada en PortalFox ***

-- FoxyPreviewer 1.05 --
http://www.portalfox.com/article.php?sid=2704
February 2, 2010 4:00 AM
 

Bernard said:

You say:

"To use it with your own reports is super simple, with just three lines of code:"

and there follows 4 lines of code:

1: LOCAL loReport AS "PreviewHelper" OF "FoxyPreviewer.prg"
2: loReport = CREATEOBJECT("PreviewHelper")
3: loReport.AddReport(_Samples + "\Solution\Reports\colors.frx", "RANGE 1,1 NODIALOG") && FRX File, Clauses
4: loReport.RunReport()

So what is it? 3 or 4 lines of code?

Ha Ha. Great class anyway. Cheers.

LOL, You may eliminate the 1st line of code, when you declare the variables, and it will still run :-D
Thanks for your support !
February 2, 2010 5:26 AM
 

Marcelo Figueiredo said:

César,

Consegui sim criar o PDF e o RTF, tudo funcionou perfeitamente. Apenas no final dá o erro. Como eu consigo a versão mais atual da _reportlistener?

Marcelo,
Você precisa ser bem mais preciso para que eu possa te ajudar. Baixe novamente a classe, pois ela foi atualizada agora ha pouco. E me passe mais detalhes.
Preciso saber EM QUE MOMENTO esta dando o erro, qual a mensagem de erro, aonde você clicou para que o erro acontecesse.
Me parece que você está fazendo algo errado, ou então sua instalação do VFP9 possa ter problemas nas pastas FFC.
Fico no aguardo !
February 2, 2010 11:04 AM
 

Fabio Lenzarini said:

Hi Cesar,
sorry for my bad english.
I'm working with your great class, but i've a problem.
I've customized the Reportlistener class to print RTF memo field and for some improvement to calculate field.
In the preview all work fine (i've changed the creation of the preview):
* Create a PREVIEW listener
TRY
loListener = CREATEOBJECT("myreplisten_directives") &&FL.n.02/02/2010
*!* loListener = NEWOBJECT('FXListener', ADDBS(HOME()) + "FFC\_ReportListener.vcx")
CATCH
loListener = CREATEOBJECT("ReportListener")
ENDTRY

But if i try to save the report as a PDF file, all my reportlistener custonization are lost..
i've a problem also with the RTF file, the file are empty...
thank you.

Fabio,

For the Preview, you can define the property "cDefaultListener" with your class name or even a reference to the object .cDefaultListener = "YourReportListener"

For the PDF case, I still need to make another tweak in PDFx and RTF Listener so that they will support successors, and for sure your listener will work. Please wait till next week, I hope to do that till then.

Ciao Cesar

February 2, 2010 1:54 PM
 

Soykan OZCELIK said:

Hi Cesar,
Congrulations i've tested 1st version and found it very successfull i believe at the next version will be very good specially "Send to Mail" option be done.
Soykan

Thanks a lot Soykan !
And thanks also for the turkish translation ! I'll include it in the next release.
February 2, 2010 3:22 PM
 

Soykan OZCELIK said:

#DEFINE PR_TURKISH

#IFDEF  PR_TURKISH
#DEFINE PR_MENUTOP        'İlk Sayfa'
#DEFINE PR_MENUPREV       'Önceki Sayfa'
#DEFINE PR_MENUNEXT       'Sonraki Sayfa'
#DEFINE PR_MENULAST       'Son Sayfa'
#DEFINE PR_MENUGOTO       'Sayfaya Git'
#DEFINE PR_MENUSHOWPAGES  'Sayfaları Göster'
#DEFINE PR_MENUPRINT      'Raporu Yazdır'
#DEFINE PR_MENUCLOSE      'Önizlemeyi Kapat'
#DEFINE PR_MENUTOOLB      "Araç Çubuğu"

#DEFINE PR_CBOZOOMWHOLEPG "Tüm Sayfa"
#DEFINE PR_CBOZOOMPGWIDTH "Sayfa Genişliği"
#DEFINE PR_CMDGOTOPGTTIP  "Sayfaya Git"

#DEFINE PR_ONEPGTTIP      "Tek Sayfa"
#DEFINE PR_TWOPGTTIP      "İki Sayfa"
#DEFINE PR_FOURPGTTIP     "Dört Sayfa"

#DEFINE PR_REPORTTITLE    "Rapor Önizleme..."
#DEFINE PR_ERR_CREATINGFILE "Dosya Oluşturma Hatası !" + CHR(13) + "Tekrar Deneyin.."
#DEFINE PR_ERROR          "Hata"

#DEFINE PR_MENUPROOF      "\<Minyatürler..."

#DEFINE PR_COPIES         "Kopya Sayısı"
#DEFINE PR_SAVEREPORT     "Raporu Kaydet"

#DEFINE PR_SAVEASIMAGE    "Image Dosyası Olarak Kaydet..."
#DEFINE PR_SAVEASPDF      "PDF Olarak Kaydet"
#DEFINE PR_SAVEASHTML     "HTML Olarak Kaydet"
#DEFINE PR_SAVEASRTF      "RTF Olarak Kaydet"

#DEFINE PR_SENDTOEMAIL    "Raporu e-mail olarak gönder"
#DEFINE PR_CLOSEREPORT    "Kapat"
#DEFINE PR_PRINTREPORT    "Yazdır"
#DEFINE PR_MINIATURES     "Minyatürleri Göster"
#DEFINE PR_GLOBALPREVIEW  "Genel Önizleme"

#DEFINE PR_AVAILABLEPRINT "Kullanılabilir Yazıcılar"

#DEFINE PR_GOTOPG_CAPTION PR_MENUGOTO
#DEFINE PR_GOTOPG_OK      "Tamam"
#DEFINE PR_GOTOPG_CANCEL  "Vazgeç"

#ENDIF
February 2, 2010 4:12 PM
 

Stefan Wuebbe said:

Cool!, thank you, Cesar

Hey Stefan,
Glad to see you here :-D
February 2, 2010 5:15 PM
 

Antonio said:

Gracias por tu Excelente trabajo Cesar.
Se pueden generar los PDF, HTML , RTF sin pasar por la vista previa?.
Es decir, generar un PDF directamente a disco..

Gracias Antonio por tus comentarios.
Si, seguramente se puede.
Todo lo que tienes de hacer es utilizar separadamente los ReportListeners especificos. Por favor mire el archivo "ReadMe" y podras encuentrar instrucciones para utilizar.
February 3, 2010 11:52 AM
 

Hyder said:

Great work simple and good looking
thank you very much, Cesar for sharing this

Thanks !
February 3, 2010 12:24 PM
 

Fabio Lenzarini said:

#IFDEF  PR_ITALIAN
#DEFINE PR_MENUTOP        'Prima pagina'
#DEFINE PR_MENUPREV       'Precedente'
#DEFINE PR_MENUNEXT       'Successiva'
#DEFINE PR_MENULAST       'Iltima pagina'
#DEFINE PR_MENUGOTO       'Vai alla pagina'
#DEFINE PR_MENUSHOWPAGES  'Visualizza pagine'
#DEFINE PR_MENUPRINT      'Stampa'
#DEFINE PR_MENUCLOSE      'Chiudi anteprima'
#DEFINE PR_MENUTOOLB      "Toolbar"

#DEFINE PR_CBOZOOMWHOLEPG "Tulla la pagina"
#DEFINE PR_CBOZOOMPGWIDTH "Larghezza pagina"
#DEFINE PR_CMDGOTOPGTTIP  "Vai a pagina"

#DEFINE PR_ONEPGTTIP      "Una pagina"
#DEFINE PR_TWOPGTTIP      "Due pagine"
#DEFINE PR_FOURPGTTIP     "Quattro pagine"

#DEFINE PR_REPORTTITLE    "Anteprima stampa..."
#DEFINE PR_ERR_CREATINGFILE "Errore nella creazione del file !" + CHR(13) + "Riprovare più tardi."
#DEFINE PR_ERROR          "Errore"

#DEFINE PR_MENUPROOF      "\
#DEFINE PR_COPIES         "Copie"
#DEFINE PR_SAVEREPORT     "Salva Stampa"

#DEFINE PR_SAVEASIMAGE    "Salva come immagine..."
#DEFINE PR_SAVEASPDF      "Salva come PDF"
#DEFINE PR_SAVEASHTML     "Salva come HTML"
#DEFINE PR_SAVEASRTF      "Salva come RTF"

#DEFINE PR_SENDTOEMAIL    "Invia la stampa per e-mail"
#DEFINE PR_CLOSEREPORT    "Chiudi stampa"
#DEFINE PR_PRINTREPORT    "stampa"
#DEFINE PR_MINIATURES     "Visualizza miniature"
#DEFINE PR_GLOBALPREVIEW  "Anteprima globale"

#DEFINE PR_AVAILABLEPRINT "Stampanti disponibili"

#ENDIF

Grazie Mille Fabio !!!
February 3, 2010 2:27 PM
 

Soykan OZCELIK said:

Hi Cesar,
day by day class is improving !
yes you're right The VFP community is amazing !!!
February 3, 2010 2:38 PM
 

Pero said:

Great work.

I have small problem: when I choose network printer and click to print, I got message "Report Preview was closed without saving or printing" and nothing is printed.

Any ideas?

Hi Pero,

Thank you very much, I've found the problem, and fixed the reported issue in version 1.08. Can you please get the new version and tell me how it goes ? Thanks in advance !

Cesar

February 3, 2010 3:17 PM
 

Joao Batista said:

Olá Cesar
Antes de mais parabéns pelo belo trabalho já feito, uso VFP9 SP1, ao mudar a traducao para Portugues/espanhol etc,  dá o seguinte erro ao fazer
clik com botão rato lado direito em cima do report, para aparecer o sub-menu

Array dimensions are invalid.
Line 778 in addbarstomenu():
oRef.ZoomLevel(11,1)= PR_CBOZOOMPGWIDTH

Obrigado
João Batista

Olá Joao,

Obrigado por testar. Como é que vc fez a mudanca de linguagem ? Em ingles ou em outra linguagem acontece o problema ? Vc conseguiria me passar todos os passos para reproduzir o problema ?

Obrigado

Cesar

February 4, 2010 2:46 AM
 

Saifuddin said:

Thanx Cesar, it works superbly !

BTW, I did'nt get any error message as defined by Vivek Deodhar in foxite thread.
Thanks

Saif

Thanks Saif !

February 4, 2010 7:50 AM
 

Soykan OZCELIK said:

Hi Cesar ,
do you have at your track list "send to excel" option ?

Hi Soykan,

Yes, I do have it ! In fact, we have 2 main options

1 - Use the ExcelListener class published in UT - requires MS Excel to generate output

2 - Export the data to XLS basic format, no formatting, just data.

What do you think ?

February 5, 2010 2:08 PM
 

Pero said:

Hi Cesar,

I still have problem with network printers. I have 2 network printers. In combobox first network printer is \\..., but second is \...
I changed code in cmbPrinters.Init to

FOR n = 1 TO ALEN(laPrinters)  -- I marked this "step" part &&STEP 2
lcItem = .List(n,1)
IF LEFT(lcItem,1) = "\"
.List(n,1) = "\\" + lcItem
ENDIF

lcItem = .List(n,2)
IF LEFT(lcItem,1) = "\"
.List(n,2) = "\\" + lcItem
ENDIF
ENDFOR


Now it works as expected.

Once again thanks for your efforts.

When you will include sending mail in your class?

 

Thanks for the fix !

In fact, the best fix would be to use:

FOR n = 1 TO .ListCount

Anyway, you've shown me where the source of the problem was.

About the "Send email" feature, I prefer to wait until I have all remaining issues solved. Many people are testing this in their environments. When I feel that this utility is ready with the currrent functions, I'll add new functions.

Thanks again for your support !

February 5, 2010 2:55 PM
 

jbinf said:

Olá César.
.. no seguimento do post anterior, só acontece nas outras linguagens, em Inglês funciona bem. (também acontece o mesmo na versão 1.08a)
Os passos para reproduzir são os seguintes
-Editar foxypreviewer.prg, acitivar  #DEFINE PR_PORTUGUES, e (*) nas outras linguagens.
-Correr o demostart
-Depois de aparecer o report, clicar com botão do rato direito, para aparecer o sub-menu com as opções da toolbar, e surge o erro.

Array dimensions are invalid.
Line 778 in addbarstomenu():
oRef.ZoomLevel(11,1)= PR_CBOZOOMPGWIDTH

Abraço
João Batista

Ola Joao Batista,

Obrigado pela mensagem, mas segui os passos que vc indicou, mas não deu o erro para mim. Voce esta usando os arquivos Report*.App corretos ? De todo modo, inclui uma adaptaçao nos fontes que faria a verificaçao previa no tamanho do array antes de forçar a traduçao. Por favor, baixe a versao 1.09 e me diga se resolveu, ok ? Caso contrario, gostaria que entrasse em contato direto para resolvermos esse problema.

Se continuar dando problema, abra o arq. FoxyPreviewer.Prg, e procure pelo texto "Joao Batista". E coloque um SET STEP ON dentro do loop, e me diga aonde aparece o problema.

Abraço ! 

February 5, 2010 11:32 PM
 

p_snitram said:

Óptimo trabalho! Poderoso e de utilização extremamente fácil. Até agora não encontrei nenhum problema, mas se me permite uma sugestão...
Utilizo nas minhas aplicações  as commandBars de Arg Software, e nestas aplicações a toolbar de estilo antigo não liga muito bem. Há alguma forma de não utilizar essa toolbar e substituí-la por uma barra de controlos anexada directamente no FormPreviewer?

Paulo

 

Ola Paulo,

Com certeza, mas para isso você deverá substituir todos os botões da toolbar pelos da ARG Soft. Veja no codigo da FoxyPreviewer, aonde incluo os novos botoes, eles usam uma classe definida ali mesmo. Tente alterar a classe base desses botoes para a sua, e me diga o que vc obtem. Pode ser que de certo !

Nao tenho como ser mais especifico, pois nao tenho essas classes.

Boa sorte !

February 5, 2010 11:53 PM
 

Soykan OZCELIK said:

Hi Cesar,

at least first ;
we can begin with basic format just data then can improve with excelListener class as you pointed.

i didnt test ExcelListener class which is published in UT i'll look it and share my comment here to use it or not.

Cheers

February 6, 2010 3:17 PM
 

Soykan OZCELIK said:

Hi Again Cesar,
i've just download and tested Alejandro Sosa's ExcelListener Class its seems very good as basic output logically end users wants to see frx view at their excel files.

my opinion now second way (ExcelListener Class)

Cheers

Hi Soykan,
Thanks a lot for your testings and opinions. Yes, I'll add both options. If the user has Excel installed, it will use Office automation. Otherwise, a simple XLS table will be generated from the main report cursor.
I'm already working on it, for full functionality, that report listener needs some tweaking, and a small fix to allow exporting images.

Regards
Cesar
February 6, 2010 3:26 PM
 

Elkin Uribe said:

Te felicito por el excelente trabajo.  Lo dificil lo haz hecho facil

Te comento que anexe la clase excelListener y funciona bien a excepcion de que no exporta las imagenes, solo el texto.

Como se podria hacer para que uno pueda imprimir, salvar y el reporte slo se pueda cerrar por el boton de salir ?

Muchas gracias

Hola Elkin,

Gracias por tus comentarios amables.
Si, pretendo implementar una propiedad para que se quede abierto el reporte despues que se salva lo mismo. Pero el resultado no será muy bueno, porque para generar los HTML, RTF, XLS o PDF, la ventana del reporte necesita ser completamente cerrada.
Entonces existira la necesidad de hacer con que el reporte sea cargado novamiente, compreendes ?
Un abrazo
Cesar
February 6, 2010 3:53 PM
 

Zen Tes said:

Hola Cesar, excelente trabajo. Intento deshabilitar el boton de imprimir en la barra de herramienta y me sale un error, quiza sea un bug.

SET PROCEDURE TO FoxyPreviewer.prg ADDITIVE
LOCAL loReport
loReport = CREATEOBJECT("PreviewHelper")

WITH loReport as ReportHelper
.AddReport(_Samples + "\Solution\Reports\wrapping.frx", "NODIALOG")
.lPrintVisible = .f.  && <-- Si es .T. va bien...
.RunReport()
endwith

saludos desde Tacna Perú

Hola Zen Tes,
Muchas gracias !
Acabo de subir una nueva version, con la correccion.
Saludos
Cesar
February 6, 2010 4:04 PM
 

João Batista said:

Olá Cesar,
A tua correção resultou, as linguagens no sub-menu já funcionam bem.
Agora surge outro problema ao gravar em RTF com a classe _gdiplus.vcx.
Já a retirei do ffc (.vcx/.vct) e coloquei no directorio FoxyPreviewer e não adiantou, dá sempre o erro que não encontra a _gdiplus, o erro deve partir da classe "rtfreportlistener", metodo "outtortf" na seguinte linha,
"loImage = NEWOBJECT("GpImage", "_GdiPlus.vcx", HOME() + "ReportOutput.App")"
utilizo VFP9 SP1.

Ao imprimir para PDF também não coloca as imagens no PDF criado.

Abraço
João Batista

Salve João !
Obrigado pelos testes.
Dá o mesmo erro se seu report não tiver imagens ?

Você está usando o ReportOutput do VFPX (CodePlex) ou o original ? Qual a versão do VFP vc usa ? SP2 ?

Gostaria de mais um favor seu:
Por favor, coloque no seu código, antes de chamar a FoxyPreviewer o seguinte:

SET CLASSLIB TO ReportOutput.App

E me conte se funciona.
Na verdade, eu estou tentando diminuir o tamanho dos executáveis, removendo a classe _GdiPlus.vcx do projeto, pois a mesma se encontra dentro do ReportOutput.App, entendeu ?

Se não der certo o seu teste, eu vou desistir. Ou incluo essa classe no projeto, ou faço chamadas diretas a gdiplus.dll pra economizar espaço.
Fico no aguardo !
Um abração e obrigado antecipadamente !

César
February 8, 2010 9:47 PM
 

João Batista said:

Olá Cesar
Gravar em RTF,
- "Dá o mesmo erro se seu report não tiver imagens ?" - Não funciona OK
- "Você está usando o ReportOutput do VFPX (CodePlex) ou o original ? Qual a versão do VFP vc usa ? SP2 ?" - Estou a usar o ReportOutput original, a versão do FOX que utilizo é a 9 SP1
- "SET CLASSLIB TO ReportOutput.App" - Dá erro na compilação Unable to find Visual Class Library REPORTOUTPUT, mas está dentro do path de compilação.

Vou experimentar a do CODPLEX, depois digo-te alguma coisa.

Abraço,
João Batista
February 8, 2010 10:43 PM
 

João Batista said:

Boas César
No seguimento do POST anterior, fiz o download do VFPX do VFP9 Reporting APPs v9.2.1, e a gravação RTF com imagens já funcionou, OK.

Agora fica só a faltar o PDF com imagens :)

Abraço,
João Batista

Olá João,
Muito obrigado pelos testes !
É muito louco isso, parece que há diferenças significativas entre as versões do ReportOutput.App no que diz respeito à acessibilidade das classes internas.
Vou converter tudo num único APP, que conterá todas as classes necessárias, o que definitivamente (eu espero) que resolverá o problema nos executáveis.
O inconveniente é que este APP se tornará meio "grande", algo como 1MB, pois conterá os arquivos da pasta FFC, o _GdiPlus.vcx e o _ReportListener.vcx.

Um abraço !
César


Atualizado:

João,

Preciso de mais um favor seu:

Por favor, baixe novamente a mais recente versão da classe, v1.11, e tente compilar novamente.

Acho que agora vai dar certo !

Obrigado antecipadamente !

Abraço
César
February 8, 2010 11:53 PM
 

Soykan OZCELIK said:

any suggestion more Cesar from me :)
you can add find button ! i remember there was a sample about it but i couldnt find now

Muchos Grasias :)
Hi Soykan,

Thanks for your inputs.
Yes, I already thought of that too. I have 2 main options:
There's a version from Dorin Vasilescu, but creating a new ReportPreview.App file, and one from Doug Hennig, using an external class. I hope to test them both, and see how we could put that functionality in our tool.

Regards

Cesar
February 9, 2010 1:28 AM
 

Edwin Duran said:

Estimado Cesar

He agregado la clase para convertir a excel, en base al link
http://portalfox.com/index.php?name=News&file=article&sid=2322&mode=nested&order=0&thold=0
hice una modificacion en el foxypreviewer.prg en el siguiente metodo

Procedure CallReport(toListener As ReportListener, tlKeepHandle)
* Executar o relatório
Local lcReport, lcClauses, loListener As ReportListener
If Vartype(toListener) = "O"
loListener = toListener
Else
loListener = This.oListener
ENDIF

*Aqui fue que hice mi modificacion

IF NOT PEMSTATUS(loListener,"WaitForNextReport",5)
AddProperty(loListener,"WaitForNextReport")
endif

*******
Probemas encontrados sin resolver

1) Al exportar las imagenes no se exportan
2) En este ejemplo hay tres reporte, estos se habren en libros diferentes no en un mismo libro.

me gustaria saber a que correo te puedo enviar esto, para tu visto bueno y
ver si hay otra clase de excel que exporte mejor.

Cuando pienzas introducir lo del mail

saludos
Edwin

Hola Edwin,
Gracias, puedes enviar para vfpimaging at hotmail dot nospam com.
Saludos
Cesar
February 9, 2010 4:18 PM
 

João Batista said:

Boas César,

Para já está a funcionar bem, (VFP9SP1, ReportOutput VFPx), o PDF já imprime as imagens, com os exemplos que vêm e com os testes que já fiz está tudo OK.

Vou agora agregar aos meus programas, e logo te passo a informação se tudo está OK.

Obrigado pelo óptimo trabalho, alguma coisa em que possa ajudar, estou disponivel.

Agora só falta mesmo a exportação para EXCEL .... lol ... :)

Um Abraço,
João Batista

Olá João Batista,

Obrigado mais uma vez.

Estarei publicando mais tarde uma nova versão, ou melhor, duas versões. Uma delas será um APP compilado, que já conterá TODOS os arquivos necessários para rodar a FoxyPreviewer, incluindo a biblioteca de PDF, as classes _ReportListener e a _GdiPlus entre outras. Vai facilitar a instalação, pra quem não está acostumado a lidar com essas classes.
O único inconveniente será o tamanho do APP, que ficou grande, mas englobando tudo.
Também terá como sempre um arquivo separado, com todos os fontes necessários, permitindo aos usuários alterarem as configurações básicas, linguagem, imagens, etc.

Desse jeito, não haverá mais aqueles problemas que muita gente teve ao compilar, de classes não encontradas, etc.

Um abraço !
February 9, 2010 11:42 PM
 

rosemaria said:

really informative article. I will surely try this stuff..thanks
February 10, 2010 9:30 AM
 

João Batista said:

Boas César,

Está a dar o seguinte erro na linha 1020
Property TOPFORM is not found
Line 1020 in show()
llNowait = This.PreviewForm.TopForm

Já dava nas versões antigas, só que não ligava.

Abraço,
João Batista

Muito Obrigado !
Por favor baixe a versao 1.16 que ja possui a correcao! Abraco !
February 10, 2010 9:32 PM
 

TopeKie said:

Hola!

¿Y sabes cómo hacer para que no salgan los dos pequeños cuadraditos en los saltos de carro de los memos cuando exportas a PDF con la haru DLL...?

Saudinhos.
February 11, 2010 12:38 PM
 

Fabio Lenzarini said:

Great Cesar!
my only problem is when i generate a PDF or RTF file.
I've a customized reportlistener class, the preview and the "save as png" work fine, but the pdf and the rtf are saved without the customization in my listener.

SET PROCEDURE TO FoxyPreviewer.App ADDITIVE
LOCAL loReport as "PreviewHelper" OF FoxyPreviewer.App"
loReport = CREATEOBJECT("PreviewHelper")
WITH loReport as ReportHelper
.cDefaultListener = 'myreplisten_directives'
.AddReport(lsReportToRun, "RANGE 1,1 NODIALOG") && FRX File, Clauses
ENDWITH
cCommand = "loReport.RunReport()"


grazie di esistere

Hello Fabio,
Thanks for your comments and support. RIght now FoxyPreviewer does not support other report listeners working together.
The previews work nice, but exporting to RTF or PDF will not work. In fact, I'll have to make some more changes in these classes in order to make them allow successors listeners.
Another issue is that if your listener uses the "Render" event for direct drawing contents in the report, like FJListener and WaterMarkListener that I created it will fail.
But I have some ideas to make them work, and I hope to introduce the needed modifications very soon.
Ciao
Cesar
February 11, 2010 3:58 PM
 

Jorge Luis Vejerano said:

Gracias por la clase de estimado César!

He probado la clase y he ido añadido algunas cosillas adicionales
para la exportación a Excel. Excelente trabajo amigo.

En la empresa tengo varias impresoras de matriz y por lo regular para ahorrar tiempo le pongo a todas ellas que use los controladores ibm propinter.  Con la clase he tenido que buscar los controladores de cada impresora para que la impresión quede bien.

Entonces, hay algo que no he podido resolver: en algunas impresoras de matriz como la panasonic KX-P3196, aún con los controladores del web de panasonic, la impresión resulta un poco diferente de lo esperado.  El tamaño de las fuentes es más pequeño y por tanto algunos documentos como facturas y recibos quedan "descuadrados". Lo mismo sucedía con una Okidata 420, pero se resolvió con el controlador actualizado.

¿Me podrías orientar con esto? No entiendo porqué las fuentes cambian cuando utilizo la clase FoxyPreviewer.

Saludos y gracias por tu esfuerzo y dedicación.


Hola Jorge Luis,
Necesito de mas detalles...
Como funciona la impresion en un reporte simples, pero con SET REPORTBEHAVIOR 90 ?
Pienso que este no es un problema de FoxyPreviewer, pero del sistema de reportes de VFP9.
Aguardo tu contestacion !
Saludos
Cesar
February 11, 2010 5:55 PM
 

Jack said:

Hi.  Verry cool tool!

May I do a suggestion?  When we use the "Print" button and/or the "Save as X" button, there could be a form offering some more parameters like printing page 7 thru 10 only. Or it may be in any other form you may imagine...  I would just like to be able to select pages to print.  Also, this is cool that you can define language...  but the way you did it is not practical for multi language support in custom applications (I do many applications that supports both English and French...).

Also, do you have a suggestion about this problem:  My application have a custom top level form.  When I call a report preview, the report works well but the toolbar is disabled.  I can fix the problem by showing the Foxpro Screen (work pretty well but I don't normally use it) or by adding a NOWAIT option to the REPORT FORM command (then the application runs as if the report was done and all menus become availables - not desirable).

Thanks.

Hi Jack,

Thanks for the suggestion, I hope to add that functionality in the future.

About the TopLevel issue, it's a VFP9SP2 bug, that fortunately has already a fix.

Go to the link below, and get the latest and cumulative hotfix, that deals with this issue.
http://code.msdn.microsoft.com/KB968409

Please test it and tell me how it goes !
February 11, 2010 9:39 PM
 

Soykan OZCELIK said:

Hi Cesar,
update also screen shoots(specially toolbar) to give ideas visitors
February 12, 2010 12:38 PM
 

Soykan OZCELIK said:

Hi Cesar,
some of our Turkish programmer report me that bug like below

when marked with (*)  This.PreviewForm.TopForm line .prg version works w/o error
but .app version normally not :(

i wanted to report this issue
regards,




Hi Soykan
Thanks a lot for the support that you've been providing to other users. I've fixed it in v1.16. Can you please tell them to test the new version?
Thanks in advance !
February 12, 2010 12:40 PM
 

Juan PAblo said:

Antes de exibir na tela, está dando um erro tratado "Property TOPFORM is not found".
Isso acontece no exemplo de vocês também.
Alguém pode me dizer se é bug ou se estou fazendo algo errado?

sds,
Pablo.

Obrigado ! Por favor baixe a versao 1.16 que ja possui a correcao! Abraco !
February 12, 2010 8:19 PM
 

Kevin Baugh said:

João Batista

Great idea I would love to see Excel to...:-)

The other thing that I would LOVE to see is Cesars Watermark your reports with GdiPlusX code included http://weblogs.foxite.com/vfpimaging//archive/2007/07/17/4405.aspx



Thanks Kevin for testing ! This will oblige me to add some tweaks in both classes, FoxyPreviewer and WaterMarkListener. This will take some time, but it is doable. I'll try to work on it soon.
February 14, 2010 11:06 PM
 

Soykan OZCELIK said:

>Can you please tell them to test the new version?
i've do it :)

Thanks a lot !
February 15, 2010 9:28 AM
 

Soykan OZCELIK said:

also they are waiting excited excel output and mail output options...

:-D , First I need to be sure that what we have so far passed through all tests and environments :-D.
Soon I'll upload a new version.
February 15, 2010 3:36 PM
 

Soykan OZCELIK said:

Yes I Know :) only wanted to tell this project found very usefull by users and exactly strongly needed.
February 15, 2010 9:21 PM
 

João Batista said:

Boas César
Ao testar V1.16, ao gravar para RTF, surgem dois problemas,

1º Total de Páginas do Report surge como o Nº de página (Ex: 3-1, 3-2-3-3, deveria ser 1-3, 2-3, 3-3)
2º Cria dentro do mesmo Report, 2 cópias do mesmo.

em HTML, dá o seguinte erro "Unknown member FXS"

Testei o PDF e está OK

Abraço
João Batista

Obrigado João !
Acho que você está rodando o mesmo report 2 vezes para obter o numero total de paginas, correto?
Eu acho que o RTF Listener original não cuida desta situaçao, vou abri-lo mais tarde e vou tentar corrigir. Uma dúvida: você está juntando 2 relatórios ou o erro ocorre com apenas um relatório ? (Quero saber se vc esta chamando o metodo .AddReport() mais de uma vez ).
O problema da geraçao do HTML acho que é mais simples, no final do dia espero subir uma nova versao com as correçoes.
Muito obrigado novamente, vc está fornecendo GRANDE ajuda !
Abraço !
February 15, 2010 11:22 PM
 

João Batista said:

Boas César,

- "Acho que você está rodando o mesmo report 2 vezes para obter o numero total de paginas, correto? " - Não, apenas uma vez (utilizo as seguintes variavéis no Report, _pageno  e _pagetotal .

- " Uma dúvida: você está juntando 2 relatórios ou o erro ocorre com apenas um relatório ? "  - Não estou juntando 2 relatorios, o erro ocorre apenas com 1 Relatório, e é facil de ver pois em PDF funciona OK.

Os testes são sempre com o mesmo relatório nos 4 tipos de gravação.

Se quiseres passa-me um e-mail e envio-te os exemplos.

Abraço e bom Carnaval,
João Batista

Olá João,
Obrigado !
Ja consegui reproduzir aqui.
Ocorre o seguinte: toda vez que um report usar a variavel _PAGETOTAL, o relatorio é executado 2 vezes, sendo que a 1a é para saber a quantidade de paginas e a 2a é a que efetivamente gera o "Output". Ja corrigi isso para o RTF.
Para o HTML, acho que ajustei tb, era outro problema.
Por favor, teste novamente a versao 1.17, que lançarei daqui a pouco.
De todo jeito abaixo esta meu correio:
Abs !

vfpimaging at hotmail ponto com
February 16, 2010 1:37 PM
 

Ali Riza KANDILZADE said:

This is a wonderful program. But I have a problem. I can not manage to change the page size to A4 or something else when saving as PDF.
Thank you

Hello Ali,
Please provide more details about the PDF generation. Are you using a virtual printer, or are you working with the "Save as" button from FoxyPreviewer ?
Was your report originally generated using the A4 paper ?
February 17, 2010 9:43 AM
 

Cesar said:

João Batista,

Por favor baixe este arquivo:
http://weblogs.foxite.com/files/vfpimaging/foxypreview/foxypreviewer_test.rar

Ele traz uma versão atualizada da FoxyPreviewer.App, com as últimas correções.
Por favor descompacte e substitua a sua última versão da FoxyPreviewer.App

Correções:
- Na geração de PDF:
 . Geração de imagens suportada para todos tipos de imagens.
 . Objetos tipo "Shape" transparentes agora respeitam a transparencia.

- Na geração de RTF:
 . Corrigidos valores PAGENO e PAGETOTAL
 . Report não é mais gerado 2 vezes caso PAGHETOTAL seja utilizado

- Na geração de HTML
 . Correção na geração do HTML, incluída nova classe nos fontes da FoxPreviewer.

Aguardarei ansiosamente pelos seus resultados antes de prosseguir !
Abraço !

César
February 17, 2010 11:00 AM
 

João Batista said:

Boas César

O Ficheiro tem só o APP, se possivel envia o prg e as classes, tenho a estrutura montada na aplicação para utilizar desta forma e não a partir do APP.

Também não tenho nenhum exemplo de como utilizar o APP, e alterar a linguagem e parametros da toolbar dos reports.

Fico a aguardar,

João Batista

às ordens :-D !
Por favor, teste a versão 1.18 que acabei de subir.
Obrigado novamente!
February 17, 2010 10:19 PM
 

thompr600u said:

ok
February 19, 2010 9:02 AM
 

Aureo Neves said:

Utilizo esta rotina para visualização dos relatorios de nosso sistema,e funciona perfeitamente.

Olá Aureo,
Muito obrigado pelo retorno !
É sempre importante saber se as coisas estão funcionando como o esperado.
February 20, 2010 10:55 PM
 

Luis Gonzales said:

Hola, excelente trabajo. Seria posible incluir en un solo formulario, el previo como la barra de herramientas, de manera que quede como:
http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,26acb331-c0fa-4e67-bd06-bb7569e2a3a3.aspx

De manera que se pueda aplicar diversos temas de color tanto al contenedor como la barra de herramientas
Gracias por la respuesta

Si, es posible, pero noo directamente. Tienes los codigos fuentes, y teneras que hacer las modificaciones necesarias, como crear una nueva ventana para los reportes, y anadir los objectos de navegacion, etc...

Saludos

February 21, 2010 3:33 AM
 

ashkan_gorg said:

i can not add persian(farsi) font to save pdf
font name=BMITRA.TTF
pdf language is persian(farsi)
February 21, 2010 7:54 AM
 

ashkan said:

i can not add persian(farsi) font to save pdf
font name BMITRA.TTF
report language persian(farsi)
February 21, 2010 9:44 AM
 

Soykan OZCELIK said:

Hi Cesar,
Great job !
with the new ( v 1.120 ) improvements now its working more good...

- excel output option added great value to this working
- next step now email output :)

Thanks Soykan,

But this still needs a lot of testing. Are the other issues that you reported gone ?

February 22, 2010 10:31 AM
 

Soykan OZCELIK said:

yes , sure need a lot of testing.
yes other issues that i reported gone.

Thanks a lot !

February 22, 2010 12:43 PM
 

Ozcan said:

Hi Cesar, Thank you for the great project.

While rebuilding project there is an error:

Compiling \foxypreviewer\pr_excellistener.vcx
Error in global include file: Include file '\foxypreviewer\frxpreview.h' is not found.

Hi Ozcan,

Thanks, I'll upload later a new version with that file included. Sorry for the inconvenience.

February 22, 2010 2:24 PM
 

Ponziano Ferroni said:

Prezado Cesar,
 
   Existe alguma forma de implementar essa rotina abaixo para que a visualização do report use a tela inteira, independente do tamanho do form que a chamou? Atualmente eu uso assim, nas visualização em tela!!

Local loListner As ReportListener
loListener = .Null.
Do (_ReportOutput) With 1, loListener
loListener.Quietmode= .T.

PreviewReport = .Null.
Do (_ReportPreview) With PreviewReport
PreviewReport.ZoomLevel = 5
PreviewReport.ToolbarIsVisible = .T.

PreviewReport.SetExtensionHandler(Newobject("PreviewExtension"))
loListener.PreviewContainer=PreviewReport

Report Form "nomereport.frx" To Printer Prompt Preview Noconsole Object loListener


Define Class PreviewExtension As Custom
  Procedure AddBarsToMenu( cPopup, iNextBar )
     * Remove the option to change page count:
     Release Bar 8 Of (m.cPopup)
  Endproc

  Procedure Show( iModal )
     This.PreviewForm.oReport.CommandClauses.InWindow = ""
     This.PreviewForm.WindowState = 2
  Endproc

  Procedure AddBarsToMenu( cPop, iNext )
  Endproc

  Procedure HandledKeyPress( nKey, nMod )
     Return .F.
  Endproc

  Procedure Paint()
  Endproc

  Procedure Release()
     Return .T.
  Endproc
Enddefine

Salve Ponziano !

Para a proxima versão (a partir da 1.21), estará incluída a properiedade nWindowState, onde: 0 = Normal; 2 = Maximizado. Assim fica bem simples, né mesmo ?

Abs !

 

February 22, 2010 6:29 PM
 

Victor B said:

Hola, le felicito por el exelente trabajo que se ha tomado. Al guardar en excel la primera página me copia entre linea y el resto de la pagina sin problema.
February 23, 2010 9:44 PM
 

Nikola Kesic said:

Exelent job!
Suggestion: Dock property - for docking toolbar on report preview form

Thanks !

I'll add this property in the next release :-D

Done ! See the new propert "nDockType"- .F. uses resource, or numeric, -1 to 3, usinf default Docking values

February 24, 2010 2:55 AM
 

João Batista said:

Boas Cesar,

Desculpa só agora responder, mas foi impossivel fazê-lo antes.

Ao testar a versao 1.22 surge o seguinte erro ao exportar para HTML e EXCEL,

Varialble "LISTENER_CALLDYNAMICMRTHOD_CHECK_CODE is not found
excellistener
Error: 12
Method: init
Line: 18 e line 22
ThisAddProperty("CallEvaluateContents", LISTENER_CALLDYNAMICMRTHOD_CHECK_CODE)

Abraço
João Batista

Olá João,

Não há nada com que se desculpar. Eu é que agradeço a colaboração. Esse erro deve ser devido a falta de um arquivo de header *.H . Vou verificar mais tarde e lhe retorno com a solução.

Abs !

*** ATUALIZAÇÃO ***

João, esse erro esta ocorrendo pela falta do arquivo frxpreview.h

Assegure-se de coloca-lo em seu projeto, pode ser como "Excluded"

February 24, 2010 6:21 PM
 

Soykan OZCELIK said:

Hi Cesar ,
a friend asked to me that ; is it possible to add "fit to page" option to this working for all report columns like excel.

or how to make this goal ?
some users dont want to send their reports to excel and want to see on frx report.

 

Hi Soykan,

1 - Fit to Page... What exactly do you mean ? You can predefine the Zoom options. See the available values for the property nZoomLevel. Use the values 10 for "fit to page" or 11 for "Page width"

2 - Disable saving to Excel: I've recently added 5 new properties, that allow you to disable saving in some formats. Just set any of the properties below to false to disable that output type in the menu:

lSaveAsImage = .T.
lSaveAsHTML  = .T.
lSaveAsRTF  = .T.
lSaveAsXLS  = .T.
lSaveAsPDF  = .T.

Hope that helps !

February 25, 2010 5:08 PM
 

ashkan_gorg said:

Hi Cesar.
When I report to the Persian PDF'll save all the obscure fonts are displayed.
How can I add fonts to Persian Farsi to reports while saving PDF files to display properly.
Thankful

Hi Ashkan,

I really don't know. But I'll try to find some way to make it work. Keep in touch, I hope to solve this in the next releases.

Regards

Cesar

February 27, 2010 7:36 AM
 

Soykan OZCELIK said:

Hi Cesar,

Hi Soykan,

1- as you know at the .frx reports as paper type portrait or landscape, we can't fit a lot of column to the reports so that generally we are exporting our queries to Excel then at printer dialog like most of user we prefer "fit to page" option and then printing or designing our frx reports with a few columns for this reason.
so that i wanted to ask .

I see, so you want FoxyPreviewer to reorganize the fields in your report? Possible it is, but would require a lot of extra work, and each report is quite different from the other... My goal here is just to provide some easy options for people to export their reports to other formats. FYI, I've already started including the email stuff :-D


2-Disabling options all ready i know :)

Regards

Cesar

February 27, 2010 12:42 PM
 

Soykan OZCELIK said:

>> FYI, I've already started including the email stuff :-D

this is the good news hearing from you :)
February 27, 2010 3:31 PM
 

João Batista said:

Olá César,
Olá João :-D


>>João, esse erro esta ocorrendo pela falta do arquivo frxpreview.h
>>Assegure-se de coloca-lo em seu projeto, pode ser como "Excluded" "

Ok, funcionou.

Ótimo !


Uma questão, o campo DATE aparece sempre como datetime ex: 25-02-2010 00:00:00.

Alguma maneira de só aparecer DATE com ex: 25-02-2010.

Abraço,

João Batista

Não consegui entender esse problema com o DATE, vc poderia explicar melhor ? Em que situação aparece ? Ele aparece em algum tipo de saída ? Em RTF ? PDF ? Mande mais detalhes, pls !

Abraço !

February 27, 2010 9:07 PM
 

ashkan_gorg said:

Hi Cesar,

I think if you let time storage report PDF to use the same fonts used in the report. In this case View user font problem after saving will. It's the best solution for this problem is or part of the user able to design the desired fonts in your PDF document storage section to add.

Thanks
February 28, 2010 11:27 AM
 

Ponziano said:

Cesar,

   Ao executar a rotina de geração de PDF ele está mostrando alguns códigos da conversão do report no fundo do formulário que o chamou, executei o teste da seguinte maneira:

LOCAL lnType
lnType = 1 && 1 = normal PDF, 2 = Image
    Local loListener As "PdfListener" Of "PR_Pdfx.vcx"
loListener = NewObject('PdfListener', 'PR_PDFx.vcx')
loListener.cCodePage="CP1252" &&CodePage

loListener.cTargetFileName = Forcepath("teste.PDF", Sys(2023))
loListener.QuietMode   = .T.
loListener.lCanPrint   = .T.
loListener.lCanEdit    = .T.
loListener.lCanCopy    = .T.
loListener.lCanAddNotes= .T.
loListener.lEncryptDocument = .F.
loListener.cMasterPassword  = ""
loListener.cUserPassword    = ""
loListener.lOpenViewer      = .F.
       Report Form "teste.frx" Object loListener

  Executei dentro da sua classe também e apresenta o mesmo problema no PDF, não sei o que posso estar fazendo de errado....

Ola Ponziano,

Obrigado pelos detalhes, vou averiguar e te retornarei assim que possivel.

Abs !

February 28, 2010 1:46 PM
 

Luis Gonzales said:

Hola, estuve compilando y me surgieron 2 problemas:

#DEFINE PR_SAVEASRTF "Guardar como XLS"
Error in line 159: Constant is already created with #DEFINE.

Pongo la opción de no recompilar los archivos y me genera el app, pero el formulario  de la opción de "Ir a pagina" me sigue saliendo en Ingles.

Hola Luis,

Gracias, hubo un pequeño bug en la traducción al español, que me fijo. Por favor, descargue de nuevo y me diga cómo va! Puedes compilar de nuevo, simn problemas al espanol, pero no se olvide de eliminar (comment ***) la definición de idioma Inglés y quite el "*" de la española en FoxyPreviewer.Prg
Espero que ayude!

Saludos

Cesar

March 1, 2010 6:12 PM
 

foxpro.catalyst ?? » Blog Archive » FoxyPreviewer said:

March 2, 2010 4:37 AM
 

Cesar Chalom said:

March 2, 2010 1:50 PM
 

Cesar Chalom said:

March 2, 2010 1:50 PM
 

MaJohn said:

Great work!!

How to instantiate the previewer as TopLevel Form ?
It's possible?

John

At this moment, you can run it as Top-Level if your caller is inside another Top-Level form. Try also using the "NOWAIT" clause.

March 2, 2010 6:42 PM
 

Cesar said:

Hi Ashkan,

>>i can not add persian(farsi) font to save pdf
>>font name=BMITRA.TTF
>>pdf language is persian(farsi)

>>When I report to the Persian PDF'll save all the obscure fonts are displayed.
>>How can I add fonts to Persian Farsi to reports while saving PDF files to display
>>properly.

>>I think if you let time storage report PDF to use the same fonts used in the
>>report. In this case View user font problem after saving will. It's the best
>>solution for this problem is or part of the user able to design the desired fonts in
>>your PDF document storage section to add.


I talked about that with Luis Navas, the creator of the PDF wrapper classes that FoxyPreviewer uses, and he suggested that the source of the problem may be the CodePage.

If you have the same problem, please open the file FoxyPreviewer.Prg, look for line of code where you have:

loListener.cCodePage="CP1252" && CodePage

and replace it with
loListener.cCodePage="CP1256" && CodePage

Please let me know it that works. If positive, I'll create a specific property in the main class for you to use it.

Regards

Cesar
March 5, 2010 2:36 PM
 

Luis Fiallos said:

Excelente trabajo!!,

Muchas gracias Cesar por tu excelente trabajo y por ponerlo a disposición de la comunidad. El editor WYSIWYG se ve genial !! estaré pendiente de las actualizaciones.
Por cierto, en la imagen pareciera que solamente se puede adjuntar un archivo, sería bueno poder adjuntar varios archivos ademas del reporte.

Gracias Cesar!!
March 7, 2010 4:43 PM
 

Nick Porfyris said:

Great work!
I send the Greek translation...

#DEFINE PR_GREEK

#IFDEF  PR_GREEK
* Set the CodePage for this file =1253 (Greek Windows)...
#DEFINE PR_MENUTOP        'Ðñþôç Óåëßäá'
#DEFINE PR_MENUPREV       'Ðñïçãïýìåíç'
#DEFINE PR_MENUNEXT       'Åðüìåíç'
#DEFINE PR_MENULAST       'Ôåëåõôáßá Óåëßäá'
#DEFINE PR_MENUGOTO       'ÌåôÜâáóç óå Óåëßäá'
#DEFINE PR_MENUSHOWPAGES  'ÅìöÜíéóç Óåëßäùí'
#DEFINE PR_MENUPRINT      'Åêôýðùóç ÁíáöïñÜò'
#DEFINE PR_MENUCLOSE      'Êëåßóéìï Ðñïåðéóêüðéóç'
#DEFINE PR_MENUTOOLB      "ÅñãáëåéïèÞêç"

#DEFINE PR_CBOZOOMWHOLEPG "Ïëüêëçñç Óåëßäá"
#DEFINE PR_CBOZOOMPGWIDTH "ÐëÞñåò ÐëÜôïò Óåëßäïò"
#DEFINE PR_CMDGOTOPGTTIP  "ÌåôÜâáóç óå Óåëßäá"

#DEFINE PR_ONEPGTTIP      "Ìéá Óåëßäá"
#DEFINE PR_TWOPGTTIP      "Äõï Óåëßäåò"
#DEFINE PR_FOURPGTTIP     "ÔÝóóáñåò Óåëßäåò"

#DEFINE PR_REPORTTITLE    "ÁíáöïñÜ Ðñïåðéóêüðéóçò..."
#DEFINE PR_ERR_CREATINGFILE "Áðïôõ÷ßá äçìéïõñãßáò áñ÷åßïõ !" + CHR(13) + "Ðáñáêáëþ äïêéìÜóôå ðÜëé áñãüôåñá."
#DEFINE PR_ERROR          "ËÜèïò"

#DEFINE PR_MENUPROOF      "\<Ìéêñïãñáößåò..."

#DEFINE PR_COPIES         "Áíôßãñáöá"
#DEFINE PR_SAVEREPORT     "ÁðïèÞêåõóç ÁíáöïñÜò"

#DEFINE PR_SAVEASIMAGE    "ÁðïèÞêåõóç ùò áñ÷åßïõ åéêüíáò..."
#DEFINE PR_SAVEASPDF      "ÁðïèÞêåõóç ùò PDF"
#DEFINE PR_SAVEASHTML     "ÁðïèÞêåõóç ùò HTML"
#DEFINE PR_SAVEASRTF      "ÁðïèÞêåõóç ùò RTF"
#DEFINE PR_SAVEASXLS      "ÁðïèÞêåõóç ùò XLS"

#DEFINE PR_SENDTOEMAIL    "ÁðïóôïëÞ áíáöïñÜò ìÝóù e-mail"
#DEFINE PR_CLOSEREPORT    "Êëåßóéìï ÁíáöïñÜò"
#DEFINE PR_PRINTREPORT    "Åêôýðùóç ÁíáöïñÜò"
#DEFINE PR_MINIATURES     "ÅìöÜíéóç Ìéêñïãñáöéþí"
#DEFINE PR_GLOBALPREVIEW  "ÊáèïëéêÞ Ðñïåðéóêüðéóç"

#DEFINE PR_AVAILABLEPRINT "ÄéáèÝóéìïé ÅêôõðùôÝò"

#DEFINE PR_GOTOPG_CAPTION PR_MENUGOTO
#DEFINE PR_GOTOPG_OK      "ÏÊ"
#DEFINE PR_GOTOPG_CANCEL  "Áêýñùóç"

#DEFINE PR_PRINTINGPREF   "ÐñïôéìÞóåéò Åêôýðùóçò"
#ENDIF
March 14, 2010 1:57 AM
 

Nick Porfyris said:

For the Greek translation I forgot to add this:
#DEFINE PR_NONENGLISH
March 14, 2010 12:22 PM
 

ozcan said:

Hi Cesar,
I read your comment below about using Foxypreviewer in EXE file and accessing FRX files from EXE. But I get 'File reportoutput.app doesn't exist' error. I include FoxyPreviewer.APP and FoxyPreviewerCaller.PRG into my project as you mentioned. There is no problem when running in VFP.
Thanks.


Hi Ozcan,

No!

The "ReportOutput.app" and "FoxyPreviewer.App" MUST NOT be included in your project !!! Just put them in a location that can be found by your EXE. Look at the Distribution folder for a project sample. Also check the puclic variable "_REPORTOUTPUT" it needs to have the FULLPATH() for the ReportOutput.App file !

Please let me know if you have any other issues with this

Regards

Cesar 

March 15, 2010 4:23 PM
 

Nick_Porfyris said:

For the Greek translation add also this:
#DEFINE PR_CBOZOOMTTIP [Áõîïìåßùóç] && New...

... and after:
* Translate toolbar buttons ToolTips to non English language
.cboZoom.ToolTipText = "Zoom"

add also these commands:
#IFDEF PR_CBOZOOMTTIP
  .cboZoom.ToolTipText = PR_CBOZOOMTTIP
#ENDIF

March 15, 2010 11:34 PM
 

Nick_Porfyris said:

1. During excel creation, failed at statement ------>>> with the error:
"27 not a numeric expression"

...
CASE tnOption = 4 && After assigning row and column
* Cursores con las filas y columnas
SELECT DISTINCT ExcelRow,LEFT(User,3) ;
 FROM (tcOutputAlias) ;
 INTO ARRAY laRowUser
CREATE CURSOR ExcelCols (ExcelCol N(3))
------>>> FOR i = 1 TO pnMaxCol
INSERT INTO ExcelCols (ExcelCol) VALUES(i)
ENDFOR
...

2. PDF creation failed but with no error reporting!

3. For the Greek translation add also these:
#DEFINE PR_ONEPGMENU "1 Óåëßäá"
#DEFINE PR_TWOPGMENU "2 Óåëßäåò"
#DEFINE PR_FOURPGMENU "4 Óåëßäåò"
March 16, 2010 1:28 AM
 

José Azevedo said:

Olá,
Antes de mais felicitar por este magnífico projecto.
Tive vários problemas ao executar mas pouco a pouco fui ultrapassando.
Há um problema que não consigo resolver. Sempre que faço a impressão de relatórios com várias páginas só mostra a primeira. Os icones das setas para seleccionar as páginas ficam desabilitados. O que estarei a fazer errado? Obrigado

Olá Azevedo,

Obrigado pela mensagem. O problema da toolbar desabilitada é na verdade um bug do VFP9 SP2, que faz com que toolbars não sejam acessiveis em forms que sejam "Modal" e "Top-Level". Para solucionar, você precisa baixar um HotFix publicado pela MS, e seguir as instruções do arquivo texto que vem no download.

http://code.msdn.microsoft.com/KB968409/Release/ProjectReleases.aspx?ReleaseId=2445

Se optar por usar forms "In_Screen", o problema não ocorre.

Abraço !

March 16, 2010 1:12 PM
 

José Azevedo said:

Olá novamente,
Não me devo ter explicado bem. Quando imprimo os relatórios aparece a respectiva toolbar com todos os icones: imprimir, gravar, sair, etc. Os icones de navegação pelas várias páginas do relatorio também aparecem mas estão desabilitados, mesmo quando o relatório tem mais do que uma página. Só aparecem quando no comando da impressão acrescento mais do que um relatório. Que devo alterar para que consiga visualizar e imprimir as várias páginas do mesmo relatório?
Tenho os meus forms como In_Screen.
Obrigado mais uma vez.
March 16, 2010 6:14 PM
 

José Azevedo said:

Só mais um pormenor.
Baixe e instalei o hotfix e continua na mesma.
Obrigado
March 16, 2010 6:15 PM
 

Nick_Porfyris said:

Hi Cesar,

Running your demo all the "Save as..." options work OK!

BUT running my reports from my application, I can not save as pdf (error creating file...) and as XLS ("not a numeric expression" i.e. pnMaxCol is .NULL. instead of a numeric value!)

Also when I try to save as HTML or RTF, I get an EMPTY file, for both cases!

No problem ONLY with 'Save as image file'.

What goes wrong?...

I put the "FoxyPreviewer.App" into the same directory with my application.
Into my program, I put these commands:
SET PROCEDURE TO FoxyPreviewer.App ADDITIVE
LOCAL loReport AS "PreviewHelper" OF "FoxyPreviewer.App"
loReport = CREATEOBJECT("PreviewHelper")
loReport.AddReport([myReportName], [WHILE ]+lcWhileCondition +[ NOCONSOLE TO PRINTER PROMPT])
loReport.RunReport()

I run it from VFP9sp2 environment (for the monent... I donot run it from my EXE yet...)

Any idea?
March 16, 2010 6:42 PM
 

Francisco said:

El modulo XlS me da problemas al abrir los archivos generados, me dice q el modulo tabla tiene errores.

Hi Francisco,

I'm sorry, but I can't support the ExcelListener. It is known that it does not always work. Anyway, that's open source, if you find any kind of fix, just let me know, and I'll be happy to update the current version.

Saludos

Cesar

March 16, 2010 8:33 PM
 

Graham Trott said:

I had problems with the save to xls,html and rtf but the pdf works which to me was the important one.  I am having a problem if you right click on the report, choose save as and then click back on the report closing the right click menu, then click on the save button it appears as if the vfp screen opens in behind.  This is in a compiled applications.  Any help would be appreciated.

Thanks for reporting this Graham, I'll get this fixed for the next version, to be uploaded soon.

What problems did you have with the RTF and HTML outputs ? What version are you working with ?

March 17, 2010 5:29 PM
 

grammy said:

Excellent work.  I have two minor problems with the foxypreviewer.app.  I compile the application, close vfp and then run the exe.  On my development machine if I right click on the preview screen, select save as pdf (set to false all other options as I also have had problems with the rtf, htm and xls options).  When asked for filename I cancel the operation.  If you then click on the save button on the toolbar the VFP screen displays (_screen.visible=.f.), so somehow the previewer sets the _screen.visible to .t..  If I run the same application on my test machine when I right click on the preview screen I get the following error.

"Operator/Operand type mismatch
Line 0 in timer()
frxpreviewform.error()
Do you want to suspend operation
yes no cancel"

Any idease on how to handle this or trap for this error.

Thnaks Grammy, I'll get this fixed for the next version.

March 17, 2010 10:51 PM
 

Tony Samper said:

Cesar gracias por tu aporte a la comunidad de foxeros, muy valioso aporte.

Tengo varios problemitas.
Todos mis reportes ejecutan un fomulario de parametros al momento de ejecutarlo, el solicita los parametros y ok el reporte se muestra pero  cuando trato de guardarlo como pdf,html,png etc.. me pide el nombre del archivo"pfd,png etc" el ejecuta nuevamente el procedimiento "callReport" y vuelve a llamar al reporte y nuevamente se solicitan los parametros se ingresan los parametros otra vez y comienza a gener el pdf,png o la salida que haya seleccionado, cuando son reportes largos de 10 paginas porque demora demasiado en crear el archivo, en algunos reportes toca dar click derecho para poder mostrar la barra que que el reporte se muestra sin barra, y al cerrar mi aplicación me muestra este error "ole errorcode Dx8000ffff:Error catastrofico".
Disculpame la extension del escrito, te agradezco la colaboración.

Gracias cesar

Tony Samper

Hola Tony,

Donde se encuentran esos archivos ? Por favor, asegurese de que ellos estean en el SET PATH

Saludos

Cesar

March 23, 2010 8:16 PM
 

Nick_Porfyris said:

Running your demo all the "Save as..." options work OK!

Then, I modified your sample.frx puting some GREEK letters into it...
Also I put for every ...oListener objects, this command:
[...oListener.cCodePage="CP1253" &&CodePage Greek...]

Running again your demo I had these results:
- I can not save as pdf (Message: error creating file...)
- I can save as HTM but some fields truncated from the right...
- I can save as RTF, but opened with Word2000 the file was empty!...
- I can save as XLS, but opened with Excel2000 all the data was into the A1 cell. Also I noticed that the foxypreviewer did not respect the user selection where to save, ONLY for the XLS files! Even if the user selects another folder, finally the file saved into the folder that prompted initially, at the first apperance of the window's dialong "Save As..."

Thanks Nick, for the detailed info, and for the greek translation. I'll check the points that you brought here and will get back to you soon. BTW, version 1.25 already brings the Greek support, can you test it ?
March 25, 2010 9:38 PM
 

José Azevedo said:

Olá César
Tens alguma solução para o problema que coloquei, isto é, quando um relatório tem várias páginas a aplicação só mostra a primeira?

Ola José,

Para que tipo de relatorio esta aparecendo o problema ? Somente no executavel ? Por favor, mande mais detalhes !

March 26, 2010 10:04 AM
 

noker lodia said:

Hi Cesar,

Thx for your work...
One thing that I have found is that when you save in PDF, the barcodes are not rendered. This is something I had noticed when I first used Luis' pdf  class. Have you come across something similar?

Hi Moker, Yes, I could reproduce that. I'll check this with Luis and hope to bring a solution for that soon.
March 26, 2010 9:38 PM
 

ozcan said:

Hi Cesar, while  saving to excel I get 'Failed creation file' error. And,
Although I defined Turkish charset 1254 (only in pdf creation process) Turkish characters don't appear properly.

Hi Ozcan,

** UPDATE **

I've just found the error with the EXCEL files, and fixed it in version 1.26b. Please try this new version and tell me how it goes ! For the ChartSet, I need to update my Windows in order to try to reproduce that and see what can be done. Have you tried with Cetin ?

Thanks in advance!

Regards

Cesar

March 30, 2010 1:17 PM
 

Tony Samper said:

Cesar excelente trabajo, !!te felicito, gracias por tu esfuerzo !!.

Quisiera saber como adiciono "foxypreviwer a mi exe"n que archivos debo tener en cuenta  ?

Ho;a Toni,

Gracias por las palabras amables. Pretendo actualizar el post con las informaciones necesarias.

Saludos !

April 1, 2010 12:03 AM
 

Kalpesh said:

Thanks for your Great Work.

Please Add Hight / Width Properties for Preview Form when WindowState is Normal.

-- Kalpesh

Hi Kalpesh,

Thanks for the suggestion, I hope to add this in the next version.

Regards

Cesar

April 2, 2010 7:26 AM
 

Nick_Porfyris said:

* Corrections for the Greek translation...tested on v1.26b
@ FoxyPreviewer.h
#DEFINE PR_MENUCLOSE       'Êëåßóéìï Ðñïåðéóêüðéóçò'
#DEFINE PR_CLOSEREPORT   PR_MENUCLOSE

Replace this command: #DEFINE PR_GOTOPG_CANCEL  "Áêýñùóç"
with this command: #DEFINE PR_CANCEL  "Áêýñùóç"

#DEFINE PR_PRINTINGPREF   "ÐñïóáñìïãÞ Åêôýðùóçò"

#DEFINE PR_PREFCAPTION    PR_PRINTINGPREF   &&"Customize Printing"
#DEFINE PR_PREFTAB        "ÃåíéêÜ" && "General"
#DEFINE PR_PREFBUTTON     "ÐñïôéìÞóåéò" && "Preferences"
#DEFINE PR_PREFPGINTERVAL "Åýñïò Óåëßäùí" && "Page Range"
#DEFINE PR_PREFALLPG      "¼ëåò ïé Óåëßäåò" && "All Pages"
#DEFINE PR_PREFCURRPG    "ÔñÝ÷ïõóá Óåëßäá" && "Current Page"
#DEFINE PR_PREFPAGES      "Óåëßäåò" && "Pages"

@ FoxyPreviewer.prg 1.25...
After this command -->>DEFINE BAR 5 OF (m.cPopup) PROMPT PR_MENUGOTO  PICTURE "pr_gotopage.bmp"
Put these commands:
#IFDEF PR_CBOZOOMTTIP
DEFINE BAR 7 OF (m.cPopup) PROMPT PR_CBOZOOMTTIP
#ENDIF

Running again your demo (with some Greek words inside the frx) I had these results:
- I can save as pdf.
- I can save as HTM but some fields truncated from the right...
- I can save as RTF.
- I can save as XLS, but opened with Excel2000 all the data was into the A1 cell, but with unredable Greek letters.
- All the time I had an error with the text ".F.". After pressing the OK the preview window it was OK!
- The same happened selecting the save as...

Running my frx from my aplication I had these results:
- I can not save as pdf.
- I can save as HTM but the file was empty...
- I can save as RTF but the file was empty...
- I can not save as XLS, due to a lot of errors ("not a numeric expression" i.e. pnMaxCol is .NULL. instead of a numeric value!)
- All the time I had an error with the text ".F.". After pressing the OK the preview window it was OK!
- The same happened selecting the save as...

 

Hi Nick,

Thanks for the translations! They have been included in version 1.26d. About your other issues, please have a look at the samples distribution project. Check carefully the form "TestForm.Scx". Look for the codes in the CLick() event of the button "Report in EXE". There you'll find a sample showing how you need to make it work.

Regards

Cesar

April 3, 2010 3:12 AM
 

Carlos Morandin said:

Hola Cesar ! muy bueno tu trabajo lo estoy usando en mis aplicaciones y va barbaro. una cosa que te queria consultar. Yo antes usaba un listener para imprimir en color algunos labels dependiendo de algunas condiciones. para esto usaba el listner DynamicFormatting y tambien en otros casos uso para imprimir rtf justificados a ambos lados otro listener. Mi consulta es como incorporo estos listeners a tu clase. Por ahora lo estaba solucionando cambiando la linea en runreport luego del try:
* .oListener = CREATEOBJECT(.cDefaultListener)
.oListener = newobject('EffectsListener', 'DynamicFormatting.prg')
pero no creo sea lo mas conveniente. desde ya muchas gracias en nombre de todos. Uso VFP9 SP2. Saludos. Carlos

Hola Carlos,

Para el Preview, es posible. Puedes definir la propiedad "cDefaultListener":

.cDefaultListener = "EffectsListener"

o entonces

loListener = newobject('EffectsListener', 'DynamicFormatting.prg')
.cDefaultListener = loListener

Pero para generar PDF o RTF tu listener no funcionara. Eso va bien apenas en la previsualizacion. Lo que se pasa es que los listeners para PDF y RTF no consiguen comunicarse con tu listener, por ahora. 

Saludos

Cesar

April 3, 2010 2:51 PM
 

juliomgm said:

does anyone have reports with images to pdf working?
i have integrated the class PDFx into my app but i am unable to pass images to the pdf from the report.

thanks.


alguem tem a passagem de imagens do report para PDF a funcionar?
eu integrei a class PDFx na ninha app mas nao consigo passar imagens para o PDF que estao no report.

Obrigado

Hi Julio,

Have you tried the last version ? There was a samall bug in PDFx, that was not allowing printing images different from PNG or JPEG types. This was fixed in version 1.26d. Can you confirm the version you are using ?

Abraço

César

April 5, 2010 4:50 PM
 

ozcan said:

Hi cesar.
v1.26a is ok.
Charset and excel problem solved.
Thank you very much.

Hi Ozcan !

Thanks very much for the confirmation. Are there any remaining issues to work on ?

Regards

Cesar

April 6, 2010 9:04 AM
 

Kalpesh Chhatrala said:

1. When i View Report. Temporary Files will be generated. any option to clean up that file ?

2. Vertical Line Not Printing in Report

3. After Generation of File Report Preview Closed. Please add Option to View Close or not ?

4. Can u Add properties Water Mark Print on Specific Location ?
April 7, 2010 2:19 PM
 

juliomgm said:

ok it is working ;)

thanks :)

now it is only missing the watermark...
April 7, 2010 3:53 PM
 

Leon2 said:

Nice Work !!!

BTW i've found something if i'm running my aplication and call the class from inside 'form' in the top level, the error is :

#1 --------------------
Property CLOSEABLE is not found.
Line 1041 in Show():
IF LoForm.CLosable=.T.
Frxpreviewform.Error()

Do You wnat to suspend execution ?

#2------------------
if i choosed button 'save as' in toolbar then getting error :
Window 'Preview Toolbar' has not been defined

(everythings is fine if i used via context menu)

What should i do ?
April 9, 2010 12:00 PM
 

Leon2 said:

Nice Work !!!

BTW i've found something if i'm running my aplication and call the class from inside 'form' in the top level, the error is :

#1 --------------------
Property CLOSEABLE is not found.
Line 1041 in Show():
IF LoForm.CLosable=.T.
Frxpreviewform.Error()

Do You wnat to suspend execution ?

#2------------------
if i choosed button 'save as' in toolbar then getting error :
Window 'Preview Toolbar' has not been defined

(everythings is fine if i used via context menu)

What should i do ?

Hi Leon,

Fist of all, sorry for the late answer. Thanks for the detailed explanation. Please get version 1.30 that has just been uploaded and tell me how it goes !

Cesar

April 9, 2010 12:09 PM
 

Graham said:

This is great.  One thing I found and had me scratching my head for several days is that a printer has to be installed on the client machine.  Is there any way to bypass the printer detection.
First error - Printer is not ready, which appears to stop the creation of the LOREPORT (second error LOREPORT is not an object).
Great work.

Thanks !

In version 1.30 I've included a previous checking to know if there are printers installed. If negative, an error message will be shown, asking the user to install a printer and try again.

April 11, 2010 6:30 PM
 

tom said:

Hello Cesar,

thanks again for the great work.
Just for your files : email works fine with tobit david (an alternative to exchange).

Best regards from germany
Tom

Hi Tom !

Thanks a lot!

Regards

Cesar

April 12, 2010 10:36 AM
 

Nick_Porfyris said:

Hi Cesar!
1. One more missed Greek translation:
#Define PR_PRINT    "Εκτύπωση"      &&  "Print"

2. Finally, after many hours of trial & error testing, I found why I cannot “save as...” to PDF, RTF, HTML.

The reason was that the foxypreviewer, NEEDS THE DBF FILES TO BE PRESENT INTO THE DATA ENVIRONMENT OF EACH FRX FILE... !!
No dbf file into the .frx data environment, no .pdf file and empty .rtf & .htm files!!

All my frx files (and I have a lot...) due to parameterised reasons, contains NO dbf files into its data environment and always use the current dbf file of the private data session of each form that calls them!!!!...

Now I try to find how to solve this and I think that many others will have the same problem…

Please TELL ME IF THIS IS TRUE and if you have any idea how we can figure out.

Hi Nick,

Thanks for the translation, but I could not add it to the header file, because of the codepage. Can you edit the original file and send it to me directly ?

About the 2nd point, are you using the file FoxyPreviewerCaller.prg ?

April 12, 2010 10:19 PM
 

Sharath said:

Hi
First of all Thanks a lot for all the great works

Using Ver 1.26d  ( TestApp.Exe )
Save to XLS creates the XLS file but after that when app tries open the file it says "The file you are trying to open, 'TST2.XLS', is in different format than specified by the file extension, Verify that the file is not corrupted. Do you want to open"
if i click on YES it opens the file and data is ok
When i do SAVE AS in MS Excel in File type it show as XML spreadsheet 2003

I am using MS Office Pro 2010

When i tired to open with MS office Excel 2003 Viewer it says "Can not open files of this type"


Hi,

Unfortunately, I can't offer a good support for the Excel rendering. The author of the ExcelListener is Alejandro Sosa, maybe he can help you with this !

April 18, 2010 11:38 PM
 

galuh said:

why i got error  "file 'reportoutput.app' doesn't exist"  while i run it in EXE?
it works fine in project.

The file ReportOutput.App must be found by your application! You mat save a copy of this file in the same folder where FoxyPreviewer.App is.

April 24, 2010 10:09 AM
 

Kalpesh Chhatrala said:

i got Error Numeric Overflow Error.

check following link for error.

http://kalpesh.biz/a13.jpg
http://kalpesh.biz/a14.jpg

Thanks

Hi Kalpesh,

Did you use the property "cWaterMarkImage" ? It's not ready yet !

April 27, 2010 9:07 AM
 

Nick_Porfyris said:

1.
* Set the CodePage for this file =1253 (Greek Windows)...
#Define PR_PRINT          'Εκτύπωση' &&"Print"
#DEFINE PR_PRINT      'Åêôýðùóç'                   && "Print"

try the above two and tell me which is OK!
(By the way, I do not know how to send it to you directly!...)

2.
Yes, I am using the file FoxyPreviewerCaller.prg ...

Hi Nick,

Thanks ! I'll update the next release with the missing translation. About #2, I'll make some tests and will get back to you soon.

Regards

Cesar

April 27, 2010 10:09 AM
 

Nick_Porfyris said:

The Greek translation for the new definition in version 1.30:

#DEFINE PR_ERRNOPRINTER   "Δεν ευρέθησαν εκτυπωταί."+CHR(13)+"Παρακαλώ εγκαταστήστε μιά συσκευή εκτύπωσης και προσπαθήστε να τρέξετε την αναφορά ξανά."

Thanks very much !

April 27, 2010 5:15 PM
 

Noker Lodia said:

Hi Cesar,
Again, thanks for the great work...
Have you been able to talk to Luis about Pdfx not rendering barcodes?

Thx...
April 30, 2010 7:56 PM
 

Tony SAMPER said:

Saludos Cesar.

Porque cuando protejo mi ejecutable con Refox XI me dice que ReportOutpu y Reportpreview ha sido compilado en otra version de vfp ya las compilé en sp2 y nada no me muestra los informes, pero si funciona cuando el exe no esta protejido.

Te agradezco si tienes una luz a este problema,ya que estoy utilizando esta herramienta y no puedo dejar el exe desprotejido.

Gracias

Tony Samper.
May 4, 2010 3:40 AM
 

glwdc said:

This is The most powerful VFPPreviewer. Thanks!
May 4, 2010 4:39 PM
 

Kalpesh Chhatrala said:

can you add Form Printing facility in your Report Listener ?

Hi Kalpesh,

What do you mean by "Form printing" ?

May 6, 2010 11:21 AM
 

Nick_Porfyris said:

Hi Cesar!

I found a very annoying problem, saving to PDF file:
It has a display problem with 4th capital Greek letter "Δ" in ARIAL font ...
The pdf  displays it as it belongs to font TIMES NEW ROMAN!

The Greek capital letters are:
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ

(Create a FRX.
Copy and paste the above Greek capital letters to a label with ARIAL font.
Copy and paste the same letters to another label with TIMES NEW ROMAN font.
Run the FRX and will see that in the preview window all letters are what they are suppossed to be according to their fonts.
Print the FRX and will see that on the papper all letters are OK too.
Save to a pdf file, open it and you will see the problem!)

http://www.ermis-pliroforiki.com.gr/Preview_OK.jpg
http://www.ermis-pliroforiki.com.gr/PDF_Problem.jpg

I think that the problem it has to do with the pdf embbended greek fonts.
where are they?
Any suggestion how can I fix it?

Hi Nick,

Have you changed the property "cCodePageValue" ?

May 6, 2010 8:37 PM
 

Venkatram said:

Hi all,

I am using the Foxypreviewer, i face an issue when converting the sample report into XLS, i have pictures in the report and the images are not embedded in the report.

I am using Windows 7 os, VFP 9.0, and Office 2007

Thanks in advance for any help

-Venkatram

Hi Venkatram,

Unfortunately, image embedding and other advanced usages are not supported by the EXCEL Listener.

May 7, 2010 11:22 AM
 

Tony Samper said:

Hola Cesar.
Quisiera saber si no tienes respuesta para el inconveniente del que te hable, en el comentario pasado.

Gracias.

Hola Tony

Mu suggestion is that you include in your project all the FoxyPreviewer source files. If it does not succeed, try also leaving the DLL as Excluded, and put it manually, in the same folder of your EXE, or in a PATH that your APP can locate.

Saludos

Cesar

May 8, 2010 7:57 PM
 

Dean Phillips said:

Cesar,

Thanks for all of your hardwork and ingenuity. This add-on is so powerful. I have one issue once I started using it with my application. After the preview window is closed via the toolbar my _SCREEN variable still shows that the frxpreviewform is still open. How do I close that or have I done something wrong? I've only added the lines you suggested in the basic setup of this program. Thanks again!

Hi Dean,

Thanks for the kind words.

I'm sorry, but I could not reproduce this issue. Have you tried releasing manually that property ? Something like:

_Screen.frxPreviewForm = NULL ??

 

May 10, 2010 11:27 PM
 

Kalpesh Chhatrala said:

I don't want to close report viewer after save file (Pdf).

how can i do this ?

Hi Kalpesh,

Unfortunately, this is not possible. To generate the PDF output, the current report preview session MUST be closed to allow the PDF Listener to generate the file.

May 13, 2010 9:06 AM
 

Matt Easley said:

Hi Cesar, I like what you,  plus friends, have produced.

I extended your code (slightly!) to allow more control of preview window, by turning form Min/Max/Close buttons on/off, allowing MDI and allowing caption to be fixed so it doesn't add FRX name. Default settings should leave everything as it was before.

In foxypreviewer.prg

Line 84 added
lExtendTitle = .T.
lMDIForm = .F.
lMaxButton = .T.
lMinButton = .T.
lClosable = .T.
lControlbox = .T.


Line 1096 changed to
WITH This.PreviewForm
.WindowState = goHelper.nWindowState
.MDIForm = goHelper.lMDIForm
.MaxButton = goHelper.lMaxButton
.MinButton = goHelper.lMinButton
.Closable = goHelper.lClosable
.Controlbox = goHelper.lControlbox
ENDWITH


Changed lines 1313-1317 to

IF goHelper.lExtendTitle
This.PreviewForm.formCaption = goHelper.cTitle + ;
IIF(NOT goHelper.lExtended, "", ;
IIF(goHelper._oReports.Count > 1, "", ;
SPACE(5) + "-" + SPACE(5) + JUSTSTEM(goHelper._oReportSource(1))))
This.PreviewForm.Caption = goHelper.cTitle + " - " + lcReportName
ELSE
This.PreviewForm.Caption = goHelper.cTitle
ENDIF


Also changed FoxyPreviewerCaller.prg

Added properties

lExtendTitle = .T.
lMDIForm = .F.
lMaxButton = .T.
lMinButton = .T.
lClosable = .T.
lControlbox = .T.


Added to RunReport method

.lExtendTitle = This.lExtendTitle
.lMDIForm = This.lMDIForm
.lMaxButton = This.lMaxButton
.lMinButton = This.lMinButton
.lClosable = This.lClosable
.lControlbox = This.lControlbox



Hi Matt,

VERY nice ! Glad to see you leveraging FoxyPreviewer.

Cesar

May 14, 2010 4:42 PM
 

Naresh Patel said:

Hi Cesar
It's a well-done work from you as usual. I include this great functionality in my Project. I want to enhance look of previewer form. First I want to show toolbar on the top of preview form. How can I get this. Pls help me......

Thanks very much.

Hi Naresh,

Have you tried the Dock property ?

May 16, 2010 11:17 AM
 

Nick_Porfyris said:

Yes, I did!
cCodePage  = "CP1253" && CodePage, to be used by PDF Listener GREEK!...

The problem it has to do with the pdf embbended greek fonts, ADD ONLY FOR THE 4TH GREEK CAPITAL LETTER 'Δ'.

The Pdf Listener creates for this letter 'Δ' the SAME image(picture) for Arial and Times Font, for NORMAL, BOLD and INCLINED!

May be the problem it has to do with the PDF Library itshelf!!

Any suggestion how can I fix it?

May 18, 2010 10:29 PM
 

Naresh Patel said:

Hi Cesar, Thanx.
By default, toolbar is activate outside of the preview form. I want it in the preview form. Is it possible???
Another problem...... My Frx has image control as background. When I Preview with Foxypreview, the image became resized and Report looks very ugly. Any suggession ???

Thanx again

Hi Patel,

To make the toolbar active inside your form, you need to use a TopLevel custom form. It's very strange about the image background. Is there a difference between the preview and the printed version ? How does the PDF output look ?

Does the problem persist if you call your report without FoxyPreviewer, but using SET REPORTBEHAVIOR 90 ?

Regards

Cesar

May 19, 2010 5:14 PM
 

edyshor said:

In my projects, before initiating a preview for a report (using the standard ReportPreview.app) i'm launching a form where i chose the printer and either the preview or print buttons. Additionally, only when run from vfp (sources, not exe) another button allows me to run the modify report command, thus allowing me to perform quick fixes on the frx ad-hoc (with a reporting environment in place).

Can this be done with FoxyPreviewer, meaning the button to close the previewer and launching the report designer ?! Or at least (only in dev mode) to give the option to either preview or modi repo ..

actually i think this is something that should happen before FoxyPreviewer is executed..

Hi,

Yes, for sure this can be done ! This customization is not available, but you can do it by yourself, very easilly. See the methods AddBarsToMenu and UpdateToolbar. They are responsible for addind or modifying the buttons from the preview canvas or context menu. See the codes that I use for the "CmdExit", the exit button. Just add a copy of it to the toolbar, change the icon to the one you desire, and change the button behavior.

Hope that helps, and GOOD LUCK !

May 19, 2010 10:50 PM
 

Paxson said:

Hello, i have a problem with export to PDF. I generate a Report based in a fox table, when i export to any formats, the file have not information.

May 22, 2010 12:42 AM
 

kalpesh2804 said:

Hi Cesar,

check below link

www.report-sculptor.com

Thanks ! Yes ! Sergio did an amazing job with ReportSculptor. But these two are different projects, and for different needs.

Regards

Cesar

May 24, 2010 7:27 AM
 

bonty said:

Hi Cesar,

I take it if i want to use my own (already built in) emailer, then i have to include all the files in my project and then modify the SendMailEx??

Also I've trying to play with the distributed app and basically when I click email the preview closes and the file is deleted is this correct - or how do i stop teh file being deleted?

thanks

andy

 

Hi Andy,

Yes, for this moment, you have to modify the sources and change the SendMailEx function. In the next version I hope to add another way to customize the email sending. About automatically deletion of the files, yes, that's the default behavior, I'll add some new properties allowing you to customize this as well.

Thanks !

May 28, 2010 3:13 PM
 

Yoyok said:

Hi Cesar.

thank you for the program.
I Success to print with Image, XLS, RTF, and HTML, but i have trouble when i print with PDF.

I can't save the PDF if i use barcode font (3of9.ttf), but if I can save it succesfully if i chage the font.

what should I do ?

thanks you.
May 28, 2010 4:03 PM
 

yoyok said:

Thank your for this program.

but I still have trouble when I print to PDF, and there is a barcode font (3of9.ttf) in my report, but the message failed to print.; when i change the font. it can print to pdf sucessfuly.

thank you.
May 29, 2010 10:22 AM
 

Manuel B. said:

Excelente tu Aportacion! la verdad como por ahi decian , solo falta que sirva el cafe..  
Agradesco tu Aporte..  Super Excelente!!!!

Solo estamos en espera del Envio de Mail..  Como van.  

Saludos...
Y MUCHAS FELICIDADES A TODOS LOS COLABORADORES QUE HICIERON POSIBLE ESTA UTILERIA TAN FANTASTICA...

Hola Manoel,

Gracias por las palabras de incentivo ! Sobre el envio de email, que piensas de lo temos ahora, con ele envio via MAPI ?

Saludos

Cesar

June 2, 2010 8:46 PM
 

Pepere_jack said:

Hi.

I was playing with your code and I did some improvement in the miniature preview that I think could benefit every one.  Here is a summary of the improvement:

  • The miniature was supporting only letter in portrait format.  I adapted it to use the page size from the listener.
  • For large reports, the miniature page was limited to 64 items.  I noticed that this is heavy process in the paint method to update all miniature, so this must be the reason for the 64 item limit.  I updated it so the programer can decide how many to display (I think that 32 is good but this is the programer choice) AND I added the possibility to change "Page Set" by adding navigation button.
  • Since the paint method is heavy in process to refresh all miniature AND since the paint method is called every time there is a resize or a scroll, I added some code to change the screen size to display, in a graceful manner, as many miniature at a time without having to manually resize the miniature form.  Also, the SCROLL do not refresh the miniature anymore.
  • To help identifying pages in the miniature screen, I added ToolTipsText to each page displaying the page number.
  • There mignt be some string that would need to be include into the translation process.

 

So, if you find this usefull, then please have it included into your code.  Feel free to change / improve any of my code.  Here are the changes I did (pretty extensive I am afraid):

- In the foxypreviewer.prg file, In the PreviewHelper class, I added a proprety nMaxMiniatureDisplay = 64

- I changed the DoProof() of the ExtensionHandler class:
PROCEDURE DoProof()
goHelper._oProofSheet = CREATEOBJECT("ProofSheet")
goHelper._oProofSheet.SetReport( THIS.PreviewForm.oReport )
goHelper._oProofSheet.Caption = PR_GLOBALPREVIEW

goHelper._oProofSheet.nMaxMiniatureItem = goHelper.nMaxMiniatureDisplay

IF VARTYPE(goHelper._oParentForm) = "O"
ACTIVATE WINDOW (goHelper._oParentForm.Name)
Activate Window (This.PreviewForm.Name)
ENDIF

goHelper._oProofSheet.SetProofCaption()
goHelper._oProofSheet.Show(1)

* read the selected page and move to it,
* using the .SetCurrentPage() method of
* the default preview container:
TRY
THIS.PreviewForm.SetCurrentPage( goHelper._oProofSheet.Currentpage )
goHelper._oProofSheet = ""
CATCH
ENDTRY
ENDPROC


- In the class frmReport, I added the property

 ShowTips = .T.

- In the Show Method of the "proofsheet" class, the was a "#define SPACE_PIXELS 10".  I moved this line to just before of the "proofsheet" class definission since other method will have to use it.

- I added this new class before the "ProofSheet" class:
**************************************************
*-- Class:        PageSetBtn
*-- ParentClass:  Commandbutton
*-- BaseClass:    Commandbutton
*-- Author:       Jacques Parent (Pepere_Jack)
DEFINE CLASS PageSetBtn AS commandbutton
Height = 24
Width = 24
Caption = ""
cType = "NEXT"

PROCEDURE Click
DO CASE
CASE This.cType == "FIRST"
This.Parent.nPageSet = 1

CASE This.cType == "PREV"
This.Parent.nPageSet = This.Parent.nPageSet - 1

CASE This.cType == "NEXT"
This.Parent.nPageSet = This.Parent.nPageSet + 1

CASE This.cType == "LAST"
This.Parent.nPageSet = CEILING(This.Parent.nPages / This.Parent.nMaxMiniatureItem)

ENDCASE

This.Parent.RefreshPageBtn()
ENDPROC

PROCEDURE REFRESH
DO CASE
CASE This.cType == "FIRST"
This.Enabled = NOT (This.Parent.nPageSet == 1)

CASE This.cType == "PREV"
This.Enabled = NOT (This.Parent.nPageSet == 1)

CASE This.cType == "NEXT"
This.Enabled = NOT (This.Parent.nPageSet == CEILING(This.Parent.nPages / This.Parent.nMaxMiniatureItem))

CASE This.cType == "LAST"
This.Enabled = NOT (This.Parent.nPageSet == CEILING(This.Parent.nPages / This.Parent.nMaxMiniatureItem))

ENDCASE
ENDPROC

ENDDEFINE
*-- EndDefine: PageSetBtn
**************************************************


- In the "ProofSheet" class, I added the following properties:
nPageSet = 1  && Current page set displayed
lShowDone = .F.  && Is the Show Method done?  If .T., do not refresh miniature in the Paint method
nOtherThenProofObj = 0  && Number of object that are not miniature
nMaxMiniatureItem = 64  && Nomber max of miniature to display

- In the same class, I added some methods:
PROCEDURE INIT
THIS.AddObject("PageSetFirst","PageSetBtn")
This.nOtherThenProofObj = This.nOtherThenProofObj + 1

WITH This.PageSetFirst
.Top   = 3
.Left = SPACE_PIXELS

.Caption = ""
.Picture = "pr_Top.bmp"

.cType = "FIRST"
.Visible = .T.
ENDWITH

THIS.AddObject("PageSetPrev","PageSetBtn")
This.nOtherThenProofObj = This.nOtherThenProofObj + 1

WITH This.PageSetPrev
.Top   = 3
.Left = This.PageSetFirst.Left + This.PageSetFirst.Width + 2

.Caption = ""
.Picture = "pr_Previous.bmp"

.cType = "PREV"
.Visible = .T.
ENDWITH

THIS.AddObject("PageSetNext","PageSetBtn")
This.nOtherThenProofObj = This.nOtherThenProofObj + 1

WITH This.PageSetNext
.Top   = 3
.Left = This.PageSetPrev.Left + This.PageSetPrev.Width + 2

.Caption = ""
.Picture = "pr_Next.bmp"

.cType = "NEXT"
.Visible = .T.
ENDWITH

THIS.AddObject("PageSetLast","PageSetBtn")
This.nOtherThenProofObj = This.nOtherThenProofObj + 1

WITH This.PageSetLast
.Top   = 3
.Left = This.PageSetNext.Left + This.PageSetNext.Width + 2

.Caption = ""
.Picture = "pr_Bottom.bmp"

.cType = "LAST"
.Visible = .T.
ENDWITH


THIS.AddObject("PageSetCaption","Label")
This.nOtherThenProofObj = This.nOtherThenProofObj + 1

WITH This.PageSetCaption
.Left = This.PageSetLast.Left + This.PageSetLast.Width + 10
.AutoSize = .T.

.Caption = ""
.FontName = "Arial"
.FontSize = 10
.FontBold = .T.

.Top   = This.PageSetNext.Top + ((This.PageSetNext.Height-.Height)/2)

.Visible = .T.
ENDWITH
ENDPROC

PROCEDURE RefreshPageBtn
This.PageSetNext.Refresh()
This.PageSetPrev.Refresh()
ENDPROC

PROCEDURE nPageSet_assign
LPARAMETERS vNewValue

IF (This.nPageSet == CEILING(This.nPages / This.nMaxMiniatureItem)) ;
AND (vNewValue <> CEILING(This.nPages / This.nMaxMiniatureItem))

FOR I = This.nOtherThenProofObj+1 TO THIS.Objects.Count
IF NOT THIS.ObjectsIdea <img src=" src="/emoticons/emotion-55.gif">.Visible
THIS.ObjectsIdea <img src=" src="/emoticons/emotion-55.gif">.Visible = .T.
ENDIF
ENDFOR

ENDIF

This.nPageSet = vNewValue

This.SetProofCaption()

This.Show()
ENDPROC

PROCEDURE SetProofCaption
*!* ---------------------- *!*
*!* ---------------------- *!*
*!* Calculate the caption! *!*
*!* ---------------------- *!*
nFirstPage = ((This.nPageSet-1) * This.nMaxMiniatureItem) + 1
nLastPage   = MIN(This.nPageSet * This.nMaxMiniatureItem, This.nPages)

cMessage = "Pages from %FP% to %LP%"

This.PageSetCaption.Caption = STRTRAN(STRTRAN(cMessage, "%FP%", TRANSFORM(nFirstPage)), "%LP%", TRANSFORM(nLastPage))
*!* ---------------------- *!*
*!* ---------------------- *!*
*!* Calculate the caption! *!*
*!* ---------------------- *!*
ENDPROC

PROCEDURE ReportListener_Assign
LPARAMETERS oNewValue

This.ReportListener = oNewValue

This.DoResizeProofSheet()
ENDPROC

PROCEDURE nMaxMiniatureItem_Assign
LPARAMETERS nNewItem

This.nMaxMiniatureItem = nNewItem

This.DoResizeProofSheet()
ENDPROC

PROCEDURE DoResizeProofSheet
IF NOT ISNULL(This.ReportListener)
*!* Recalculating the Proof Page size to display the max miniature at one time
nProofWidth  = THIS.ReportListener.GetPageWidth() / 96
nProofHeight = THIS.ReportListener.GetPageHeight() / 96


*!* Calculating the max col
nMaxScreenWToConsidere = (_Screen.Width /5) * 4 && 4/5 of screen width;  Just for "nicer visual effect"
nMaxScreenHToConsidere = (_Screen.Height/5) * 4 && 4/5 of screen heigth;  Just for "nicer visual effect"

nDiv = nProofWidth+SPACE_PIXELS
nNbCol = INT((nMaxScreenWToConsidere - SPACE_PIXELS) / ndiv)

*!* Now, calculating the width to set the form
This.Width = SPACE_PIXELS + (nNbCol * (nProofWidth+SPACE_PIXELS))

*!* Now for the hight
*!* Calculating number of row...
nNbRow = CEILING(This.nMaxMiniatureItem/ nNbCol)

*!* Now, calculating the height to set the form
This.Height = MIN(nMaxScreenHToConsidere, SPACE_PIXELS*3 + (nNbRow * (nProofHeight+SPACE_PIXELS)))

This.AutoCenter = .T. && Auto center the proof sheet
ENDIF
ENDPROC


- In the same class, I modified the paint method:
PROCEDURE Paint

IF (not ISNULL(THIS.ReportListener))
IF NOT This.lShowDone
FOR i = ((This.nPageSet - 1) * This.nMaxMiniatureItem) + 1 to This.nPageSet * This.nMaxMiniatureItem
IF TYPE("THIS.Objects[i - ((This.nPageSet - 1) * This.nMaxMiniatureItem) + This.nOtherThenProofObj]") == "O"
IF I > This.nPages
THIS.Objects[i - ((This.nPageSet - 1) * This.nMaxMiniatureItem) + This.nOtherThenProofObj].Visible = .F.
ELSE
THIS.Objects[i - ((This.nPageSet - 1) * This.nMaxMiniatureItem) + This.nOtherThenProofObj].ToolTipText = "Page #" + TRANSFORM(I)

THIS.ReportListener.OutputPage( m.i, THIS.Objects[i - ((This.nPageSet - 1) * This.nMaxMiniatureItem) + This.nOtherThenProofObj],2)
ENDIF
ELSE
EXIT
ENDIF
ENDFOR

This.lShowDone = .T.
ENDIF
ENDIF
ENDPROC


- In the same class, I modified the Show method:
PROCEDURE Show
LPARAMETERS nStyle

iRowOffset = SPACE_PIXELS * 3
iColOffset = SPACE_PIXELS

nProofWidth  = THIS.ReportListener.GetPageWidth() / 96
nProofHeight = THIS.ReportListener.GetPageHeight() / 96

iColCount  = INT((Thisform.Width - iColOffset)/ (nProofWidth + SPACE_PIXELS))

nCurCol = 1

This.lShowDone = .F.

FOR i = ((This.nPageSet - 1) * This.nMaxMiniatureItem) + 1 to min(This.nPageSet * This.nMaxMiniatureItem, This.nPages)

*!* Calculate the objectID here to facilitate reading the code
nObjectID = i - ((This.nPageSet - 1) * This.nMaxMiniatureItem) + This.nOtherThenProofObj

IF NOT This.lStarted
THIS.AddObject(sys(2015),"ProofShape")
THIS.Objects[nObjectID].Visible = .T.

THIS.Objects[nObjectID].Width  = nProofWidth
THIS.Objects[nObjectID].Height = nProofHeight
ENDIF

* Arrange shapes on form:
TRY
THIS.Objects[nObjectID].Top   = iRowOffset
THIS.Objects[nObjectID].Left = SPACE_PIXELS + ((nCurCol-1) * (nProofWidth+SPACE_PIXELS))

THIS.Objects[nObjectID].PageNo = m.i

nCurCol = nCurCol + 1

IF nCurCol > iColCount
nCurCol = 1
iRowOffset = iRowOffset + SPACE_PIXELS + THIS.Objects[nObjectID].Height
ENDIF
CATCH
ENDTRY
ENDFOR


This.lStarted = .T.
dodefault(nStyle)
ENDPROC


- I also changed the FoxyPreviewerCaller.PRG file:  I added a property to the FoxyPreviewerCaller class:  nMaxMiniatureDisplay = 64 && Number of miniature proof

- In the RunReport method, I added ".nMaxMiniatureDisplay = This.nMaxMiniatureDisplay" in the WITH ... ENDWITH block.


This is it.  Feel free to examine all of this and include it in your code if you find it usefull.  I hope that I can contribute to this wonderful project!

 

Thanks a lot Jacques !

Could you please send me your current and modified version of FoxyPreviewer to my email ? vfpimaging at hotmail dot com

I'm really glad to see that finally someone decided to dirty his hands and bring some real improvements to FoxyPreviewer. THANKS A LOT ! Your suggestions are very welcome.

Salutations

Cesar

June 3, 2010 10:56 PM
 

Manuel B. said:

Alguna sugerencia , Todo funciona perfecto , en Laser o Inyeccion de Tinta, El Problema biene cuando trabajamos en matriz de punto (Epson FX890) el reporte me lo da impreso como una Reduccion al 50%  

Alguna sugerecia se los agradeceria.

Gracias.

Hola Manuel,

De verdad, tenemos un problema
FOXYPREVIEWER es baseada en REPORTLISTENERS.
Sinceramente, pienso que no es posible utilizarla con matriz de punto, eso no es un problema de FoxyPreviewer, pero una limitacion de la clase ReportListener.

De todo modo, gostaria ud hiciera una prueba SIN UTILIZAR FOXYPREVIEWER:

SET REPORTBEHAVIOR 90
LOCAL loListener as ReportListener
loListener = CREATEOBJECT("ReportListener")
loListener.ListenerType = 1 && Preview
REPORT FORM SeuReport OBJECT loListener PREVIEW


Me gustaria saber si la impresión aún tiene problemas.

Saludos

Cesar

June 5, 2010 2:52 AM
 

Byron Santizo said:

Que  ocurrio que ya no hay actualizaciones de este proyecto que esta muy bueno, siempre pasa lo mismo con la mayoria de proyectos de VFP que los dejan a mitad de camino, espero que este sea la excepcion que el autor de este proyecto continue hasta teminarlo, Gracias, ByronSantizo hotmail dot com

Hola Byron,

Con todo mi respeto, pero ...

Que le hace falta en este proyecto ? FoxyPreviewer es una utilidad OPEN SOURCE, un proyecto de código abierto, y cualquiera, incluso usted puede ayudar a mejorarlo. ¿Alguna vez ha pensado en qué puedes ofrecer a este proyecto? Es muy fácil sólo para criticar, sin ofrecer ninguna ayuda.

Hasta ahora he estado tratando de hacer todas las modificaciones y correcciones solicitadas. Pero, esto sólo se puede hacer en mi tiempo libre. De todos modos, esto ya está trabajando en la producción para muchas personas.

Saludos,

Cesar

June 5, 2010 6:30 PM
 

MAnuel B. said:

Jorge Luis , Tengo el mismo problema que tu, ya resolviste el problema de las impresoras de matriz.   pues tambien me cambia el  tamaño de letra.

no si si tengan por ahi aluguna sugerencia


Gracias...

Manuel,

Por favor descargue la version 1.35 que acabo de subir. Cambie la propiedad "lUseListener" para .F. y intente novamente.

El "preview" continuara como antes, pero la impresion debera estar buena. Por favor dime se funciona bien esta vez.

Saludos

Cesar

 

June 5, 2010 8:23 PM
 

Manuel B. said:

Hola Cesar:

Primero para Felicitarte por la Clase. Foxyprevier esta Excelete!!!!
pero me sugieron unos detalles. que te los comento:

Con impresoras Laser o Inyeccion de tinta no tengo ningun problema, el problema que ya te habian comentado en un post anterior es cuando utilizas impresoras de Matriz de Punto, Estoy haciendo una prueba para ser mas especificos con Epson Fx890 en Win. 7 y en Win xp y me sucede lo mismo, Me cambia el tamaño de letra y me reduce la impresion, ya baje controladores , reinstale impresora y me sigue haciendo lo mismo, Te reitero que esto solo me pasa con impresoras de matriz, ya puse el SET REPORTBEHAVIOR 90 y en 80  y los dos me hacen lo mismo.
Tendras alguna sugerencia al respecto?

De antemano te agradesco tu ayuda.

Gracias..
y Muchas Felicidades a todos los que hicieron y estan haciendo posible esta Utileria tan Excelente!!!!

Hola Manuel,

Por favor, mire la respuesta de comentario anterior ! Gracias !

June 5, 2010 8:45 PM
 

Manuel B. said:

Hola Cesar :
Otra Ves como no he visto mi post no se si ha llegado:

Primero para Felicitarlos pro la clase tan Excelente que realizaron. y otra con un problema que me surgio que ya te habian comentado.  y te lo reitero para ver si existe una solucion al respecto.

Los reportes con foxypreviewercaller  funcionan perfecto pero en las impresoras de Matriz de pUnto cambia el tipo de letra lo hace mas reducido y por lo tanto se desfazan todos los reportes a casi media Hoja y otro tipo de letra.
Que se ha hecho:  Cambiar controlador de impresora mas actual
TRabando con Win7 y win Xp Resulta lo mismo
Ya se cambio a SET REPORTBEHAVIOR 90  y a 80 y resulta lo mismo

Alguna sugerecia te lo agradesco de antemano.

Muchas Gracias...

Hola Manuel,

Por favor, mire la respuesta de comentario anterior ! Gracias !

June 5, 2010 9:00 PM
 

pepere_jack said:

Hi Cesar.

I gave you a demo a few days ago telling you that the right-click on the report preview was displaying hidden forms...  Well, it seemed that my error was related to the one that Dean Phillips mentionned in a previous message on this article:  The preview toolbar is not released afert the preview container is closed.  It look like that this problem occures only when the preview container is used with a top level form.  Using what you answered to Dean, I put a "loReport.oListener.PreviewContainer = NULL" in the "RunReport" procedure of the FoxyPreviewerCaller.PRG right after the "loReport.RunReport(This)" command and it seems to do the trick.

Thanks for your time.

Hi Jacques,

WONDERFULL ! Thanks ! I'll update FoxyPreviewerCaller.prg.

June 7, 2010 2:55 PM
 

pepere_jack said:

Hi again.

I sent you a procedure to change the miniature sheet to display multi-page set.  Here some update to my previous message:

in the proofsheet class, change the nPageSet_assign method I gave previously with this one:
PROCEDURE nPageSet_assign
LPARAMETERS vNewValue

DO CASE
CASE  (This.nPageSet == CEILING(This.nPages / This.nMaxMiniatureItem)) ;
AND (vNewValue <> CEILING(This.nPages / This.nMaxMiniatureItem))
*!* We have to display ALL miniatures

FOR I = This.nOtherThenProofObj+1 TO THIS.Objects.Count
IF NOT THIS.ObjectsIdea <img src=" />" src="/emoticons/emotion-55.gif">.Visible
THIS.ObjectsIdea <img src=" />" src="/emoticons/emotion-55.gif">.Visible = .T.
ENDIF
ENDFOR

CASE (This.nPageSet <> CEILING(This.nPages / This.nMaxMiniatureItem)) ;
AND (vNewValue == CEILING(This.nPages / This.nMaxMiniatureItem))
*!* We have to display only some miniatures

FOR I = This.nOtherThenProofObj+1 TO THIS.Objects.Count
IF I > This.nPages - (This.nPageSet * This.nMaxMiniatureItem) + This.nOtherThenProofObj
THIS.ObjectsIdea <img src=" />" src="/emoticons/emotion-55.gif">.Visible = .F.
ENDIF
ENDFOR

ENDCASE

This.nPageSet = vNewValue
This.SetProofCaption()
This.Show()
ENDPROC

This will correct a refresh bug for the miniatures.

Also, on the same class, add this method:
PROCEDURE Activate
This.lShowDone = .F.
ENDPROC

This will let the miniature sheet refresh itself if the application lost and get back the focus while displaying miniatures.

I also added a DESKTOP = .T. property to the ProofSheet class to let the miniature window display correctly if the top level form is not maximized.

Hope this help!

 

Jacques, can you send me an updated version of FoxyPreviewer 1.35 ? I'd like to test your modifications over the last version, and maybe continur developing and fixing FoxyPreviewer from your last version.

Thanks in advance !

June 7, 2010 4:30 PM
 

pepere_jack said:

Hi.

Just to let you know, there was a BUG with one of the language string.  In the FoxyPreviewerCaller.PRG, there is a cTitle property that is initialized to EMPTY and this cTitle go overwrite the one declared in the foxypreviewer.prg.  In doing this, the default value from the english reportpreview.app is displayed (for any language selected).   For this, I just commented the line ".cTitle = This.cTitle" in the RunReport method.

Then, in the UpdateToolBar method of the SynchCanvasesEx class, I added a line "This.PreviewForm.SynchPageNo()" at the end of the "IF NOT EMPTY(goHelper.cTitle)" block.  This will set the "- page 1" in the report preview at first display of the preview form.  Elst, it is displayed only when you change page with "next" or "last page" button.

Also, can you tell me whit is the puspose of the SPACE(5) in this line?
IIF(NOT goHelper.lExtended, "", IIF(goHelper._oReports.Count > 1, "", ;
SPACE(5) + "-" + SPACE(5) + JUSTSTEM(goHelper._oReportSource(1))))
(From the UpdateToolBar method of the SynchCanvasesEx class)

Thanks.

PS:  I do a lot of testing and I report to you any thing that I think can be of value.  Please, tell me if I go too far for your taste!  All I want is to help, BUT I do not want to intrude on your work.

Heheheh

Thanks a lot !

What are you waiting to send me your version ? Please send it to me !

Regards

Cesar

June 7, 2010 5:58 PM
 

Manuel B. said:

No aparesen los mensajes.. ni contenstan.. que paso.  o a donde hay que ir para poder hacer comentarios al respcto de este tema...

Gracias

Hola Manuel,

Lo siento, pero mi blog fue atacado por spammers. He recibido unos 400 mensajes de SPAM en estos últimos 15 días. Así se hizo realmente muy difícil de filtrar y responder a todas las preguntas. Parece los comentarios se están filtrando correctamente ahora. Lo siento por la molestia, ya he contestado a la mayoría de sus preguntas.

Saludos

Cesar

June 7, 2010 7:45 PM
 

Piyush said:

Hi Cesar,

i have problem with toolbar when i run application is not but its work on design time.
i not use repotoutout.app or reportpreview.app i have add both project souce code in project.
i chage toolbar class in reportpreview souce code.
changed toolbar property Showwindow = 1


Regards,
Piyush

Hi Piyush,

It seems that your EXE is not finding the files ReportOutput.App and ReportPreview.App. Have you set the global properties already ?

Try adding this to your starting PRG:

_REPORTOUTPUT = FULLPATH("ReportOutput.App")

_REPORTPREVIEW = FULLPATH("ReportPreview.App")

PS: DONT include these files in your project ! You may mark them as "Excluded" in the project manager, to make it be outside the EXE. Your EXE needs to find these APP files ! MAke sure to configure the SET PATH correctly.

Hope that helps !

Cesar

June 9, 2010 1:27 PM
 

Kalpesh Chhatrala said:

What Changes Made in 1.32 ?

Hi Kalpesh,

Sorry, I'm out of time these days, and could not update the blog post. The major change in that version was a fix in the "AddReport" method. Anyway, the changes are explained in the "ReadMe.Txt" file in the downloaded file.

Regards

Cesar

June 10, 2010 3:12 PM
 

Luis Dutari said:

César.

Hola Luis,


gracias por tu desarrollo.
quería saber que mejoras o novedades tiene la versión 1.32 ya que no estan especificadas.

Estan especificadas en el archivo "ReadMe.txt"


te cuento que en una PC, a pesar de tener elegida una impresora, se la envía a otra. ¿conoces algo de eso?

Si, eso se pasava en versione anticuas, con qual version eso acontece?


y otro inconveniente que tuve, es que los .frx, a pesar de tenerlos incluidos en el proyecto, al llamarlos desde el foxyprev en el ambiente de producción me dice que no los encuentra. finalemente los copie tambien en producción y ahi si funcionan.

Estas a utilizar el APP ? Si positivo, tienes de utilizar el FOXYPREVIEWERCALLER.PRG, por favor, mire los ejemplos.


otro detalle menor, tuve que ampliar el tamaño de los textbox con números porque me aparecian *******. pero ya los modifique y no tengo problemas.

Si, eso se pasa por cuenta de la utilizacion de ReportListener, teneras que ajustar tus reportes, no hay lo que hacer, eso esta documentado, y acontece quando utilizamos SETREPORTBEHAVIOR 90, como en FoxyPreviewer.

nuevamente muchas gracias por tu aporte.
sobre el tema del envío de mails, hay en portalfox un artículo que explica el envío por CDO (http://www.portalfox.com/index.php?name=News&file=article&sid=2626)  del cual pueda ser util adaptarlo.

Si, lo conosco ! Pero mi opcion sera dejar que la gente configure sus propias opciones de envio de email.

saludos

Luis Dutari
Córdoba - Argentina

Gracias !

Saludos

Cesar

June 10, 2010 4:10 PM
 

Andy B-R said:

Hi,

I love your previewer  - works a treat, but I cant seem to stop teh dirty "SET TALK"'s when i use the PDF output, it seems to happen somewhere in the .Render() method, but all the attempts I've done to stop this seem to fail.

Although when i call it in a test exe it works fine, just when i incorperate within my app it shwos the TALK.

Any ideas?

ta

andy

 

Hi Andy,

I thought that was fixed in version 1.31 ! Are you using the latest version ?

June 10, 2010 6:22 PM
 

MAnuel B. said:

Cesar.
Ya instale la version 1.35,  con Impresoras de Matriz. sigue igual reduce el tamña al pareser ahora a media carta lo esta haciendo condensado.

Y pues el ejemplo que mandaste lo hace igual, Efectivamente creo que es problema de Reportlistner.  pues solo lo use con reportlistener sin usar el foxypreviewer com me dijiste. .  y resulto lo mismo.

No se si se pueda la siguiente propuesta, yo lo estube buscando pero la verdad, no encontre ni como ni donde hacerlo.  te digo la siguiente propuesta.

Si con el Report form   no da problema.  
Se podra? que al momeno de dar click en el boton de imprimir ya en la vista preliminar de foxypreviewer realizar un Rerport form reporte... to print   directo..
y asi solucionariamos el problema pues nos saltariamos la impresiorn con el reportlistener..   y lo ariamos directo por Fox. y sin ningun problema creo Yo.

Ahunque el report form se tendria que liberar del reportlistener para que funcionara correcto.  Se me ocurre no se si se pueda ?

El previo esta bien con foxy para poder enviar a los demas formtos , PDF,XLM etc..  incluso Mail.  pero ya cuando se va a imprimir.  usar report form,  pero esto incluido en el boton de Foxypreviewer  
Espero me de a entender...

Esto es posible?

Saludos

Si, es exactamente eso lo que la propiedad "lUseListener = .F." tiene que hacer. Estas seguro que la configuraste corretamente ?

June 10, 2010 6:25 PM
 

MAnuel B. said:

Efectivamente eso hice  cambie la propiedad IUselistener=.F. y lo que sucedio fue que me pone el reporte en el Form de donde mando a llamar el reporte, te comento que estoy utilizando Foxypreviewercaller.prg  no se si tenga algo que ver pero no me lo manda a la impresora, No lo imprime, solo lo mustra en el form que manda a llamar ese reporte...

Algo estoy haciendo mal por ahi..  con el foxypreviewercaller.prg????

Saludos.

No, voy a intentar otro cambio, mas tarde procure por la nueva version. Gracias !

June 10, 2010 8:38 PM
 

MAnuel B. said:

Animo!!!!   Esta Excelente el Foxypreviewer ,   Son detalles..   Pero con un poco de paciencia y Ayuda de todos vamos a sacar esto..  

En foxypreviewer en que variable o en que propiedad se guarda el nombre del reporte original  el .fxr ?
quisiera mandar desde el click del boton imprimir  el report form MiReporte.fxr to print noconsole.   haber que resulta...

Procure por el metodo "ActionPrintEx()" :-D

June 10, 2010 8:52 PM
 

MAnuel B. said:

haber...  goHelper._lSendToPrinter = goHelper.SetPrinter(goHelper.cPrinterName) es lo que tendria que cambiar por el Report form....   to print noconsole????
June 10, 2010 9:09 PM
 

pepere_jack said:

Hi cesar.

I sent you the source code twice.  First from version 1.31 (discard the zip but you can keep the message) and I just resent from version 1.35.

I hope this will help!

THANKS A LOT !

I hope to play with it in the next few days :-D

June 10, 2010 10:41 PM
 

Andy B-R said:

Yes I'm on 1.32, the strange thing is it works fine in my sample app and nothing is directed to the console but in my main app it dirties the console.

I've read teh article about how you move teh code in the loadReport but doesnt seem to make any difference. I've tracked it down to the .render() method but i cant seem to narrow it down any more. Any chance you could tell me what the fix was in case for some reason i have the older version?

ta

andy

Thanks Andy, I'll try to deal with it, I hope to send a new release in the next 3 days, with some other tweaks people asked as well :-D

June 11, 2010 9:11 AM
 

Kalpesh Chhatrala said:

_ReportPreview = FULLPATH("FoxyPreviewer.App")
SET REPORTBEHAVIOR 90
REPORT FORM (ADDBS(HOME(1)) + "Samples\Solution\Reports\colors.frx") PREVIEW

as per told you i run above Option. It run very easily.

but how can i change location of toolbar and disable printing option etc...

I'm sorry, but for the general usage, without creating explicitly the FoxyPreviewer object manually, the options are really very few, because we can't have full access to the ReportListener used, and also know for sure all the clauses that were sent in the REPORT FORM command.

For more customizations, you need to use the other aproach, the one that brings you full control.

June 11, 2010 9:29 AM
 

Andy B-R said:

Oh Cesar, I forgot to mention I made some modifications so that the same report could be run several times in a scan and then all output to a single printjob.

e.g.
loReport.AddReport ('invoice')

select customers
scan
  select invoicelines
  set filter to invoicelines.customerid = customer.customerid
  runReport(,.T.)  && where the .T. means leave report open
EndScan

runReport(,.F.)  && where .F. means close report

basically with a single run report at the end it didnt allow for teh same report to be run on the data within teh scan so I thourght this would be a good way of doing it, athough I then had to play with the pdf/email outputs to that this worked too.

Was there other ways of doing this or did i do right ?

ta :)

Andy
 

I'm sorry Andy, but I really could not undesrtand your sitution... Can you try to explain it again ?

June 11, 2010 9:35 AM
 

ppiyushjv said:

Hello Sir,

Great Job!!!!!!

Now i have remove all source code in project and use reportoutput.app,reportpreview.app,foxypreviewer.app.
but problem is when i change printer form preview form and print then print gone to default windows printer not  in vfp Default printer..

Note: printing is work in source code but not in project

Regards,
Piyush

Hi Piyush,

I'll check that, thanks for the info

June 11, 2010 1:58 PM
 

Andy B-R said:

Hi cesar,

basically we have a batch print run which would print the same report for different datasets.
The addReport() methid is used for adding different reports to the same preview.
However if we need to run the same report (e.g an Invoice) but for different customers, via a batch run the report would have the source alias but the data in the alias would be filtered for each run. As the RunReport() methid is run at the end it didnt work for me.

So i had to make some modifications to  the code to allow the same report to be run several times on different records in the alias but all output to teh same preview...

does this make any sense...hope so,
ta

andy

Yes, that makes sense now, thanks for clarifying. Craig Boyd told me that he added a 3rd parameter to the "AddReport()" method, allowing users to pass the name of the alias to be "selected" before each report run. Do you think that would solve the issue ?

Regards

Cesar

June 11, 2010 3:46 PM
 

Andy B-R said:

Hi cesar,

no i dont think it would because it is the same alias but different records. Thats a shame, i've also thourght about creating many alias's (selects on the actual alias) but i often have hundreds of reports to do in a single preview, so i would hit VFP's maximum of open cursors.

So my only problems are the printer drop down not printing to the changed printer if doing print from the previewer. Ad the dirsty PDF rendering to the console.

many thanks for your efforts - let me knwo if you manage to fix the pdf rendering problem.

ta again :)

andy

Ok, let me see what I can do with these 2 things :-D
June 11, 2010 6:19 PM
 

MAnuel B. said:

Un Detalle Cesar.
Cuando envio 3 o mas copias..  me manda unicamente 2 asi le ponga que imprima 10 copias Solo imprime 2,    

Si le pongo 1 lo imprime
si le pongo 2 imprime las dos
Si le pongo 3 imprime 2
Si le ponga 4,5,6,7  etc.   Solo imprime 2


Saludos
June 11, 2010 8:21 PM
 

Carlos Alloatti said:

"Byron Santizo said:

Que  ocurrio que ya no hay actualizaciones de este proyecto que esta muy bueno, siempre pasa lo mismo con la mayoria de proyectos de VFP que los dejan a mitad de camino, espero que este sea la excepcion que el autor de este proyecto continue hasta teminarlo, Gracias, ByronSantizo hotmail dot com"

¿Quién te crees que sos para publicar un comentario así? Sos un irrespetuoso y un maleducado.

Mirá, como encargado de otro proyecto "que los dejan a mitad de camino", y con tdo respeto, te comento: el problema es gente de m... como vos que se cree con derecho a exigir a los que con generosidad comparten GRATUITAMENTE su trabajo y su tiempo con la comunidad.

El 99% de los que se benefician con estos aportes no se toman el tiempo de ni siquiera enviar un "gracias" al autor, y menos aún de aportar soluciones, reporte de bugs, etc.

Entonces es muy simple, el proyecto se sigue mejorando, pero el autor pierde interés en compartir su trabajo.

Si tanto te interesa y te sirve este proyecto, podrás ofrecer una donación al autor, o aportar ideas, sugerencias y soluciones a los bugs, o al menos una nota de agradecimiento.


June 11, 2010 9:39 PM
 

Eric J. Muñoz said:

Amén a eso, Carlos! Nos has ahorrado bastantes "letanías" a varios con respecto al comentario de Byron =D

César:

FELICIDADES!! Ya quisiéramos muchos de nosotros tener tu ingenio y disposición para ayudar.
June 11, 2010 10:41 PM
 

Andy B-R said:

Hi cesar,

I've tested the new 1.40 version and am still get dirty console, can you let me know where the TALK fix was put in and i'll check in case i havent merged your changes in properly...

many thanks - i really appreciate your efforts - this is a really cool app :)

Andy

 

Hi Andy,

If you run one single report, does it still dirty the console ? If you definitely want to fix this issue, read the article from Cathy Pountney, and follow the instructions provided: http://cathypountney.blogspot.com/2009/04/set-talk-appears-to-be-on-when-running.html

As a workaround, you can send the output to another hidden window, like I did. Adapt this code to your needs, see if it can help. In fact, this is a bug from VFP9, not from FoxyPreviewer, do you understand that ?

 

DEFINE WINDOW Window_PDF FROM 04,05 TO 27,75
ACTIVATE WINDOW Window_PDF NOSHOW

* Put your code to run the report here

RELEASE WINDOWS Window_PDF

June 14, 2010 9:57 AM
 

Andy B-R said:

Hi Cesar,

thanks for that, i've already tried Cathy Poutney's fix but it didnt seem to make any difference, so not sure what I was doing wrong!!

But your idea is a great one which i didnt think of, so i'll try re-driecting the output!!

thanks agains cesar

Andy

Great! Please let me know how that goes! Other wise, send me some samples to my email, so that I can try to reproduce the issue, and maybe help you solving it.

June 14, 2010 1:56 PM
 

MAnuel B. said:

Cesar:

Te comento que con la Version 1.4 del Foxypreviewer, ya funciono la opcion de la impresion con Matriz de punto y tambien se corrigio lo de el numero de copias, funciona Excelente!!!  
Ahora ya puedes utilizar cualquier tipo de impresora. Laser, Inyeccion y Matriz.
Muchas Felcidades!! y Muchas Gracias por tan ESpectacular Aporte...

hora solo voy a ser pruebas con envio de Mail..

Te envio mis comentarios..

Saludos

Que buenas noticias ! Gracias Manuel !

June 14, 2010 8:00 PM
 

ppiyushjv said:

Hi Cesar,

i have cheeked ver 1.40 but still not print vfp default printer..

Piyush

Hi Pyush,

I suspect that this can be related to some permissions in your computer. Are you logged as ADMIN ? What OS are you using ?

June 15, 2010 7:31 AM
 

Andy B-R said:

Hi Cesar,
Fixed it, it was was the reports were daisy chained, something in the report listener was leaving it turned on so when runReport was called for a second time using same listener then the console was dirtied.

I modified the pdfListener:

In "StartPDFDocument ()" I added teh set console.
SET TALK OFF
Set Console OFF

In "UnloadReport()" I commented the following lines:

*!* LOCAL llConsole, llTalk
*!* llConsole = This._lSetConsole
*!* llTalk = This._lSetTalk
*!*
*!* SET CONSOLE &llConsole.
*!* SET TALK &llTalk.

In "BeforeReport" In commented out the restore lines and forced it to be off:

*!* ._lSetConsole = SET("Console")
*!* ._lSetTalk = SET("Talk")
SET TALK OFF
Set Console OFF


Thanks for all you help on this mate, much appreciated :)

ta

andy

 

GREAT !

I'll updated the sources for the next release. Cheers,

Cesar

June 15, 2010 9:39 AM
 

Carlos Morandin said:

Hola, en la ultima version (1.41) me da un error con el nuevo parametro del addreport, el error creo esta en:
This._oReports.Add(tcReport)
This._oClauses.Add(EVL(tcClauses,""))
* This._oAliases.Add(EVL(tcClauses,""))    

me parece deberia ser:
This._oAliases.Add(EVL(tcAlias,""))
Saludos
Carlos

Hola Carlos, Gracias por testar y informar el problema. Esto sera solucionado hasta manana, en la proxima version ! Saludos, Cesar

June 15, 2010 2:28 PM
 

ppiyushjv said:

Hi cesar,

i using win 7 as  a administrator.
and my application exe is on other computer like (xp and vista) do something.
i run application in win 7 as administrator.

thNxs
Piyush

Thanks, does that happen when you use another OS ? I could not reproduce the issue here... Is it happening to someone else ? Any other ideas ?

June 15, 2010 7:59 PM
 

Klaus said:

Thank you Cesar for implementing the Property PDFnPageMode into the PDFLISTENER.

Now a User can decide how the PDF is build. with Normal view or with showing the outlines pane or thumbnails pane.

One other question: When the PDF is generated with the HaruLib i watch that lines are more bold than in original. Could somebody can explain me why, or better :-) could tell me if there is a workaround.

Thanks to all

Klaus

Hi Klaus,

I'm glad you liked it. Thanks for your suggestions and support. In fact, this enhancement comes from you :-D.

About the PDF rendering, PDFx was created by Luis Navas, you should try to post a comment in his blog regarding this ?

Regards

Cesar

June 16, 2010 8:06 AM
 

ppiyushjv said:

Hi cesar,

printing not work in another os also.

1. PUTFILE() function not work in top level preview..

Piyush

Hi Piyush,

That's totally strange, I really can't reproduce these problems. Nobody else reported these issues, I really don't know what should I do to help you with this. Does the sample EXE work ok for you ?

June 16, 2010 11:03 AM
 

piyush said:

Hi Cesar,


please give me our mail id or send test mail on xxxxxxxxxxxxx So I will give u my source code.

thNxs

Ok, please check your inbox !

June 16, 2010 8:32 PM
 

RIVA said:

VFP IS ROCK !!, Great work Cesar ...thank's a alot ..
June 19, 2010 6:24 AM
 

foxpro.catalyst ?? » Blog Archive » Visual FoxPro Links – 06/18/2010 said:

June 19, 2010 10:23 AM
 

Mister_john said:

Olá pessoal seguinte, estou executando o foxpreview em minha aplicação porem não consigo fazer com que ele funcione em português oq devo fazer?

Abraços..

Você deve recompilar o aplicativo, mas em portugues. Faça o seguinte:

Abra o arquivo "FoxyPreviewer.H" e descomente a linha #DEFINE PR_PORTUGUES, e comente a linha PR_ENGLISH

Abra o projeto FoxyPreviewer.pjx e recompile. Use a versao do FoxyPreviewer.App que voce acabou de gerar.

June 19, 2010 2:59 PM
 

Mister_john said:

Pessoal o problema agora mudou o FoxyPreviewer funciona em português, porem tenho toda vez apontar para o executavel, em inglês ele faz isso altomático.Como resolvo isso??

Obrigado.


Sr. John,

Sua pergunta nao esta clara... Para qual executavel vc esta precisando "apontar" ?

June 19, 2010 4:44 PM
 

Pero108 said:

Hi Cesar.
Your previewer works great.
May I do suggestions?

Hi Pero,


Could You make icons 40x40.
Yes, for sure, you can replace the current icons with the ones you desire, and recompile it ! Please send me a screenshot when you make it !

Colud You make tollbar start with all commands in one row.

Sorry, I think I didn't understand that... How "in one row" ? Have you tried setting the RESOURCE OFF ?


Colud You include some properties to decide if user can close toolbar or preview form.

You mean to eliminate the "Close" button ? Notice that the user can right-click the Report preview window, and use the context menu, that has exactly the same options from the toolbar.

Hope that helps!

Cesar

June 21, 2010 9:15 AM
 

Mister_john said:

Olá, ja consegui compilar o FoxyPreviewer em português, porem em portugues ele não aciona automaticamente, quando clico no botão de relatório abre uma janela de procura e tenho que o encontrar em meu computador o executavel compilado em portugês e o selecionar para que o report funcione em português.Mas se o executavel for o em inglês ele aciona automaticamente.
Abraços.

Mister John,

 

Vc esta falando em Executavel ? Quando for compilar, compile em "APP", não em "EXE" !!! Acho que isso ja deverá resolver. Repare que eu solto sempre um APP !

Boa sorte, Abs !

César

June 21, 2010 1:24 PM
 

pero108 said:

Hi Cesar

-- I did replace icons but command buttons are smaller than icons.
Ok, I'll make the buttons resize themselves according to the image size.


-- When I start preview commands toolbar is in two rows. In first row are navigation buttons and zoom combo. In second row are all other buttons. Double click on toolbar header dock toolbar and make all buttons and combos appear in one row.

Please try calling the command

SET RESOURCE OFF  before calling FoxyPreviewer.


June 21, 2010 4:30 PM
 

pepere_jack said:

He Cesar.

Little language correction for the FRENCH translation:

#DEFINE PR_MINILABEL  "Pages %FP% à %LP%"

Thanks.

Thank you Jacques ! I'll update in the next release, hopefully, with a better suport for multilanguages :-D

June 22, 2010 8:10 PM
 

Victor López said:

Hi Cesar

This is for pero108
I think he needs to change the toolbar dock
pero108, just change in the foxyPreviewCaller.prg:

nDockType = 0 && aditionally I use
nWindowState = 2 && Maximized

this is goint to dock the toolbar in the upper of the screen and show the report in maximized mode

Thank you very much Victor !

June 23, 2010 5:55 AM
 

Mister_john said:

Olá Cesar


O erro continua a acontecer, deixa eu ser mais claro com você seguinte, no projeto FoxyPreviewer existe um executavel, este executavel faz com que e aplicação funcione muito bem em INGLÊS porém quando mudei o idioma para PORTUGUÊS esse mesmo executavel não age como deveria toda vez ue aciono o botão para que o meu relatório venha tenho que navegar em uma janela de procura para indicar onde ele esta e quando na verdade a unica coisa que fiz foi...  
   * #DEFINE PR_ENGLISH
   #DEFINE PR_PORTUGUES
   * #DEFINE PR_GERMAN
   * #DEFINE PR_ITALIANO
   * #DEFINE PR_TURKISH
   * #DEFINE PR_CZECH
   * #DEFINE PR_GREEK
   * #DEFINE PR_PERSIAN
   * #DEFINE PR_FRENCH
   * #DEFINE PR_ESPANIOL
Apos ter feito isso compilei novamente o executavel como "APP"
June 23, 2010 7:12 PM
 

Mister_john said:

Olá Cesar


O erro continua a acontecer, deixa eu ser mais claro com você seguinte, no projeto FoxyPreviewer existe um "executavel", este executavel faz com que e aplicação funcione muito bem em INGLÊS porém quando mudei o idioma para PORTUGUÊS esse mesmo "executavel" não age como deveria toda vez que aciono o botão para que o meu relatório venha tenho que navegar em uma janela de procura para indicar onde ele esta e quando na verdade a unica coisa que fiz foi...  
   * #DEFINE PR_ENGLISH
   #DEFINE PR_PORTUGUES
   * #DEFINE PR_GERMAN
   * #DEFINE PR_ITALIANO
   * #DEFINE PR_TURKISH
   * #DEFINE PR_CZECH
   * #DEFINE PR_GREEK
   * #DEFINE PR_PERSIAN
   * #DEFINE PR_FRENCH
   * #DEFINE PR_ESPANIOL
Apos ter feito isso compilei novamente o executavel como "APP" como você havia dito, e o erro perciste em acontecer.Fico no aguardo de  ajuda.
Abraços.

Ok, agora deu pra entender. Vou tentar reproduzir mais tarde e te retorno até amanhã ! Abs !

June 23, 2010 7:15 PM
 

pepere_jack said:

Cesar,

I found a bug into the part that I developped (miniatures).  

In the nPageSet_assign method, please replace the line

IF I > This.nPages - (This.nPageSet * This.nMaxMiniatureItem) + This.nOtherThenProofObj

with

IF I > This.nPages - ((CEILING(This.nPages / This.nMaxMiniatureItem)-1) * This.nMaxMiniatureItem) + This.nOtherThenProofObj

This will correctly hide unused pages when there is more dans 2 pageset and you decide to go directly to the last pageset.

Thanks ! This will be updated in the next version

June 23, 2010 11:09 PM
 

Antonio Sousa said:

Excelente trabalho
So não consegui colocar a exportação para excel a funcionar
cria o ficheiro mas depois quando tento abrir com o excel da a mensagem que o ficheiro não é fidedigno mando abrir na mesma e aparece a mensagem não é possível abrir o ficheiro devido a erros  

Ola Antonio,

O Excel não abre em nenhum relatório ? Ou em algum caso específico ?

 

June 24, 2010 10:49 PM
 

Naresh Patel said:

I am using foxypreviewcaller to run report. In some report, it generate program error with message: "object is not contained in a FORM" on REPORT FORM.... OBJECT.... line of callreport proc. After i ignore the error, it returns without showing preview.When i run report again, it works perfectly.  I can't understand why this happens. Pls help me.

Note: this happen with some reports only.

Hi Naresh, Can you tell me in what line of code this is happening ? Could you please send me by email one of these reports that is failing ? I'd like to solve that. Maybe you could make sure that there is no instance of FoxyPreviewer available ?

June 26, 2010 10:04 AM
 

Antonio Sousa said:

Não abre nenhum mas se usar o demo funciona
penso que seja um SET que tenha na aplicação mas ainda não descobri qual
Estou a usar o statusbar do ctx32 mas até isso ja desactivei

Olá Antonio, Deve ser algo relacionado mesmo. Por favor, me mantenha informado, caso você conseguir resolver, ok ? Abraço !

June 26, 2010 5:22 PM
 

Antonio Sousa said:

Ja meti os SET todos do programa no exemplo e no exemplo continua a funcionar dentro do meu aplicativo cria o ficheiro mas o excel não o abre já não sei o que fazer mais

O problema é que o ExcelListener foi criado por uma 3a pessoa, eu apenas o adaptei a FoxyPreviewer. Certamente há algo para ser ajustado, se vc conseguir criar um projeto simples que reproduza o problema e me enviar por email, posso tentar te ajudar a isentificar o problema.

Abs !

June 28, 2010 7:37 PM
 

Pero108 said:

It looks like You put old source code to download.

Hi Pero,

Yes, you're right, I have to check in my other computer and resend the files again. I hope tu upload the correct new vrsion later. THANKS FOR THE INFO !

Regards, Cesar

July 1, 2010 3:07 PM
 

rafael said:

Thanks Cesar, the class is amazing and your team Rock's fox

Regards from cancun

Gracias Rafael ! Thanks for the kind works. I'm glad to know that you find it useful :-D

July 1, 2010 6:27 PM
 

MAnuel B. said:

Disculpa Cesar la version que tienes para bajar es la 1.45 o la 1.49 ?
Porque esta abajo que ya esta la 1.49 pero arriba dice bajar 1.45 cual es cual?
Saludos

Hola Manuel,

Perdon por mi confusion. Por favor, aguarde hasta manana! Gracias de antemano !

July 1, 2010 7:19 PM
 

Pero108 said:

Thanks Cezar, the class looks great with larger icons.

I have problem with mail. If I use Outlook express as mail client everything works fine, but if I use Outlook 2007 or Outlook 2003 it does not working.

Hi Pero,

I'm glad it works with the larger icons :-D. Just by curiosity, could you send me a screenshot of your toolbar ? How does it look now ? About emails, I think the best option is to use your owm email routine.

July 2, 2010 2:04 PM
 

Antonio Sousa said:

Ola preciso do teu email para te fazer chegar isso então

Ola Antonio,

Mande para    vfpimaging   hotmail   com

Abs !

July 3, 2010 6:46 PM
 

Pero108 said:

Hi Cezar

could You send me your e-mail address so I can send you screenshot of toolbar.

Hi Pero, please send it to vfpimaging at hotmail dot com . Thanks in advance !

July 5, 2010 9:20 AM
 

MAnuel B. said:

Cesar:

El foxypreviewercaller.prg  manda un error actualize ambos archivos el Foxypreviewer.app y el Foxypreviewercaller.prg   y manda el siguiente error en el siguiente codigo:

REPLACE Expr WITH ;
                MLINE(Expr,ATLINE("ORIENTATION",Expr)), ;
                Tag WITH "", Tag2 WITH ""
USE IN (lcFile2)


Desconoce la variable "Expr" ..
Alguna recomendacion?

Hola Manuel,

Gracias por testar, acabo de subir la version 1.51 con las correcciones. Saludos, Cesar

July 5, 2010 8:27 PM
 

Pablo said:

Hola Cesar, te cuento, baje la version 1.45 y funciona ok, todo bien, la estaba utilizando, resulta que ahora baje la 1.49 la pase al español, la compile y la quiero utilizar como lo hacia con la 1.45 y resulta que me da error, me dice que falta la definicion de la clase foxypreviwercaller, y estuve revisando el codigo del Prg y no que la diferencia entre la 1.45 y la 1.49 esta en el inico del prg del foxypreviwercaller en el mismo en la ultima version en la 1.49 pones foxypreviwercallerB cosa que en la 1.45 no esta esa "B" y por eso creo que no funciona, porque volvi a poner la 1.45 y me funciona de maravillas.

Hi Cesar, If you don´t understand in spanish, tell me and i´m try to explain in english, but my english is not good. y few word the problem between 1.45 and 1.49 is in the foxypreviwercaller.prg, the difference is that en 1.49 in the prg you put foxypreviwercallerB that "B" in 1.45 is not present. the version 1.45 run sucessfully not yet 1.49.

Sorry for my english, i hope you understand.

regards from Argentina

Pablo

Hola Pablo,

Gracias por las informaciones. Acabo de subir una nueva version con una pequena modificacion. Por favor dime si esta bueno ahora. Gracias de antemano, Cesar.

July 6, 2010 4:06 PM
 

Andy B-R said:

Hi Cesar,

Although we sorted the dirty TALK on the PDF - it cant seem to fix it on the normal previewer, i.e. when you simply do the below

_ReportPreview = FULLPATH("FoxyPreviewer.App")
SET REPORTBEHAVIOR 90
REPORT FORM (ADDBS(HOME(1)) + "Samples\Solution\Reports\colors.frx") PREVIEW

My problem is im getting teh console dirtied with...
.T.
.NULL.
GFXNORENDER
LISTENER.VCX
LISTENER.VCX
LISTENER.VCX
.F.
.T.
.T.
.T.
.NULL.

Any ideas....????

ta
andy

Hi Andy,

What version of the ReportPreview.App are you using ? The one that comes with SP2 ?

July 7, 2010 12:41 PM
 

Pablo said:

Hola Cesar, bueno muchas gracias por responder tan rapido a mi pregunta por el tema de funcionamiento, pero te cuento que baje la nueva version la 1.49a y sigo tengo problemas con el foxypreviwercaller.prg, a diferencia de la version 1.49 ahora el error que da es otro, me dice que no puede encontrar la expresion "EXPR".
En la 1.49 el error era que no encontraba la definicion de la clase foxypreviwercaller, ahora en la nueva en la 1.49a el error es ese.
Por las dudas te comento que la pase a español y la ompile de nuevo al app y reemplaze el prg anterior por el que viene en esta version, perooo el problema me persiste.

Yo por ahora igualmente sigo usando la 1.45 que funciona perfecto con esa no tengo problemas.


Muchas Gracias, saludos

Pablo desde Argentina

Hola Pablo,

Gracias por testar novamente. Acabo de subir la version 1.51 con la correccion. Gracias de antemano ! Saludos, Cesar.

July 8, 2010 2:18 PM
 

Pablo said:

Hola Cesar, bueno ahora baje la 1.51, la voy a probar y te comento si funciona bien como 1.45.
Aprovecho para consultarte, el boton de envio de email, funcioana directamente desde la barra, como le digo que ejecute el prg Mysendmail.prg o lo busca directamente, porque no lo puedo hacer que envie el mail.
O sea si lo ejecuto solo al PRG por fuera del foxy funciona correctamente, me envia el mail y lo recibo todo excelente. Ahora si lo ejecuto presionado el boton que esta en el foxy no pasa nada, no da ningun error pero tampoco me lo envia, el prg lo tengo agregado a mi proyecto como todo lo demas,

Muchas gracias por tus prontas respuestas

Pablo,

Para utilizar el envio de email anticuo, mantenga la propiedad

.cEmailPRG = "" && vazio

Saludos

Cesar

July 8, 2010 3:46 PM
 

Pablo said:

Hola Cesar de nuevo, bueno anteriormente te mande otro mensaje preguntandote por el envio de mail desde la barra, espero me puedas ayudar!!!!

Ahora bien, ahi baje y probe la version 1.51 y me encontre con lo siguiente, el foxypreviwer.h solo tiene el default en English, probe cambiarlo poniendo ESPANIOL pero no me funciona correctamente, me lo tradujo al portugues, jajaja, el .H como estaba antes para el idioma funcionaba OK, no se cual sera el motivo de porque lo cambiastes, ¿como hago ahora para cmbiar el idioma de la barra?
Despues el otro comentario es que en 40 el tamaño de los botones es como muy grande para la barra del foxy, yo creo que 32 o 36 estaria bien, como 40 quedan hasta desentrado los nombres ej: Copias. y las letras muy grandes en la seleccion de la impresora, ¿eso es asi?, probe cambiarlo a 32 pero no surgio efecto cuando compile todo la aplicacion de nuevo del foxy a app.

Bueno espero nueva noticias y si podes una respuesta al tema del mail.

Pablo desde Argentina

 

Hola Pablo,

Para traducir para espaniol, ahora tienes que cambiar una sola propiedad, por ejemplo:

.cLanguage = "ESPANIOL"

Perdon por el tamano de los botones, acabo de recompilar con los botones originales. Esto hice mas para testar, por que fue necesario hacer muchos cambios para acceptar botones mas grandes. Baje la version 1.51a por favor.

Saludos

Cesar

July 8, 2010 4:12 PM
 

Pablo said:

Hola Cesar, bueno ahi baje la 1.52 y esta bien, ahora si funciona como 1.45 que estaba estable, incluso le pude modificar el tamaño de los iconos de la barra y funciona todo OK.
Con lo que sigo sin saber como funciona o como hacer andar es el envio de email desde la barra del foxy. O sea si yo configuro el PRG y lo ejecuto por fuera del Foxy anda bien me envia el mail, pero si lo ejecuto del icono que esta en el foxy no pasa nada no da ningun error pero tampoco me lo envia, revise lo que me comentastes arriba pero no funciona.
hay que colocar algun set procedure al PRG para el envio de mail en algun lado, o como seria si me podes escribir un ejemplo.

Muchas Gracias. Thank you very much!!!!!

Pablo - Argentina

Hola Pablo, gracias por testar y por confirmar las mejoras. Voy a preparar un otro ejemplo para envio de emails.

Intente tambien utilizar la nueva propiedad

.cLanguage = "ESPANIOL"

Saludos, Cesar

July 9, 2010 12:23 AM
 

MIK said:

Hola César. Ante todo mi reconocimiento a un estupendo trabajo y agradecimiento por compartirlo con la comunidad de usuarios.

He instalado en mi aplicación esta excelente clase desde la versión 1.45 y con algunas correcciones en el codigo en el Foxypreviewercaller.prg pude hacerlo trabajar bien. Ahora la versión 1.53 que acabo de bajar trabaja muy bien, asi que no he tenido que hacer correcciones. Pero, he notado que desde la versión 1.49, la  ventaba GLOBAL PREVIEW que muestra las vistas en miniaturas, cuando se minimiza y se restaura, no se refrescan las vistas, aunque sí se muestran los cuadros y estos mantienen su funcionalidad.

Saludos y nuevamente gracias por tu trabajo.

Miguel Herbias
Lima-Peru.

Hola Miguel,

Muchas gracias ! Voy a verificar el problema y he de subir la correccion. Saludos, Cesar

July 12, 2010 8:37 PM
 

Antonio Sousa said:

Já descobri porque os ficheiros xls ficam danificados por causa desta linha no config.fpw

Title = 1nome ficticio

o porque ainda não analisei

Caramba ! Que doido isso ! Por favor, mande mais detalhes qdo descobrir qquer coisa. Obrigado por me atualizar ! Abs, César
July 13, 2010 11:46 AM
 

Antonio Sousa said:

Ultimo post que enviei estava mal ja consigo converter para excel sem o title mas apenas reports pequenos

Obrigado, por favor continue me mantendo atualizado. Abs !

July 13, 2010 3:04 PM
 

Manuel B. said:

Hola Cesar.:
Un comentario. Tengo la aplicacion con foxypreviewer 1.53 en una terminal con win xp y todo funciona de maravilla.
Lo ejecuto en red desde una terminal con win 7 y todo perfecto menos la opcion de Preferencias de impresion. me manda un mensaje de "ERROR AL REALIZAR ESTA OPERACION" y termina el proceso pero no me saca de la aplicacion...
me imagino que es un error dentro de foxy..

Alguna sugerencia.
Saludos

Hola Manuel,

Como yo se que utilizas REFOX, asegurese de utilizar la ultima version de REFOX para la proteccion de FoxyPreviewer.

Saludos !

July 13, 2010 6:26 PM
 

FRANCISCO said:

Me he dado cuenta que el pasar a XLS no funciona corectamente si usas en el informe a pasar el _pagetotal duplica las filas <cell lo que hace que cuando abres el xls desde excel te de un error de importacion HTML. He solucionado el tema poniendo lo mismo que se utilizo para el render del RFT. en el render del Excellistener he colocado al principio
--------------------------------------------
* From PDFx by Luis Navas
* Code to detect if report will run twice because of use of _PAGETOTAL
If This.TwoPassProcess And This.CurrentPass=0 Then
* DoDefault(nFRXRecno, nLeft, nTop, nWidth, nHeight, nObjectContinuationType, cContentsToBeRendered, GDIPlusImage)
NODEFAULT
RETURN
EndIf

y así se ha solucionado el problema.

Saludos espero os sirva.
July 14, 2010 8:56 PM
 

JAKETON said:

Buenas, cuando generaba los xls e intentaba abrirlos en excel me generaba un error de "errores de importacion HTML" investigando un poco el tema me di cuenta que duplicaba los <cell en el fichero. Mirando me di cuenta que esto se producia al usar el comando _pagetotal en los reportes. Utilizando la misma tecnica que en la exportacion a RTF, modifique la clase pr_excellistener objeto excellistener el metodo render añadiendo entre el "lparamenter ...."  y "IF this.lOutputToCursor... "

---- seccion añadida sacada del RTF

* From PDFx by Luis Navas
* Code to detect if report will run twice because of use of _PAGETOTAL
If This.TwoPassProcess And This.CurrentPass=0 Then
* DoDefault(nFRXRecno, nLeft, nTop, nWidth, nHeight, nObjectContinuationType, cContentsToBeRendered, GDIPlusImage)
NODEFAULT
RETURN
EndIf

Así se me han solucionado todos esos problemas. Espero os sirva a vosotros si os da el mismo problema.

Saludos

Hola Francisco / Jaketon ?

Muchas gracias ! Voy a implementar tu sugestion en la proxima version. Es muy bueno ver gente trabajando con los codigos fuente y aportando ayuda. Sus aportes fueron muy apreciados.

Saludos,

Cesar

July 15, 2010 12:58 PM
 

Antonio Sousa said:

Já descobri quando é que o excel não abre o ficheiro quando o report usa a variável
_pagetotal
so ainda n vi como resolver
July 15, 2010 5:03 PM
 

Antonio Sousa said:

Problema resolvido alterar o clase pr_excellistener metodo render
colocar

If This.TwoPassProcess And This.CurrentPass=0 Then &&Code to detect if report will run twice because of use of _PAGETOTAL
   DoDefault(nFRXRecno, nLeft, nTop, nWidth, nHeight, nObjectContinuationType, cContentsToBeRendered, GDIPlusImage)
   Return
EndIf

Beleza Antonio,

É exatamente essa a solução que o Francisco sugeriu no comentario anterior. Vou atualizar a biblioteca hj de noite !

Abs

Cesar

July 15, 2010 5:10 PM
 

Andy B-R said:

Hi Cesar,

Yes I'm using sp2 version. In the end I had to SET NOCONSOLE ON before I did REPORT FORM..... this works ever time, although its a pain it does work perfectly fine without having to direct the REPORT FORM to a dedicated hidden window each time.

Thanks again for your help,

ta

andy

Hi Andy,

I'm sorry, but I have no idea why it is happening. See the sample project that ships with FoxyPreviewer, there 2buttons call reports directly, without this issue. Please let me know how it goes.

July 16, 2010 3:58 PM
 

Grammy said:

Is there a way to turn the toolbar off and only use the right click menu.  The buttons on the toolbar are not working for me, however the right click menu works fine.  This would solve the problem for me.  I have tried the nowait option and the report immediately disappears.

Thanks in advance, and thanks for a great class.

Hi Grammy,

You are probably using a TOP-LEVEL form. There is a known bug in VFP9 that makes the toolbar become inaccessible. Fortunately MS has published a hotfix. You can download it directly from this link, and make sure to follow carefully the instructions. After that, the toolbar will work normally. http://code.msdn.microsoft.com/KB968409/Release/ProjectReleases.aspx?ReleaseId=2445

Besides that, in the next version to be published tomorrow, you'll be able to use the new property - nShowToolbar = 2 && Invisible; Numeric, determines if the toolbar will be visible or not at startup && 1 = Visible (default), 2 = Invisible, 3 = Use resource

Hope this helps !

July 19, 2010 11:12 PM
 

Miguel Gauna said:

Hola Cesar:
De nuevo felicitaciones a ti y a todos los que colaboran con tu proyecto
Te cuento que mediante un programa en el que hago el select llamo a un
reporte paso intermedio llamo a un formulario donde a su vez acomodo si es ;
resumido o no y me salta el siguiente error:


Mensaje de Error

Repor Preview Error
Line 1150 in Show():
expte
Frxpreviewform.Error()
Do you want to suspend execution?

Si     No     Cancelar

Dandole a No 2 veces seguidas el programa continua sin complicación,
no es problema, pero quedaria mejor si no apareciera el error.

Saludos y mis felicitaciones nuevamente.

Miguel Gauna

Hola Miguel,

En qual version el error acontece ? Necesito saber para poder encuentrar el problema. Saludos !

July 20, 2010 1:11 AM
 

Burcin said:

Hi I'm using your application.My opinion its great application.But To receive the report "Insufficient GDI resource" error.Reports pages total=5000 or high

July 20, 2010 11:05 AM
 

Soykan OZCELIK said:

Hi Cesar,
one of friend report me that reports giving error at over 4700 paged reports.

Hi Burcin and Soykan,

Thanks for the information, but I'm afraid that there is nothing to do regarding this, because it seems to be a limitation of the VFP9SP2 Reporting system.

Is this problem happening on the preview ? Or when printing ?

July 20, 2010 1:18 PM
 

jesons said:

About  libhpdf.dll   [Haru Free PDF]
libhpdf.dll does not support Simplified Chinese, will be addressed?
Support for Chinese Simplified key code can you tell me, that I try, thank you!
MY NAME IS 志在飞翔
I came to Shanghai, China  我来自中国上海,谢谢!!

Hello  志在飞翔 !!!

As far as I know, Chinese is not supported by the Haru library. Anyway, it is possible to use TrueType fonts with HARU. Give me some time, I'll try to investigate the possibility of including these fonts.

By the way, how do you say 志在飞翔 in latin ?

July 21, 2010 3:54 AM
 

Miguel Gauna said:

Hola Cesar, descarge la ultima version 1.53 pero en las anteriores, tambien lo hacia, VFP9 SP2, Gracias y  Saludos
July 21, 2010 4:25 PM
 

Grammy said:

Hi again Cesar

Also I am still having problems with error

---------------
I compile the application, close vfp and then run the exe.  When I right click on the preview screen I get the following error.

"Operator/Operand type mismatch
Line 0 in timer()
frxpreviewform.error()
Do you want to suspend operation
yes no cancel"

----------------------

Any idease on how to handle this or trap for this error.

Hi Grammy,

Are you using VFP9SP2 ? Please at least use the Report*.APP files from SP2 and tell me if the issues go away.

Hope to hear from you soon !

 

July 22, 2010 6:59 PM
 

PabloB desde Argentina said:

Hola Cesar, hoy te mande un mail a tu cuenta con imagesn, tengo error en el envio de emails, configure todo y trate de enviar uno y me da error, quisiera que me digas si te llego, si el error es mio o del foxy por Algo. Muchas Gracias

PabloB
July 23, 2010 8:23 PM
 

Pero108 said:

Hi Cesar

Great class.

Is it possible to leave report previewer opened after we save report as image or send mail or print?

Hi Pero,

Unfortunately NOT, because FoxyPreviewer needs to close the current report session in order to generate the output files.

July 26, 2010 9:36 AM

What do you think?

(required) 
(optional)
(required) 

This Blog

Post Calendar

<February 2010>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
28123456
78910111213

Syndication