gb.Report2 example

Post

Posted
Rating:
#1 (In Topic #1861)
Enthusiast
AndyGable is in the usergroup ‘Enthusiast’
Gambas version:  3.19.5
Operating system and version: Debain 12
QT or GTK: ? GTK

Hi everyone

I just wondered if someone could point me in the right direction for a example of how to make a report in the new report2 component

I have asked chatGPT but that is showing some strange results (lol) basicly what I want to do is a report that looks a litle like below but
more formmated (as that what the new component looks like it can do)

 

STORE NAME                                                                                                                                                    Printed 31/10/2025

                                                                                    Current Active stock Records

0001 FRUIT JUICE

SKU          Barcode                    Description                                                                      Supplier             COST              RETAIL
Code        Number                    Shelf Edge label                                                              ID Number         OF ITEM          PRICE

1234        5018374320766          VALUE ORANGE JUICE                                                  VAL1375                   £0.15                £0.35

0004 HEALTH & BEAUTY

SKU          Barcode                    Description                                                                      Supplier             COST              RETAIL
Code        Number                    Shelf Edge label                                                              ID Number         OF ITEM          PRICE

175645    1234567890123        SURE FOR MEN 500ml SPRAY CAN                                 SURE123            £1.15                      £2.99

PRINTED BY : Back Office User on terminal BO001                                                                                                           Page 1 of 1


I hve the SQL and the data retrevial all working (as I have a really plain report Im using at the moment)

Kind Regards
Andy
 
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Expert
Quincunxian is in the usergroup ‘Expert’
Hi Andy,
A bit of topic but might be worth considering. I've followed your business journey through your forum posts with a lot of interest in applying Gambas in a 'real world' use.

Many years ago, I worked for a large company as the IT manager and we had a lot of internal paper forms that we had printed in bulk. I did a lot of work with the printing consultants and they gave me some sound advice.
The key thing was to understand who your audience was - who was going to read the forms, how long they had to be kept and was the information understandable.
Not sure if you have to print paper or it's all electronic but good design has its own merits.

So, most people know that SKU is a code and a Barcode is a number - you're using an extra line that doesn't really give any additional information.
Who cares? Well if you're printing paper invoices then that one extra line adds up over time and the cost savings in removing it can amount to a viable amount over say a year.
If you have to store copies of printed invoices or receipts for legal purposes ( 7 years in Australia where I'm from) then more paper boxes means more storage cost.

 
SKU          Barcode                    Description                                                                      Supplier             COST              RETAIL
Code        Number                    Shelf Edge label                                                              ID Number         OF ITEM          PRICE

becomes…

SKU         Barcode                    Shelf Description                                                           Supplier Id          Cost               Price  

Also, if it's on the same invoice then you don't really have to repeat it when a grouping changes, new page or course but again, it just saving valuable cm in paper that adds up over time.

My old company printed a LOT of invoices and when we switched to better formatting in our output, we saved about $40K a year (AUS $).

…anyway, apologies to wander in the weeds of 'off topic'
 



Cheers - Quin.
I code therefore I am
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Enthusiast
PJBlack is in the usergroup ‘Enthusiast’

Quincunxian said

the weeds of 'off topic'

to stay there …

hey quin … as usual most of the time you are not saying that much but if you do it's on the point (auf den punkt … vermutlich deutsche denke in perfektion) and i'm happy to hear from you !

micha
Online now: No Back to the top

Post

Posted
Rating:
#4
Guru
BruceSteers is in the usergroup ‘Guru’
look at the gambas farm.

type report or report2 in the filter


Untitled.jpg
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Enthusiast
Gianluigi is in the usergroup ‘Enthusiast’
Hi AndyGable

There's also this example here: gb.Report 2 print only first page - Gambas ONE
Don't worry about the code that creates the calculations, because you risk jail time for tax evasion.  :lol:
Keep in mind that gb.report2 relies entirely on the window design and little on the code, but since you take the data from a query the reference code is that of ReportTest.
In fact, I'm considering removing LoremReport from the farm.
If you have specific questions, I'm available (with my slow times).

 :goodbye:
Online now: No Back to the top
1 guest and 0 members have just viewed this.