REPORTS

Just starting out? Need help? Post your questions and find answers here.
User avatar
C87
Enthusiast
Enthusiast
Posts: 178
Joined: Mon Jul 17, 2017 7:22 am
Location: Cotswolds England

REPORTS

Post 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?
If it's falling over......just remember the computer is never wrong!
Bitblazer
Enthusiast
Enthusiast
Posts: 761
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: REPORTS

Post by Bitblazer »

Once upon a time there was Artic Reports available from nxsoftware.
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: REPORTS

Post by HeX0R »

Yeah, the incredible srod, he unfortunately left us.
BarryG
Addict
Addict
Posts: 4122
Joined: Thu Apr 18, 2019 8:17 am

Re: REPORTS

Post 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.
User avatar
skywalk
Addict
Addict
Posts: 4210
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: REPORTS

Post 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!
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
skywalk
Addict
Addict
Posts: 4210
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: REPORTS

Post 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
BarryG
Addict
Addict
Posts: 4122
Joined: Thu Apr 18, 2019 8:17 am

Re: REPORTS

Post 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%.
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: REPORTS

Post 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
infratec
Always Here
Always Here
Posts: 7576
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: REPORTS

Post 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.
BarryG
Addict
Addict
Posts: 4122
Joined: Thu Apr 18, 2019 8:17 am

Re: REPORTS

Post by BarryG »

HeX0R wrote: Sat Mar 12, 2022 10:42 am
One 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!
thanos
Enthusiast
Enthusiast
Posts: 423
Joined: Sat Jan 12, 2008 3:25 pm
Location: Greece
Contact:

Re: REPORTS

Post 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.
» myPersonal Banker :: Because you do not need to have a master degree in economics in order to organize your finances!
thanos
Enthusiast
Enthusiast
Posts: 423
Joined: Sat Jan 12, 2008 3:25 pm
Location: Greece
Contact:

Re: REPORTS

Post 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
» myPersonal Banker :: Because you do not need to have a master degree in economics in order to organize your finances!
User avatar
skywalk
Addict
Addict
Posts: 4210
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: REPORTS

Post 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?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
thanos
Enthusiast
Enthusiast
Posts: 423
Joined: Sat Jan 12, 2008 3:25 pm
Location: Greece
Contact:

Re: REPORTS

Post 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. Image
The app can be either desktop or web app
» myPersonal Banker :: Because you do not need to have a master degree in economics in order to organize your finances!
Marc56us
Addict
Addict
Posts: 1600
Joined: Sat Feb 08, 2014 3:26 pm

Re: REPORTS

Post 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
Post Reply