Beiträge von adfranse

    There are 3 situations.
    1. when creating the template wpRichText shows bla bla bla <<table.fieldname1>> bla bla bla
    if I click somewhere on the field how do I get the corresponding TWPTextObj ?

    2 If I have the TWPTextObj are there known issues / limitations on assigning the value to .source ?

    ( obj.source = hexencode( '%9.2f' );


    3. in WPSuperMerge.MailMergeGetText I get the TWPTextObj from contents.StartInspObject is that correct ?

    Ad Franse

    I use WPSuperMerge a lot. Most of the data for the merged-documents comes from database tables.

    if I want to use the database-field 'period_start' (datetime) and want to use a mergefield for period_start (format : dd.mm.yyyy) and a different mergefield for period_start (format hh:nn) how can I do that.

    (same question for numeric fields. on one place %9.2f on other places %9.3f)

    Is there a way to specify the formatting of the field ?

    Ad Franse

    Hello I want a table with 2 rows, 3 columns.
    Cell r1c3 and r2c3 combined and r2c1 +r2c2 combined

    eg:

    +----+----+----+
    |.......|......|......|
    |.......|......|......|
    +----+----+......|
    |..............|......|
    |..............|......|
    +----------+----+
    If I make this in word, save it as an RTF, then the image is imported as if R2C2 and R2C3 are combined (+the lower and right line of this table are not shown. Is there any way to get such a table in WPTOOLS ?

    Ad Franse

    I have created an mail-merge program in wptools and I now need barcodes on the documents.

    What should I do and what components do I need (if necessary) ?

    Ad Franse

    I partially solved it.

    For the textcopy I have used the text in blue. On the screen this looks ok, but when I do a WPSuperMerge1.execute afterwards, the masterband-group is not visible in the result window, but all group and bands embedded in the template-document are still visible !

    How is that possible ?

    Ad Franse

    I want to create a new base document (WPRichTextSource) containing a number of templates (TWPRichText). These templates are documents that have reportgroups and bands within.
    How do I copy this templatedocument into the newly created databand ?

    Thanks in advance,
    Ad Franse


    procedure AppendText( template : TWPRichText; databasename : string );
    var mastergroup : TParagraph;
    var target : TParagraph;
    var source : TParagraph;
    var lNewPage : boolean;
    begin
    WPRichTextSource.CheckHasBody;
    wpsupermerge1.Source.cursor.Position := $7fffffff;
    lNewPage := wpsupermerge1.source.Cursor.Position > 0;
    mastergroup := WPSuperMerge1.AddReportGroup( databaseName, [wpCreateBorders ], nil, SetCellStyle, 2);
    mastergroup.IsNewPage := lNewPage;
    target := mastergroup.AppendChild(nil);
    target.ParagraphType := wpIsReportDataBand;
    // how do I add the contents of template (TWPRichText) to this reportdataband ?
    // note it is possible that this document contains also reportbands, headers and footers
    //
    end;

    Hello all,
    I am very new to WPTOOLS. I am able to add an textbox to my document using the following code


    if DBWPRichTextSource.GetPageXYfromXY( x, y, pageNR, pageXTW, pageYTW, par ) then
    begin
    w := WPCentimeterToTwips( 5);
    h := WPCentimeterToTwips( 0.5);
    DBWPRichTextSource.TextCursor.MoveTo( par, 0, false );
    txtObj := DBWPRichTextSource.TextObjects.InsertTextBox( w, h, RTFdata );

    Now I am able to enter some text in this RTFDataBlock (RTFdata ) by

    RTFdata.RtfText.AsString := 'this is a simple string';

    But how can I create an inputEditField here (in the RTFData)

    Inserting such an inputEditField in a document works withhout a problem
    DBWPRichTextSource.InputEditField( 'Veld'+inttostr( n), 'Veld'+inttostr( n)+' display text',true, 'Veld'+inttostr( n)+' command', n );

    but how can I do that in such an RTFdata ?

    Ad Franse