Posts by andi

    Why did i get a Assert in WPRTDef if i would like to print from Report Builder ?


    Line 10217

    Code
    1. function TWPTextStyle.GetABaseStyle: TWPTextStyle;
    2. begin
    3. Assert(FRTFProps <> nil, 'FRTFProps may not be nil!');

    I just added a button in the project EditFields :

    Code
    1. procedure TWPEdTest.Button3Click(Sender: TObject);var list : TWPTextObjList; i : integer;begin Memo1.Lines.Add('---------------'); list := TemplateEdit.CodeListTags(wpobjTextObject, '*ALL*', TRUE); for i:=0 to list.Count-1 do begin Memo1.Lines.Add(list[i].Name + ' ... '+IntToStr(integer(list[i].ObjType))); end; list.free;end;


    If i click the button (no change in the template text) i get following result

    Code
    1. ---------------Company ... 1Name ... 1Str ... 1City ... 1FORMCHECKBOX ... 7


    if i enter a manual line break before the Checkbox i get following

    Code
    1. ---------------
    2. FORMCHECKBOX ... 7

    i checked the option, but it doesn't change anything.


    This the the Table in word


    And this the copy and paste in WPEditor


    Both cells are right aligned.


    The cells have wrong margin.
    And the width of the table is over the whole page

    How can we Import Tables from WinWord ?


    We tried nearly everything (Copy and Paste, export to RTF, export to HTML)
    We have some Winword templates which we have to import into WPTOOLS and there are some tables (some of them are complex and some are simple) But also the simple tables are not imported well.


    I just tried a new Winword document with one table (1 row, 2 columns) both celss right aligned (the table width should only be 1/4 of the pagewidth) -> import into WPTOOLS


    -> The table width is over the whole page, and each cell has a right border (the right aligned text has at the right a margin)

    I just tried the function CodeListTags, to get a list of all EditFields and i think it has a little bug in it.


    I changed the EditFields Demo, in the Template Editor i entered only a checkbox followed by a MergeField


    If both are in the same line (paragraph) i get both Fields in the List (showing FORMCHECKBOX and COMPANY)
    if i put one of them into a new paragraph, i get only the Field which i have specified in the CodeListTags (parameter Code)


    Code
    1. list := TemplateEdit.CodeListTags(wpobjMergeField{wpobjTextObject}, '*ALL*', TRUE);
    2. for i:=0 to list.Count-1 do begin
    3. Memo1.Lines.Add(list[i].Name);
    4. end;
    5. list.free;

    I just found my error :


    I tried following :

    Code
    1. with TemplateEdit.InputEditField(SelectField.Text, SelectField.Text) do begin Params := 'TEST'; Source := 'TESTSource';end;


    But the problem is, that InputEditField returns the EndTag and not the main Field (By the way is there a short possibility to get the main Field form an start or End Tag ?)


    It confused me, that the parameter in the InputEditField has the name Command and not Source.
    Now with this code, i get the text correctly into the Source parameter

    Code
    1. tmp := TemplateEdit.InputEditField(SelectField.Text, SelectField.Text, FALSE, 'TESTSOURCE''"\@');


    But now i have two problems :
    *) If saving to RTF, i get problems with \ (I has to replace all \ with \\)
    *) If saving to WPT i get problems with the " (the same thing if i copy and paste the text)

    Is it possible to get these twoe fields (Params, Source) saved to file and copyied if i copy and paste the text, or should i check some other possiblities than the MailMerge field ?

    In Report Builder i still have following problem :


    If the text is so long, that three pages are requiered than the second page is printed every time (the second page is repeated endless)
    For testing please insert a noneDBWPRichtText and enter text till it need three pages.


    In the Statusbar of the Reportbuilder the Hint shows "WPWPTRichText4"

    Thanxs for the fast response.


    If i use a Mailmerge field, and store the data in the Source Field (also tried it in the Params Field) i get the problem that if i copy the field (in the editor copy and paste) the additional fields are not copied and if i try to save and load (RTF and WPTOOLS) the additional fields are also empty

    Some questions :


    1.) What is the best method, to insert a calced field ?


    I need something like a Mailmerge field but it's not a name which i would like to store, it is a calculation and this calculation can have special Chars (like ', ", $, @ ....)
    I tried to use a standard Mailmerge and save it in the name, but the " are replaced.
    Is in the TWPTextObj a field were i can store this info ? Or is it possible to create an new Object derived from TWPTextObj ?


    2.) What is the easiest way (and as less visual object as possible) to Mailmerge a text ?


    3.) How can i loop trough all MailMerge objects (is it only possible to call mailmerge ?)


    4.) Is there an event if the user enters text into a mailmerge field (or changed the text) ?


    5.) In the demo "EditFields" the checkbox doesn't load and save the value, what is the easiest way to get this working ?

    I don't know exactly when this elemet was created, but know i have the problem, that this element is never shown in the editor, but if i save it as HTML i can see the text.


    Code
    1. <element name="_AUTO_790322234" kind="OwnerSelected" Range="Named">
    2. <div cs=1><c nr=2/>Firma</div>
    3. <div cs=1><c nr=1/>Ort</div>
    4. <div cs=1><c nr=1/>Strasse</div>
    5. </element>

    Just tried the new version :


    +) The zooming now works
    +) The last line ist printed correct


    -) You still forget the DEFINES for compiling RB7 (for the classes TppWPTRichTextDsg / TppWPTRichTextMenu)
    -) If the Text of the Editor is so long, that a page break should appear, only the text for the first page is printed, the rest of the text is ignored.
    -) If you enter more text (may be if a second page break has to be appear (i only guess)) no text is pritned (the first page is also blank)


    Has worked with the version before.


    You can test it with a simple report and one WPText (no DB aware) enter lines so that a page break should appear -> The preview shows only the text from the first page.
    Than copy the text and paste it two times -> No text is displayed ...

    I have a very big and urgent problem with the Report Builder Addon.
    Placing a WPRichText into a Report, enter some text.


    The preview looks good, but if i print it (regardless if printing to PDF or to a real Printer - tried different Printers) the Text is zoomed very small (Its about 20 times smaller than in preview)



    edit: Just tried to print with wPDF -> it works, but printing to Acrobat PDF or a real Printer doesn't work !

    Julian, please try following :


    Use TBX demo, in the OnClose event of the form place
    Action := caFree;


    Remove the form from the autocreate


    Place a new form with only one button and with the following code :
    WPTBXForm := TWPTBXForm.Create(Application);
    WPTBXForm.Show;


    Now, if you click the button and close the form (before the Toolbar is refreshed) you will get the error.

    The memory leaks now are OK.
    But the bug with not printing the last line is still here (Editor v5.17.4+Premium) RB newest.


    I use a new Report, place a WPTools(Richtext) component. Edit the Text (only enter Test1<Linebreak>Test2 -> Exit)
    In the preview all works perfect
    -> Select Stretch ("Dehnen") -> now i can see only Test1 (The second (last) line is hidden)

    2.) it has nothing to do with the image, the last line isn't printed (it looks like the Height is one pixel to small)
    I will download (and install) the newest version (v5.17.2 is my actual version) and will write my results with the new version.