Lazarus
Programming => Databases => Topic started by: andersonscinfo on February 28, 2021, 03:14:04 pm
-
Where to find this screen for configuring the data source in fpreport.
-
Normally in the reportdesigner. To found in lazarus/components/fpreport/design/reportdesign.lpr
-
I tried to find it but I couldn't, could you tell me more specifically which way to get to this configuration screen?
this running, in the sources I found, but I'm having trouble setting up a connection to the database.
-
What did you not find ? Your Lazarus installation with the directory components ? Are not able to compile the sources of ReportDesign ?
I compile this and open the Reportdesigner - This is an extra program you have to compile first !!
Reportdesign:
->New Project
-> Menu Report -> Report Data
Links:
https://wiki.freepascal.org/FPReport_Designer
https://wiki.freepascal.org/FPReport
-
I can open the designer, and drag band and components, but I can't set up a connection to sqldb just like the photo on the wiki, I'll post the example.
-
which version of fpc and Lazarus do you have ?
I open the designer (NOT in Lazarus Designer !!! - as external Prg !!!)
your project (myreport.json)
Menu -> Report->Report Data
Use the add button (+) and give the Name Data1
After this i can design theconnection
BTW: This was moved by a moderator to Databases, i think it is not the right place, it more a question about fpreport and a Lazarus component question. LazReport have his own area, the newer fpreport not.
-
which version of fpc and Lazarus do you have ?
laz 2.0.10 fpc 3.2.0
windows 10 pro
I open the designer (NOT in Lazarus Designer !!! - as external Prg !!!)
your project (myreport.json)
Menu -> Report->Report Data
Use the add button (+) and give the Name Data1
After this i can design theconnection
later I will test, thank you very much for the disposition
BTW: This was moved by a moderator to Databases, i think it is not the right place, it more a question about fpreport and a Lazarus component question. LazReport have his own area, the newer fpreport not.
I agree too
Att.
-
well I did the test, here in design time I got it, but already running the app ready, I was unsuccessful, I'm sending a video link if you want to look.
Link: http://activelinux.info/tmp/Gravar_2021_03_01_17_49_40_578.mp4
-
First, why did you stop after using the plus sign ? You must give the dataconnection a name, use Data1 as predfined eg.. After this i can select the type of Connection.
Second I open the designer (NOT in Lazarus Designer !!! - as external Prg !!!)
-
Sorry, I tried now, I am sending another video to show an error when saving the report after executing the configuration.
ps: i'm really grateful to be helping me, i didn't find much material on fpreport, thanks.
http://activelinux.info/tmp/Gravar_2021_03_02_08_09_47_574.mp4
-
The problem is, the designer INSIDE of Lazarus is not able to stream the json into the form (lfm).
I NEVER use the Designer inside Lazarus and i never store the report inside a form. Now i understand your problem. But i am not able to help here. You can only file a bug.
I have my knowledge from the sources and some dicussion on the mailinglist.
-
I can not recommend this way of storing reports.
It gives you many problems with the end user/customer. Latest when he want to change the report.
Do it the "old fashioned" way. Create a separate file with the report.
If you want, create a basic report, convert it to a resource and add it. If somebody deletes the report file it will be rebuild from the compiled resource.
If you have a multi user application, store the report file in a database and read the file from the database. It makes more work, because not all options are in the property register and must be manual coded. But it gives you more flexibility and more freedom with you users/customers.