Beiträge von David niziol

    I am currently working on a Labeling program in Delphi 7 and am using your wpForm component, the problem that I am having is that
    I am using 2 wpFormEditor controls, one for the label designer and one for the preview (they are both on the same form).

    After the label design is finished I output the report page by page, first creating a file and then using the write page method. (see below)

    Code
    if  WPFReportEngine2.ReportLoaded then		      WPFReportEngine2.Close;		//Create the report file to append each page to		      WPFReportEngine2.CreateFile(installpath+'\selfit\Import\PrntPreview.wpr');		 for i := 0 to (EndBadgeNo-StartBadgeNo) do		Begin		      WPFReportEngine2.WritePage(i);		end;


    This all works fine I then load the report into the 2nd wpfFormEditor control (using the execute procedure below) and set it up like a preview


    This also works fine, the problem is that when I put an image on the label thatI am designing and preview the report in this way (say for 200 labels)
    a lot of memory is used up (this depends on the size of the image that has been inserted) and I can find no way to free up the used memory??
    I have tried loading in a blank report but this doesn't help and everytime I preview the report I lose more and more memory. As the 2nd preview
    formEditor is on the same form as the designer and is linked throughout the program (nearing the end of the project) I cannot create and destroy it
    at runtime,

    I would be very greatful if someone could help with any suggestions to this problem

    many thanks

    David Niziol

    I need to be able Click on a graphic and return it's postion on a form.

    I cannot see any methods to do this, so I am using the Graphics top property which retuns the top position in pixcels.

    How ever this is of no use as I need the co-ords in Cm (the unit I am working in)

    I can't convert the pixcels either as the form doesn't start at 0,0 in the editior object

    ShowMessage(formatfloat('0.00', ((http://FD.SelectedObject.Top/PixcelsPerInch)*2.54)));

    I have tried this method looking at the print preview unit and I'm using

    the following 2 procedrues

    The problem is that I am using fields and when the page is displayed in the 2nd form designer I only get a preview of the first label or which ever record is being viewed?

    How do I view all the labels?

    I have created a label editor and can print all the labels from the preview component, does anyone know how to print just the first page of labels?

    also I would like to make my own preview using a form designer can anyone help with this?

    thanks

    David