Thanks for replying Julian, I will give it a go and see
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)
Codeif 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 previewCode
Alles anzeigenprocedure TForm1.Execute(Printing: Boolean; const FileName: string); begin if fd <> nil then begin fd2.Form.Assign(fd.Form); fd2.Page.Assign(fd.Page); fd2.LabelDef.Assign(fd.LabelDef); fd2.CurrentPage := 1; end; if FD2.ReportLoaded then WPFReportEngine1.Close; Try WPFReportEngine1.OpenFile(FileName); Finally WPFReportEngine1.SeekToPage(0,0); //Setup the form designer in preview mode FD2.options := FD2.Options + [wpfpreviewmode]; fd2.Labeldef.enabled := false; fd2.Labeldef.setpapersize := true; FD2.RefreshData(false); end; end;
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
-
This only seems to hide the Graphics in the print preview I want to hide objects while designing a form in the FormEditor Component
-
How can I Show and Hide a TWPFGGraphic?
-
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
Code
Alles anzeigenprocedure TForm1.Button4Click(Sender: TObject); var f : String; a,b : Boolean; begin try f := WPFReportEngine2.CreateTemporaryFile; WPFReportEngine2.CreateReport; finally WPFReportEngine2.Close; end; if f <>'' then Execute(FALSE, f); end; procedure TForm1.Execute(Printing: Boolean; const FileName: string); var dia : TReportPreview; begin if fd <> nil then begin fd2.Form.Assign(fd.Form); fd2.Page.Assign(fd.Page); fd2.LabelDef.Assign(fd.LabelDef); fd2.CurrentPage := 1; end // else WPFReportEngine1.Open(FileName); end;
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 would like to be able to change the font information for each line in a wpfRTFText object dynamically through code, I assume that you need to select a range of text and then set the attributes, any help would be great
thanks
David
-
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