Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Some Features Request  (Read 4806 times)

merabi

  • Newbie
  • *
  • Posts: 29
    • View Profile
Some Features Request
« 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.

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Some Features Request
« Reply #1 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?

merabi

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Some Features Request
« Reply #2 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.
« Last Edit: December 11, 2019, 10:01:50 am by merabi »

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Some Features Request
« Reply #3 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.   

merabi

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Some Features Request
« Reply #4 on: December 11, 2019, 12:07:37 pm »
Ok Alex.
Now I see your point.
This solution perfectly fits my requiments.
Thank You.

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Some Features Request
« Reply #5 on: December 11, 2019, 03:06:52 pm »
I have made the changes and pushed them to master branch

merabi

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Some Features Request
« Reply #6 on: December 11, 2019, 06:16:10 pm »
Ok. Thank you