LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: ham13 on December 30, 2022, 10:17:02 PM

Title: Is there a way to view a report without loading it into the designer?
Post by: ham13 on December 30, 2022, 10:17:02 PM
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
Title: Re: Is there a way to view a report without loading it into the designer?
Post by: Arin Alex 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)
Title: Re: Is there a way to view a report without loading it into the designer?
Post by: ham13 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
Title: Re: Is there a way to view a report without loading it into the designer?
Post by: Arin Alex 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.
Title: Re: Is there a way to view a report without loading it into the designer?
Post by: ham13 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
Title: Re: Is there a way to view a report without loading it into the designer?
Post by: Arin Alex 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/