filename error lazreport
Original Reporter info from Mantis: alexpseletr
-
Reporter name: alexP
Original Reporter info from Mantis: alexpseletr
- Reporter name: alexP
Description:
I write report.filename:= test;
he should to click the save button already have the filename in the filename field savedialog, but it appears blank requiring the User to write again;
the solution is in the code below;
file lr_view.
procedure TfrPreviewForm.SaveBtnClick(Sender: TObject);
var
i: Integer;
s: String;
begin
if EMFPages = nil then Exit;
s := sRepFile + ' (*.frp)|*.frp';
for i := 0 to frFiltersCount-1 do
s := s + '|' + frFilters[i].FilterDesc + '|' + frFilters[i].FilterExt;
with SaveDialog do
begin
+++ Filename:=TfrReport(Doc).FileName;
Filter := s;
FilterIndex := 2;
if Execute then
if FilterIndex = 1 then
SaveToFile(FileName)
else
begin
ExportToWithFilterIndex(FilterIndex-2,
ChangeFileExt(FileName, Copy(frFilters[FilterIndex - 2].FilterExt, 2, 255)));
end;
end;
end;
as a suggestion should have a filter option to the standard that he indicated to save the selected pattern with that filter ... nobody sends report to customers in the form of strong, but in pdf or html or txt
Steps to reproduce:
create a report and save it before you enter the code below
frReport1.FileName:='teste';
frReport1.PrepareReport;
frReport1.ShowReport;
Then click save and see that the name is blank
Mantis conversion info:
- Mantis ID: 19302
- OS: Ubuntu 10.04
- OS Build: 0.9.29 beta
- Platform: fpc2.40
- Version: 0.9.29 (SVN)
- Fixed in version: 0.9.31 (SVN)
- Fixed in revision: 30839 (#cf9d1a8a)
- Target version: 0.99.0