Beiträge von JohnnyT

    I would guess an alternative would be a formatted merge memo field with each line formatted for each record? The trick of course is to dynamically
    size the memo field.

    So, if I place the memo fields at a particular location I would expect to see something like:

    Static text. Static text. Static text.

    John Smith Company A Address 1
    Jim Curry Company B Address 2
    Mary Clark Company C Address 3
    Joe Tuttle Company D Address 4

    Static text. Static text. Static text.

    Thanks,

    John

    I have a Form Field document that I would like to insert several dynamic tables within.

    I see the example in the manual, but want to know how to control where the table is created.

    For instance, I want one small table (grid) created at the bottom of a particular page and the next table start at the top of next page.

    I can see how to iterate through a table/query to populate the grid, but, how do you tell the document where to place the various grids? Just like with form fields, I'd like to be able to position something within the document to indicate the start position of the grids.

    Thanks for any hints.

    John

    Other than the up/down keys, another circumstance which allows the user to edit what should be protected text is if they click inside of a merge field and type any keys. The field contents are not overwritten, but the cursor is advanced beyond the field limits into the protected text where they can highlight and delete text.

    Thanks,

    John

    Is it possible to identify a grouping of form fields which would be mutually exclusive?

    So, the user would tab through for instance a series of checkboxes, if they select one in error and tab to the next, when another is selected, the originally selected checkbox would be blanked.

    Thanks,


    John

    Given:

    DBWPRichText1.ProtectedProp := [ppAllExceptForEditFields];
    DBWPRichText1.EditOptionsEx := [wpTABMovesToNextEditField,
    wpRepaintOnFieldMove];
    DBWPRichText1.InsertPointAttr.Hidden := FALSE;
    DBWPRichText1.InsertPointAttr.CodeTextColor := $0000EA00;
    DBWPRichText1.InsertPointAttr.CodeOpeningText := '[';
    DBWPRichText1.InsertPointAttr.CodeClosingText := ']';

    The user can tab between edit fields. However, if the up/down arrow keys are pressed the user can "escape" into the body of the document and highlight text and delete it.

    Am I missing a setting?

    TIA,

    John

    Julian,

    Great!

    I have leveraged just a small portion of the great features of WPTools.

    I can't think of a better tool for applications to manage documents.
    In my case, real estate agents with all of their contracts, support documents.
    As mentioned, I've mixed merge fields- supported by a query that does all of the calculations, with edit/form fields to allow the agents to enter ad hoc information.
    Thanks for a fantastic tool!

    John

    I have documents with both merge and form fields.
    IT WORKS VERY NICELY!

    The merge fields are not editable which is desired.

    I populate a listbox with a list of fields which includes the merge fields.
    DBwprichtext1.FieldGetNames(ListBox1.Items);

    The user can navigate through the document by traversing the listbox. I would however like to identify in the listbox which fields are merge, (not editable) and which fields are form, (editable) with a boolean checkbox column so that the user knows to skip these fields in the listbox.

    Is there a way to derive that property? Alternately, is there a way to populate the listbox with only the editable form fields?

    Thanks in advance.

    John

    Thanks Julian.

    This helps.

    Yes, I guess I'm trying to build a hybrid that merges data from the Query utilizing the WPMMDataProvider for some fields, and having other fields which are only editable in a form style, but save their data at that point in the document itself- not in a table. As you have stated, I need do avoid having the DBWPRichText1MailMergeGetText event overwrite the editable fields- thinking that if I do something in that event to avoid changing any fields that are not part of the source query "if Query.FindField(inspname) <> nil then..." to skip these fields.

    John :wink:

    Thanks Julian.
    I have the editing portion working- mostly.

    Here is a problem though.

    I have many merge fields that are populated from a query- working fine. Then I have a set of non-data "merge" fields in the same document that the client tabs through and enters data in. I can't get the data entered to save with the document, or is WPMMDataProvider1.ReadData is overwriting the editable fields data?

    Also, how do you get the document to open with the cursor at the first editable field? When I open the document for the first time, and click and tab, it goes to the first editable field and works nicely. Subsequent openings of the same document result in the cursor staying where it was last at.

    Ideally, it would be great if the cursor goes to the last field edited so that the user could begin where they left off. For the first time a document is opened, that would naturally be the first editable field. So, if the user is editing a document with 10 fields, finished entering data in field 4, closes the editor, works on the same document, but for a different record, comes back to that same document for that record, it would be ideal if the cursor automatically jumped to field 5.

    Sorry for my lack of understanding. I am getting closer though. The documentation very clear.

    Thanks in advance.

    John

    I've created an app which merges data into various documents very nicely.
    In addition to the merge fields, I'd like the user to be able to optionally edit only certain portions of the RTF- like filling in a form- but not allowing any other edits to surrounding text.

    So, the RTF consists of merge fields already filled in with a query, (working), but, the remaining blanks would be optionally editable by tabbing, and no other areas of the document could be edited. This document could be then saved. I know its possible, just don't know where to start to modify the existing docs/logic to support this type of partially editable form.

    Thanks in advance,

    John

    This works Julian. Thanks.

    I am able to merge BMP's, but, not JPEGs. I get an "Invalid Graphic" error when merging using a JPEG.

    I've followed the instructions for resizing, manually adjusting the BMP's that are merged, but, the size changes are not stored with the RTF. The BMP's come back to their native size.

    I've not experimented with the size of the images as stored in the blobs, but, it seems I am missing something to allow me to save the adjusted size of the merged image fields with the RTF.

    Thanks again,
    John

    I'm having problems with enumeration when trying to make the fieldcontents appear under the text;

    procedure TRTFViewerForm.DBWPRichText1MailMergeGetText(Sender: TObject;
    const inspname: string; Contents: TWPMMInsertTextContents);
    begin

    // valid? but won't compile
    If Contents.CurrentTxtObject.IsBitMap then
    Contents.CurrentTxtObject.Mode := wpobjObjectUnderText;

    end;

    I'm missing something simple.

    Thanks,
    John