Beiträge von Trevor

    Wp4 - Have a report with just a one row table in the data section.
    Paragraph Space before/After is 0, and the report is almost ok - the page break appear in the right place.

    If Space before/after are set to anything else other than zero, then the page breaks appear in the wrong place (ie there is a lot of blank space at the bottom of each page). It looks like the SpaceBefore value is being doubled or something in the calculation for seeing if a page has been filled.

    Will this be fixed on Wp4? If We need to upgrade to Wp5 (as well as all our freelance programmers) we need to be sure this is fixed in v5.

    We cannt set ignorepageheight as then we get no footer/headers etc.

    Help!

    How can I change a picture when the report/labels are being generated. Which event should I use and how should I do this?

    At label design time I allow the user to insert a dummy picture (as a placeholder) and I set the objName to '{GRAPHIC}' for example.

    When the report/label is run/previewed I can test in the OnBeforeGraphicPrint or OnCreateGraphic event of the label if the objName is {GRAPHIC} and if so, I would like to replace the picture or draw on the canvas of that graphic.

    How can I do that?

    Quick question: When I use the paper bin selection dialog and try to set the 2 paper bins for a WPRichEditor, are they saved into the RTF when I save?

    I would like to know how to select bins, save it in the RTF, so that when I next load the report up, then bins are already correctly selected - i.e. - That the bins are report specific. At the moment, they don't seem to be stored in the report, and the bin selection dialog seems to have no effect. The only way I can change bins is to use the windows default printer setup dialog.

    Trevor

    Our customers require that for some of their reports, each group (or sometimes sub-group) starts on a new page (ie finish off the current page with a footer, start a new page with header, then continue).

    There was a suggestion by wpsupport to just insert a page break in the template, before the group band, so that the group would start on a new page.

    The problem with that idea is that the first page would be blank! We need so that subsequent groups start on a new page, not the first one. Similarly, we cannot add a page break in the footer or the last page would be blank.

    Also, it makes the template look messy and spread over two pages, when the resulting report might only be one page.

    Just as there are various settings for a band, we really need a 'start new page' flag. Does anyone else have any ideas how to start a new page properly, when a certain band is about to start?

    With a version 4 mailmerge, I have a graphic which is in a file

    (eg C:\my pictures\mypic.jpg)

    in the WPtools RTF viewer I can see it ok. When I export to HTML, the HTML code has

    <IMG SRC="C:\my pictures\mypic.jpg">

    which will not work, and the picture cannot be seen in a browser. Since the file is on the harddrive, it needs to be:


    <IMG SRC="file:///C:/my%20pictures/mypic.jpg">

    Is this a problem with the HTML export routines in Wptools, or do I need to do something to get this to work?

    When I generate a report with externally linked graphics in, the RTF file has in it:

    {\field{\*\fldinst{INCLUDEPICTURE "c:\\\\pics\\\\img1.jpg" MERGEFORMAT}}}

    But the picture will not show in (eg) 'MS Word' or other RTF viewer. If I hack the WPtools generated RTF file to read:

    {\field{\*\fldinst{INCLUDEPICTURE "c:\\\\pics\\\\img1.jpg" \\* MERGEFORMAT \\d }}}

    (ie add \\* before MERGEFORMAT and \\d after) then it works, and I see the image.

    Is this a bug in WPtools, or is there another way I can get linked images to work properly when viewed in another RTF view like Word.

    :?:

    In a small test application I now have it working as expected. But in my large app a few things are different - as I said in another message, when I move tabel cell borders, the ones below often don't move in sync (!), but also JPG images definately cannot be selected or resized, but BMP images can!

    Anything else anyone can suggest may be the cause? I have one routine to insert a graphic! Crazy!

    Trevor

    Well, it is still happening here, so I have written a sample app -
    one wprichtext1 (4.25) and one button to InsertGraphicAsLinkDialog()

    I can insert bmp and jpgs but cannot resize or select any of them.

    Which properties do I set to allow seleciton and resizing of images.

    There are no chapter breaks in this large report. It may be a long, long list of facts and figures printed off for a hard-copy archive. For some of our customers this is required by law (financial reports). They may have 1 million transactions in a log to print off.

    It is never known in advance when a record or group will finish neatly on the bottom of a page, in order to close the file and start another 'section'.

    Besides, if you are suggesting perhaps generating lots of smaller files, then how do I do an RTF join to put them together into one reference file? Word, Corel etc can read in the large files (2Gb etc) but it would cause an administrative problem to find the required result if the reports was split into many files.

    We need to be able reference pages - Would we be able to continue page numbering across files?

    I suppose the bottom line is... does anyone have any example code of how to properly cope with large files?

    Does Wptools 5 cope with large reports which wont fit into memory? If a computer has 256 or even 512k, does WPtool5 try to compile it all in memory or can it stream to/from a file?
    ie If a report could have 2000 pages, can Wptools 5 yet save it to a file as it is generated, and read it in from a file stream, rather than having to load it all into memory, like other Word Processors/reporters?

    I use a great component once called HyperString I think which coped with 5GB strings seamlessly by the use of temporary files.

    Is there no other way to produce large reports then, without 5 GB memory or something?!

    I thought that was what the rtffiler was for. I have a continuous report. It may or may not have groups. The customer creates the reports themselves, so they may be 1 page, 10 pages or 2000 pages. They may be nested groups or not. I will not know in advance how large the report will end up as.

    If it always break up the report into batches somehow, there will be a problem with where to break it. I cannot guarantee that a record will end exactly at the end of a page. If I break the report too early there will be a blank area on the page. Also will there not be problems with page headers etc?

    Does WpTools5 handle large reports automatically/better?

    The reports we generate are around 2000 pages or more at times, and it cannot all fit in memory, so I understand I need to use the RTFFiler component. I can't find out much from the help file or the forum. Any help?

    I have WPRichText1 (Source) and WPSuperMerge1 (Reporter) and WPRichText2 (Destination). Where does the Filer fit in, and how do I get it to work. I need to be able to print reports, preview them and "save as" (export to html, rtf, txt etc). At the moment, without the filer our software works well.

    I've tried putting a filer on the form and setting the WPSuperMerge RTFFiler property, bu I then just get blank reports.

    I cannot work out how to do this:
    I have data like this (for example)

    Report header
    Page header
    Group 1
    Header for group 1
    Data line 1
    Date line 2
    Footer for group 1
    Group 1 End

    Group 1
    Header for group 1
    Data line 3
    Date line 4
    Footer for group 1
    Group 1 End

    I would like to get that second (and 3rd, 4th etc) groups starting on a new page. For example, when it gets to the end of the first group 1 it finishes off that group (footer etc) and the page footer, then starts a new page with page header, then starts the next group (header, etc).

    I've tried to put StartNewPage in various places but it seem to happn too much or not enough.

    1.
    I produced an rtf report using another program we wrote. The report was about 240 pages long and the output to a file (test.rtf) was about 1.5MBytes. However, when we loaded it into a WPRichText box, the amount of memory used by our software jumped from about 10Mb to 100Mb.
    I then saved the WPRichText contents - I knew it would be bigger than it started because of the inefficient way WP seems to handle rtf tags - and the exported size of the report was 4.9Mb.

    Quite why the WPTools component uses so much memory to show
    the rtf report is not clear, or why it has to be so large when saved, I don't know.

    2.
    I repeated the test with an RTF file which was initially 4mb (generated by some other software). Our program with WPRichText in tried to load the 4mb file (full of tables) but ultimately failed - its memory usage jumped rather randomly between 100Mb and 200Mb. I gave up waiting after a few minutes and killed the program.

    Any ideas how we can handle big reports any better?

    Is there a way to stop WPtools trying to load in the whole file into memory? Can't it leave it in the disk file and page-load it is/stream etc.?

    Will the functions: wprichtext.LoadFlowTextFromStream or LoadFromStreamWithReader help?

    In the designer, at runtime, 4.22, if I add a table with, say, 5 rows and 5 columns, all with text or fields in then there is a problem when resizing the columns.

    If I resize the columns using the mouse, slowly, then all is ok, the column sizes of the rows below all are synchronised. BUT, if you resize quickly then very often the rows below do not "keep up", and the cells are mis-aligned.

    This bug is reproduceable 100% of the time use a simple sample app. Need a quick fix!

    Thanks.

    I am writing my own LabelProperties dialog and have one more question:

    If, for one page, you have:

    1. the LabelLeftBorder_mm (which is the border from the left of the page to the start of the first label?) then

    2. "LabelColumns" number of labels across the page

    3. With "LabelBetweenVert" mm gap between each label across the page,...

    What about any right border/margin on the label sheet? Is that the same as the left border?
    Similarly with the top and botom margins.

    All the label sheets we buy (eg Avery etc) seem to have a printer margin all around the page (left and right margin (identical) and top/bottom margins)

    how do I copw with that?

    Are you suggesting I do those things after the whole report has finished merging? Or, each time the header text is asked for (also, perhaps there will be many headers/sections).

    Also, the problem with ignoring the page height, I thought, was that "keep together" (orphan) control and footers etc would not work properly.

    At the end of generating the report, should I also turn "ignorepageheight" back to False (which I seem to need to get the page looking ok) and then also reformat all.?

    Thanks

    If a record goes over a page with orphan control on (keep together), some of the record is displayed at the bottom of the page. It is then repeated on the next page showing all of the record. I would have expected not to see the part record at the bottom of the first page, because if it doesn't fit on one page it should all start on the next.