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

Author Topic: Is there a way to view a report without loading it into the designer?  (Read 430 times)

ham13

  • Newbie
  • *
  • Posts: 27
    • View Profile
Hello,

Is there a way to view a report without loading it into the designer? I have an application where I want the administrator to be able to create reports but, the user has access to only view or print the report. Is there a way to do this in Lime Reports?

Thanks
Marty

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Is there a way to view a report without loading it into the designer?
« Reply #1 on: January 08, 2023, 10:53:33 PM »
Hi! You can use something like this
Code: [Select]
report->loadFromFile(fileName);
report->previewReport();
or
report->printReport(printers);
or
report->printToPDF(fileName)

ham13

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Is there a way to view a report without loading it into the designer?
« Reply #2 on: January 09, 2023, 05:54:25 PM »
This appears to be a Qt script. I need to call the viewer and print the report from anothher app written in Gambas. I do not know how to work with qt.

Thanks

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Is there a way to view a report without loading it into the designer?
« Reply #3 on: January 15, 2023, 04:19:41 AM »
In fact, limereport is a library for qt framework and all its features are available only to applications written in c ++ using qt.

ham13

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Is there a way to view a report without loading it into the designer?
« Reply #4 on: January 15, 2023, 08:00:04 PM »
Thanks for the information. Using the command line to load the report would solve my problem but it does not work in linux.

See my previous post on this form copied below:

"On my Linux Mint 20.3 system the command limereport -h returns a limereport command not found error.

I tried in the release directory and all directories within the Lime Report project. No luck. In windows the command limereport -h returns a help file. In linux it returns command not found. By the way the -t option is not  present in the pre-compiled version on windows. Do I have to build the limereport command and if so how?"

Thanks

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Is there a way to view a report without loading it into the designer?
« Reply #5 on: January 18, 2023, 11:27:18 PM »
If you built limereport using qmake the limereport binary file is located in ../build/{Qt version}/linux64/release/console/