Home Up Feedback Contents Search

FormgenWin FAQ
FormgenWin FAQ Mapi FAQ Secure FAQ CS Secure FAQ ToolPack FAQ

 

 

 

Best when viewed with:

 

   Get your copy now!

F requently A sk Q uestions

Why do I receive an 'access violation' whenever I open a form containing the FormGenWin component?

Is there a way to print forms or reports without previewing them first?

How can bitmaps be added so that they don't require the file be present at run-time?

I want to print a database memo field. How can I get the information from the database table onto the form?

Is it possible to disable the printer setup dialog when the form is printed?

When I load the sample (order.ifm) I get an error message ('... is not a valid floating point value'). Why does this error occur?

I've created an .IFM which looks right, but when I use the code in an application some of the text boxes do not display. Why is this happening?

I am having trouble printing on certain printers. Is this a known problem?

How do I print to a text file?

The vertical alignment feature doesn't work on my HP LaserJet. Is this a known problem?

Can the FormGenWin Editor be distributed to our customers?

Can the FormGenWin Editor create a form that can be read and printed at run-time?

Are there any limits to the number of elements on a single page? What about limits on the size of a report (i.e. how many pages)?

When I change printers using the SetPrinterByName or SetPrinterByIndex, the fonts print too large or too small. Why does this error occur?

Why do I get the error "xx.dcu file not found" or "xx.pas file not found" when running or compiling my application in Delphi 3.0

How can I scroll Up & Down, Right & Left in the Preview window using key strokes?

How do I use BuildDBReport with a database that has field names that contain spaces?

Why do I get a blank page in the component window when I build a report?

Why do I have a blank page at the end of my report?

The last page of my report is not the last page of a multi-page form.

The total number of pages is not calculating correctly.

When using the BuildDBReport method, not all my records are printing on one page.

When using the BuildDBReport method, my report is not starting a new page when the key field changes.

My graphics do not display or I get "Error Loading Image" when using external files.

The FormGenNav's FirstPage & LastPage buttons won't work.

I can't print when not on the first page of the report.

The FormGenNav buttons (FirstPage,LastPage,NextPage,PrevPage) are disabled when I page back to the first page of the report.

In the Visual Form Editor I get an error when selecting multiple objects.

Why do I get the message "Error converting the Clipboard Text"?

Why do I get the message "Warning: You have attempted to select too many objects for the available clipboard memory"?

Why do I lose my custom cursors after printing?

Answers

Why do I receive an 'access violation' whenever I open a form containing the FormGenWin component?

The FormGenWin component accesses your computer's default printer information upon creation. If you do not have a default printer set up, you will receive an 'access violation' as soon as the create method is called.     Top

Is there a way to print forms or reports without previewing them first?

Yes. By setting the visible property of the FormGenWin component to False, the report preview is not shown. To print the report, call the Print method.     Top

How can bitmaps be added so that they don't require the file be present at run-time?

Bitmaps should be placed in a resource when possible. This cannot be generated from the FormGenWin Editor and must be modified after generation.  Here's some code which loads a bitmap labeled 'BITMAP_1' from a resource file 'aboutbmp.res'.     Top

{$R aboutbmp.res}

procedure TForm1.FormGenWin1BuildReport(Sender: TObject);
Var
      lbmpImage:TBitmap;
begin
   lbmpImage:=TBitmap.Create;
   lbmpImage.Handle:=LoadBitmap(hInstance,'BITMAP_1');
   FormGenWin1.SizedImage(1.0,1.0,3.0,3.0,lbmpImage);
   lbmpImage.Free;
end;

I want to print a database memo field. How can I get the information from the database table onto the form?

Since the Text property of a TMemoField does not return the contents of the memo field, you must use an alternate method of get the text. The following code segment shows an example of how to move the text from a
memo field to a TextRect object on the FormGenWin component.     Top

var
   bs : TBlobStream
   tStr : Array[0..1024] of Char;
   {Memory can also be dynamically allocated}
