LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: merabi on December 04, 2019, 06:37:33 PM

Title: Some Features Request
Post by: merabi on December 04, 2019, 06:37:33 PM
Hi Alex.
I need two new feature if posible.
1. Can you add some function to hide 'save to file' action from report preview toolbar so end user can't be able to save report xml to file.
2. When user clicks to 'print to pdf' action on report preview toolbar the save file dialog is shown. In this dialog file name is empty. Can you Provide some property or function to set file name of saved pdf file programaticaly.
Title: Re: Some Features Request
Post by: Arin Alex on December 07, 2019, 07:18:47 PM
Hi!
The first one already exists.
  report->setSaveToFileVisible(false);
What about the second one:
If i use the reportname as default file name, will it suit you?
Title: Re: Some Features Request
Post by: merabi on December 11, 2019, 09:59:57 AM
Hi Alex.
Report name as a default file name is not what I need.
I'm generating file name based on some logic so I need some way to set save file name programaticaly if possible.
Thank you for your effort.
Title: Re: Some Features Request
Post by: Arin Alex on December 11, 2019, 11:14:10 AM
Hi!
Look, the report name is a simple string and it could be anything :)
By default, the report name is a report file name, but you can set any values you want.
For example:
Code: [Select]
report->loadFromFile(fileName);
report->setReportName("somefilename");
report->previewReport();

will save the preview to somefilename.pdf.
I think it must be useful in your case.   
Title: Re: Some Features Request
Post by: merabi on December 11, 2019, 12:07:37 PM
Ok Alex.
Now I see your point.
This solution perfectly fits my requiments.
Thank You.
Title: Re: Some Features Request
Post by: Arin Alex on December 11, 2019, 03:06:52 PM
I have made the changes and pushed them to master branch
Title: Re: Some Features Request
Post by: merabi on December 11, 2019, 06:16:10 PM
Ok. Thank you