View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0019302||Lazarus||LazReport||public||2011-05-06 21:48||2011-10-03 10:39|
|Reporter||alexP||Assigned To||Jesus Reyes|
|Platform||fpc2.40||OS||Ubuntu 10.04||OS Version||0.9.29 beta|
|Product Version||0.9.29 (SVN)||Product Build|
|Target Version||Fixed in Version||0.9.31 (SVN)|
|Summary||0019302: filename error lazreport|
|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;
procedure TfrPreviewForm.SaveBtnClick(Sender: TObject);
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
Filter := s;
FilterIndex := 2;
if Execute then
if FilterIndex = 1 then
ChangeFileExt(FileName, Copy(frFilters[FilterIndex - 2].FilterExt, 2, 255)));
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|
Then click save and see that the name is blank
|Tags||No tags attached.|
|Fixed in Revision||30839|
Added field ExportFilename to TfrReport specifically for this purpose.
LazReport has support for different exporters, just drop a pdf export filter (or any filter) next to TfrReport then when exporting the export filter will offer you the corresponding filter extension.
What is new is that if ExportFilename is something like teste.pdf (and not just teste) it will choose the right filter.
Excellent idea to put the extension of the file to set the filter, but my sujestao (do not know if it was already implemented but not found yet in svn) which is added the line (Filename: = TfrReport (Doc). FileName) because So if I set the report name is (sales report date) the name appears in time to save the User option and would change if found necessary.
the button that will display the report:
frReport1.filename: = test;
add in file lr_view. line (1090) (Filename: = TfrReport (Doc). FileName)
Please add the following line in the location described above and see the difference.
note that the name now appears in savedialog test.
thanks for listening.
While for your application it would be true or necessary that everytime you export a report from the save dialog the same (path and ) filename should appear, it is not so for other applications were if you change the destination folder users will expect the save dialog remember the last used destination folder, if somebody set an absolute path in Filename using, your method, this would not work becuase it will show always that absolute path.
This is the reason why I didn't implement this the you suggested, by using ExportFilename you get both options without limitations, if this do not work for you, please explain the reason, other wise, please close this report.
||No further feedback.|
|2011-05-06 21:48||alexP||New Issue|
|2011-05-06 21:48||alexP||Widgetset||=> GTK 2|
|2011-05-21 19:17||Jesus Reyes||Status||new => assigned|
|2011-05-21 19:17||Jesus Reyes||Assigned To||=> Jesus Reyes|
|2011-05-21 20:23||Jesus Reyes||Fixed in Revision||=> 30839|
|2011-05-21 20:23||Jesus Reyes||LazTarget||=> 0.99.0|
|2011-05-21 20:23||Jesus Reyes||Status||assigned => resolved|
|2011-05-21 20:23||Jesus Reyes||Fixed in Version||=> 0.9.31 (SVN)|
|2011-05-21 20:23||Jesus Reyes||Resolution||open => fixed|
|2011-05-21 20:23||Jesus Reyes||Note Added: 0048477|
|2011-05-21 20:23||Jesus Reyes||Target Version||=> 0.99.0|
|2011-06-04 16:25||alexP||Status||resolved => assigned|
|2011-06-04 16:25||alexP||Resolution||fixed => reopened|
|2011-06-04 16:25||alexP||Note Added: 0048828|
|2011-06-25 21:27||Jesus Reyes||Note Added: 0049411|
|2011-10-03 10:39||Felipe Monteiro de Carvalho||Status||assigned => resolved|
|2011-10-03 10:39||Felipe Monteiro de Carvalho||Resolution||reopened => fixed|
|2011-10-03 10:39||Felipe Monteiro de Carvalho||Note Added: 0052423|