begin
    { ... }
    { assume field MEMOFIELD of tblInfo has been added }
     bs := TBlobStream.Create(tblInfoMEMOFIELD,bmRead);
     FillChar(tStr,SizeOf(tStr),#0);
     bs.Read(tStr,SizeOf(tStr));
     bs.Free;
    FormGenWin1.TextRect(1.0, 4.0, 6.0, 5.5, tStr);

   { ... }
end;

Is it possible to disable the printer setup dialog when the form is printed?

Yes, during design time you can remove the foShowPrint flag from the Options property of the FormGenWin component. You may also need to modify the PrintFromPage and PrintToPage properties to control which pages are printed.      Top

When I load the sample (order.ifm) I get an error message ('... is not a valid floating point value'). Why does this error occur?

This was because of the differences between American and European conventions where the floating point values contain commas instead of periods. This has been corrected in version 2.0 of the component.     Top

I've created an .IFM which looks right, but when I use the code in an application some of the text boxes do not display. Why is this happening?

The FormGenWin component will not display a StrRect object when there is no text in it. To workaround this, use a Box object or use a TextRect object instead of a StrRect object. Also, you can add a single space to
the Text parameter and it will work fine.      Top

I am having trouble printing on certain printers. Is this a known problem?

Yes. Unfortunately all printer drivers are not created equal. The component just sends the information to the default Windows printer driver, it is up to the printer driver to handle the information properly. For instance,
we have found differences going from a HP III to a HP 4 printer driver, where the HP III printed fine and the HP 4 would print without text or without lines, or produce an "Out of Memory" message. Also, on some fax
drivers the fonts aren't scaled properly. We have also had problems with the Epson Color Stylus printer drivers.     Top

How do I print to a text file?

You need to add a Generic Text Only printer and specify that its port is FILE: (Creates a file on disk). Now when the FormGenWin Print dialog box appears select the Generic Text only printer and click ok. You will
be prompted for a file name. If the file is opened with NotePad.exe some unwanted characters may be displayed, these characters are not displayed when the file is opened with Write.exe or MS Word and other word processors.      Top

The vertical alignment feature doesn't work on my HP LaserJet. Is this a known problem?

Yes. HP has verified that it is a problem with some HP 4 printers, the HP 5 and the HP 6 printers. The HP III should work ok. HP says that they may fix the problem when they get 'around to it'.      Top

Can the FormGenWin Editor be distributed to our customers?

Only the 3.0 version of the FormGenWin Editor may be distributed to your customers. The 3.0 version can edit & save external files, previous versions of the FormGen Editor can not modify external files and therefore
may not be distributed.      Top

Can the FormGenWin Editor create a form that can be read and printed at run-time?

Yes, Any forms saved with the FormGenWin Editor 3.0 (or later versions) can be read & printed at runtime. Of course you must be using the 3.0 (or later version) of the FormGenWin component to read & print external files at runtime.      Top

Are there any limits to the number of elements on a single page? What about limits on the size of a reports (i.e. how many pages)?

There are no specific limits to either the number of elements on a single page or the number of pages. In the 3.0 version of the FormGenWin component, paging code was added to allow an unlimited number of pages to be previewed and printed. In earlier versions the number of pages is limited by the available memory of the system printing the report. Since the report is stored in memory at build time, the number of elements on a single page is limited by the available memory of the machine printing the report.  However, in most cases the number of elements allowed on a single page is so large it does not come into effect. There is no clear work around at this time.      Top

Why do I get the error "xx.dcu file not found" or "xx.pas file not found" when running or compiling my application in Delphi 3.0

The directory where you have installed the components is not listed in the Delphi 3.0 Library Search Path. If you select tools in the menu bar of Delphi 3.0 and then click on "Environment Options" Once you are
in the environment options window click the "Library" tab and add the path to your newly installed components to the Library path. Click OK when you are done and now your application will compile and run with out the 'file not found' error.      Top

How can I scroll Up & Down, Right & Left in the Preview window using key strokes?

The following code will show you how to access the scrolling & paging functions of the FormGenWin component.

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
const {Setting Keystroke constants}
   pgup=33; pgdn=34;
   pgend=35; pghome=36;
   arleft=37; arright=39;
   arup=38; ardown=40;
begin
   Case key Of
        pgup: FormGenWin1.PrevPage;
        pgdn: FormGenWin1.NextPage;
        arleft: FormGenWin1.ScrollLeftPage;
        arRight: FormGenWin1.ScrollRightPage;
        arup: FormGenWin1.ScrollUpPage;
        arDown: FormGenWin1.ScrollDownPage;
        pgEnd: FormGenWin1.ScrollToBottom;
        pgHome: FormGenWin1.ScrollToTop;
  end;
end;
We can only guess that your next question would be about setting the amount of scroll that takes place when using the navigation keys or hiding the scrollbars when using the navigation keys. The HorzScrollBar & VertScrollBar properties were added in the 3.4 version, these properties give you full access to the scrollbars. There is no way to modify these settings in previous versions.     Top

How do I use BuildDBReport with a database that has field names that contain spaces?

Spaces in the field names do not cause a problem as the 3.0 help indicates, the statement was not removed from the help when the component left Beta status.      Top

When I change printers using the SetPrinterByName or SetPrinterByIndex, the fonts print too larger or too small. Why does this error occur?

This is a known bug, When changing from printing on one printer to another printer with a different dpi the Fonts seem to continue to print at the dpi for the previously selected printer. The problem seems to be in Delphi's TPrinter object, We are currently working on a workaround.     Top

Why do I a blank page in the component window when I build a report?

The StartPage property is being set to 0 or a number larger than the total pages in the report.      Top

Why do I have a blank page at the end of my report?

You are passing the wrong number of "Pages per Record" when using the BuildDBForm method. You must pass the exact number of pages that you are building in the OnBuildReport event.  

Example: You are building 5 pages in the onbuildreport event then you would call the method like this: BuildDBForm(5);     Top

The last page of my report is not the last page of a multi-page form.

You are passing the wrong number of "Pages per Record" when using the BuildDBForm method. You must pass the exact number of pages that you are building in the OnBuildReport event.

Example: You are building 5 pages in the onbuildreport event then you would call the method like this: BuildDBForm(5);     Top

The total number of pages is not calculating correctly.

You are passing the wrong number of "Pages per Record" when using the BuildDBForm method. You must pass the exact number of pages that you are building in the OnBuildReport event. 

Example: You are building 5 pages in the onbuildreport event then you would call the method like this: BuildDBForm(5);      Top

When using the BuildDBReport method, not all my records are printing on one page.

Your problem is caused by one of the following:

Your form does not have room for all the records
You are trying to use a calculated field as the key field in the BuildDBReport method.
Your data may not be sorted by the field you are using as a key field.
You are passing the wrong "Max Number Of Records Per Page" when calling the BuildDBReport method. As an example assume you are using a form that can hold up to 50 records and you are not using a key field. When you call the method your code should look like this: BuildDBReport(50,'');     Top

When using the BuildDBReport method, my report is not starting a new page when the key field changes.

Your problem is caused by one of the following:

You are passing the wrong field name when calling the BuildDBReport method.
The key field name is misspelled.
You are trying to use a calculated field as the key field in the BuildDBReport method.      Top

My graphics do not display or I get "Error Loading Image" when using external files

At runtime the graphic file you want to load must have the same exact directory path and file name it had when the external report file was created. By placing the graphic file in the same directory as the program calling
the external report file you will avoid the error message. However the graphic file must still have the same file name it had when the external report file was created.      Top

The FormGenNav's FirstPage & LastPage buttons won't work.

I Can't print when not on the first page of the report.

The FormGenNav buttons (FirstPage,LastPage,NextPage,PrevPage) are disabled when I page back to the first page of the report.

A ReportDesign or DBReportDesign component has the FormComponent property set, but you are not using the Report Designer component to generate the report. Either clear the FormComponent property or delete the Report Designer component.      Top

In the Visual Form Editor I get an error when selecting multiple objects

Why do I get the message "Error converting the Clipboard Text"?

The Visual Form Editor version 2.0 & early releases of 3.0 had a clipboard memory limitation. This problem was corrected in the 3.01 version of the Visual Form Editor. For a free upgrade of the Visual Editor Download the FormGenWin 3.01 demo.

The 3.01 version of the Visual Editor allows the user to set the amount of memory the editor will maintain for the clipboard. If you get the message "Error converting the Clipboard Text", the "Paste Size" value needs to
be increased. This setting is located on the "Clipboard" tab under the menu item "Options" then "Settings". The default size is 4096 (4kb), the optimum setting for Paste Size is between 65536 (64kb) and 131072 (128kb).
The 16bit version of the editor has an upper limit of 65534 (64kb). The 32 bit version of the editor has no upper limit, however setting the Paste Size to an extreme amount can cause the editor to perform very slowly.     Top

Why do I get the message "Warning: You have attempted to select too many objects for the available clipboard memory"?

The "Copy Size" setting needs to be increased. This setting controls the maximum number of objects that can be copied to the clipboard at one time. This setting is located on the "Clipboard" tab under the menu item
"Options" then "Settings". The "Copy Size" can be no less than 400 and no more than 2000.      Top

Why do I lose my custom cursors after printing?

he FormGenWin version 2.0 & early releases of 3.0 had this error. The error was corrected in the 3.01 version. If you are using a demo version of the component, download and install the latest demo to correct the error.

If you own the source code, you can make the following code changes to correct the problem.
CODE CHANGES:

In the Frmgenwn.pas file, locate the TFormGenWin.Print procedure.

Add the following line of code to the Variable section of the TFormGenWin.Print procedure.

pCursor:TCursor;

Locate the line "Screen.Cursor:=crHourGlass;" and replace it with the following two lines:
pCursor:=Screen.Cursor;
Screen.Cursor:=crHourGlass;

Locate "Screen.Cursor:=crArrow;" and replace it with the following line:
 "Screen.Cursor:=pCursor;    

Top

 

 

Home ] Up ]

Send mail to webmaster@didelot.com with questions or comments about this web site.
Copyright © 2001 Infinity Software Group
Last modified: October 23, 2001