Recent

Author Topic: [Solved] Error Using Lazreport  (Read 2163 times)

Pagliaccio

  • New Member
  • *
  • Posts: 16
[Solved] Error Using Lazreport
« on: November 19, 2017, 08:18:30 pm »
Hi, i'm new using lazarus, i have been working on an application that do a full inventory check for a library of my school, almost all of the code is ready except for the form that generates the report, the report is already set with all the data but when i try to load the file i get an error saying that the file is not found like this
Quote
Error While loading report: File not found (ReporteMaterialBibliografico.lfr)

This is the code of my button

Code: Pascal  [Select][+][-]
  1. procedure TForm6.Button1Click(Sender: TObject);
  2. begin
  3.   ShowMessage ('Reporte Generado');
  4.   frReport1.LoadFromFile('ReporteMaterialBibliografico.lfr');
  5.   frReport1.ShowReport;
  6. end;
  7.  

the objects in my form are:

Button1 (the one that generates the report)
Button2 (to return the previous form)
Static Text (Says the name of the report)
frReport1 (to design the report)
Zquery1 (to fill the report data)
Zquery2 (to fill other part of the data in the report)
frDBDataSet1
frDBDataSet2

Lazarus Version V.1.6.4
Lazreport Version V0.9.9

Sorry for my english i'm still learning
« Last Edit: November 19, 2017, 10:46:11 pm by Pagliaccio »

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Error Using Lazreport
« Reply #1 on: November 19, 2017, 10:04:22 pm »
I don't use Laz report however, is it possible you need to provide the full path name for the "LoadfromFile" ?

The only true wisdom is knowing you know nothing

Pagliaccio

  • New Member
  • *
  • Posts: 16
Re: Error Using Lazreport
« Reply #2 on: November 19, 2017, 10:44:33 pm »
I don't use Laz report however, is it possible you need to provide the full path name for the "LoadfromFile" ?


You just give me an idea, I had tried using the normal path on the folder, but if i use the full C:\Users\Administrador\ path the program do all the work fine, and that is how i realize that my mistake is on the extension of the file, in my code is ".lfr" but the correct extension is ".lrf".

 thanks a lot Jamie, you just saved my grade  :D
« Last Edit: November 19, 2017, 10:58:31 pm by Pagliaccio »

 

TinyPortal © 2005-2018