Page 1 of 2
REPORTS
Posted: Fri Mar 11, 2022 1:20 pm
by C87
Hi PB_All,
I can't find much, if anything about a creating reports, or any print/preview features or options. So wondering if there Is a recommended report writer for PureBasic?
Re: REPORTS
Posted: Fri Mar 11, 2022 5:39 pm
by Bitblazer
Once upon a time there was
Artic Reports available from
nxsoftware.
Re: REPORTS
Posted: Fri Mar 11, 2022 7:36 pm
by HeX0R
Yeah, the incredible srod, he unfortunately left us.
Re: REPORTS
Posted: Sat Mar 12, 2022 2:11 am
by BarryG
Maybe this thread can help ->
https://www.purebasic.fr/english/viewtopic.php?p=325291
Because captain_skank seems to have success using "ReportMan" there.
Re: REPORTS
Posted: Sat Mar 12, 2022 2:55 am
by skywalk
HeX0R wrote: Fri Mar 11, 2022 7:36 pm
Yeah, the incredible srod, he unfortunately left us.
I thought he was just taking a well deserved break? Please say srod is playing golf somewhere across the pond!
Re: REPORTS
Posted: Sat Mar 12, 2022 2:59 am
by skywalk
Reports can be easy if you limit the scope.
Make custom reports with the canvas gadget and containers.
Or try out spiderbasic browser based forms with JavaScript add-ons.
Re: REPORTS
Posted: Sat Mar 12, 2022 3:28 am
by BarryG
skywalk wrote: Sat Mar 12, 2022 2:55 amI thought he was just taking a well deserved break?
If so, why is his website gone? Looks more like he's closed his business down. Hopefully he got rich from his PureBasic app and is now sitting on a beach earning 20%.
Re: REPORTS
Posted: Sat Mar 12, 2022 10:42 am
by HeX0R
skywalk wrote: Sat Mar 12, 2022 2:55 am
I thought he was just taking a well deserved break? Please say srod is playing golf somewhere across the pond!
I don't know If he is playing golf (unlikely) or if he is still alive, one of the last sentences I received was:
One thing is for certain, I won't be writing any code again
Re: REPORTS
Posted: Sat Mar 12, 2022 10:57 am
by infratec
We use the product from Stimulsoft.
We always find some minor bugs, but it is a very large project and they try to fix the bugs during a week.
It is not directly included in PB, but we start it with runprogramm and give it a look and feel like our other codes.
List and Labels (I think the market leader) was to expensive and complicated for the customers to create own reports.
Re: REPORTS
Posted: Sat Mar 12, 2022 11:21 am
by BarryG
HeX0R wrote: Sat Mar 12, 2022 10:42 amOne thing is for certain, I won't be writing any code again
Yikes. I wonder what happened to lead to that. So many unanswered disappearances of people from this forum. It's weird!
Re: REPORTS
Posted: Tue Apr 05, 2022 8:18 pm
by thanos
C87 wrote: Fri Mar 11, 2022 1:20 pm
Hi PB_All,
I can't find much, if anything about a creating reports, or any print/preview features or options. So wondering if there Is a recommended report writer for PureBasic?
I am still using, EVERYDAY, the Artic Report from srod.
Simply amazing, fast and easy configurable.
The only disadvantage for nowadays is the missing ability to export the report.
But you can save is as pdf with a little workaround trick.
For an alternative, you can look at Report Manager (
https://reportman.sourceforge.io/)
I do not know the Stimulsoft‘s product but infratec’s suggestions are always correct.
HeX0R wrote: Fri Mar 11, 2022 7:36 pm
Yeah, the incredible srod, he unfortunately left us.
Unfortunately you are probably right!
Srod’s responses in our email communication were super fast.
I have had sent messages which remains unanswered for months.
Re: REPORTS
Posted: Tue Apr 05, 2022 8:20 pm
by thanos
skywalk wrote: Sat Mar 12, 2022 2:59 am
Reports can be easy if you limit the scope.
Make custom reports with the canvas gadget and containers.
Or try out spiderbasic browser based forms with JavaScript add-ons.
Excellent ideas!
Do you have an example of any of this?
Regards
Re: REPORTS
Posted: Tue Apr 05, 2022 8:39 pm
by skywalk
Give a link to a custom report you want to create?
Then map out your approach to automatically populate the same elements on a canvas or html spa.
Examples will not match your exact requirements.
Where does your data come from?
Is your app desktop or browser based?
Re: REPORTS
Posted: Wed Apr 06, 2022 9:15 am
by thanos
skywalk wrote: Tue Apr 05, 2022 8:39 pm
Give a link to a custom report you want to create?
Then map out your approach to automatically populate the same elements on a canvas or html spa.
Examples will not match your exact requirements.
Where does your data come from?
Is your app desktop or browser based?
Lets say that I want to create and display a report like the following. Display all orders for each customer. The products must grouped by order number or any other criteria.

The app can be either desktop or web app
Re: REPORTS
Posted: Wed Apr 06, 2022 10:22 am
by Marc56us
Technically everything is already in PB (as usual)
You just have to draw on the printing surface by incrementing the Y position on the page and sending a page break before the end. The only calculation to do is to cut at the right place to avoid being in the middle of a table for example.
Code: Select all
StartPrinting(
StartDrawing(PrinterOutput()
DrawingFont(
; loop fields and increment height
DrawText(
LineXY(
DrawImage(ImageID(
; Check the height and if necessary add a new page.
if Y >= PrinterPageHeight()
NewPrinterPage()
Y = 0
StopDrawing()
StopPrinting()
; that's it :-)
This is the same principle for all report printing systems
- Increment the Y position at each line
- Calculate the height of the next element
- If the remaining height is smaller than the element + footer
-- Send a page break
-- Print page header
-- Print the article
With this solution, you are not dependent on an external product.
Look sample:
https://www.purebasic.com/documentation ... er.pb.html