ReportBuilder (Written with PureBasic)

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

ReportBuilder (Written with PureBasic)

Post by DoubleDutch »

Please can people test this program out, its a Report Writing program for primary schools called ReportBuilder. Its currently in beta.

Image

Here is the beta url:

http://www.ApplePanic.com/downloads/rb/install.exe

Here is the location of a quick guide on how to install and use the beta:

http://www.ApplePanic.com/downloads/rb/betaguide.pdf

Image

I just need to make sure it works on all the Windows OS's without glitches. If anyone has any ideas or suggestions then if you join the forum on www.ApplePanic.com and tell us about them it would be great, or if its easier just get back to me via email anthony@ApplePanic.com ...

Image

If you know any primary (or secondary) teachers then they may very well be interested in this program too, if you could tell them about it and let them know the url that would be great! :)

Thanks,

Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Works great! And its fast too. And the user interface is good looking and pretty simple to figure out, thought it got a lot of features.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Yea, works well. As a teacher, I can tell you that this is potentially the best such software I've come across. Well done.
I may look like a mule, but I'm not a complete ass.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Looks really cool !
Lazarus404
User
User
Posts: 74
Joined: Fri Dec 02, 2005 3:11 pm
Location: England
Contact:

Post by Lazarus404 »

I happen do be developing a pre-order system which is having a large takeup by primary and secondary schools in England and Wales. It allows parents, pupils and teachers to preorder food in advance and pay via proximity cards and tags. This stops the need for pupils to bring in money each day (reduces bullying) and allows parents to see what their children are eating and even choose the food for them. They can also specify what food can be purchased from vending machines and works as a register, so it's known what children are in school that day via door entry systems.

It's not written in PureBasic. I built the whole thing in c# and flash, so that it works across intranets and in touch screen kiosks.

Might be worth us conversing in PM!
Laz

Registered PureBasic user since Nov 2005
Check out FlashML at www.designrealm.co.uk... The ultimate Flash Component
Lazarus404
User
User
Posts: 74
Joined: Fri Dec 02, 2005 3:11 pm
Location: England
Contact:

Post by Lazarus404 »

Having just taken a look at the pdf, I think we definitely need to talk. This could be something we may be able to help sell, or help sell our software. A joint collaboration if you will.

A couple of questions though, providing my quick scan of your software has grasped it's purpose :). Does/will the software sport a web interface for parents at home wishing to checkup on their childrens progress? What database system does it use? What is it's upgrade/extensibility like?

For our software, we use an Oracle database. It would be handy if we could add once - use everywhere!

If you are interested in talking this through, please email me at lee@designrealm.co.uk
Laz

Registered PureBasic user since Nov 2005
Check out FlashML at www.designrealm.co.uk... The ultimate Flash Component
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

:? When I install it, NOD32 Antivir detects a virus in AutoUpdate.exe.

Why?
Image
PB 6.21 beta, PureVision User
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Yea, works well. As a teacher, I can tell you that this is potentially the best such software I've come across. Well done.
Srod: Thanks :) Are you Secondary or Primary? We plan to do a secondary version as soon as possible.

Fred: Its cool that you say its cool :)

Lazarus404: The program (at present) is just to do end of term reports quickly and easily. It will be expanded to do more, but this will be after the initial takeup before Easter. The main thing we are concentrating on is getting the statement database to between 15,000 and 20,000 statements and to getting the feature ready and bug-free. The database is an internal format, but it can/does import from various other formats including those that use access .mdb format. I don't mind PM'ing with you about cross product promotion, I would have to speak to the other people here at ApplePanic first though before commiting to anything. Your app sounds great btw. :)

zikirake: I don't know why, I'll get in touch with them. Some anti-virus programs are a bit wierd. The AutoUpdate.exe code is basically a hack just to get a file downloaded with a progress bar. Here is the source code:

Code: Select all

; ReportBuilder autoupdate

#WindowW=600


#OX=4
#OY=4

#BtnH=20
#BtnW=90
#ZoomH=30
#SpcX=4
#SpcY=4
#SpcX2=#SpcX*2
#BtnW2=#BtnW+#SpcX

#WindowH=(#OX*2)+(#BtnH*2)+#SpcY

Global Url.s, SaveTo.s, MainWindow.l 
Global Abort,Complete,Fault

Structure ProgressData 
  Progress.l    ; bytes downloaded 
  ProgressMax.l ; bytes total (this value might change during the download) 
  StatusCode.l  ; A code indicating what is happening 
EndStructure 

Structure IID  ; Interface Identifier structure. a IID is a 16byte value, that uniquely 
  Data1.l       ; identifys each interface. 
  Data2.w 
  Data3.w 
  Data4.b[8] 
EndStructure 

#WM_DOWNLOADPROGRESS = #WM_USER + 1 
#WM_DOWNLOADEND      = #WM_USER + 2 

Enumeration 1 
  #BINDSTATUS_FINDINGRESOURCE 
  #BINDSTATUS_CONNECTING 
  #BINDSTATUS_REDIRECTING 
  #BINDSTATUS_BEGINDOWNLOADDATA 
  #BINDSTATUS_DOWNLOADINGDATA 
  #BINDSTATUS_ENDDOWNLOADDATA 
  #BINDSTATUS_BEGINDOWNLOADCOMPONENTS 
  #BINDSTATUS_INSTALLINGCOMPONENTS 
  #BINDSTATUS_ENDDOWNLOADCOMPONENTS 
  #BINDSTATUS_USINGCACHEDCOPY 
  #BINDSTATUS_SENDINGREQUEST 
  #BINDSTATUS_CLASSIDAVAILABLE 
  #BINDSTATUS_MIMETYPEAVAILABLE 
  #BINDSTATUS_CACHEFILENAMEAVAILABLE 
  #BINDSTATUS_BEGINSYNCOPERATION 
  #BINDSTATUS_ENDSYNCOPERATION 
  #BINDSTATUS_BEGINUPLOADDATA 
  #BINDSTATUS_UPLOADINGDATA 
  #BINDSTATUS_ENDUPLOADINGDATA 
  #BINDSTATUS_PROTOCOLCLASSID 
  #BINDSTATUS_ENCODING 
  #BINDSTATUS_VERFIEDMIMETYPEAVAILABLE 
  #BINDSTATUS_CLASSINSTALLLOCATION 
  #BINDSTATUS_DECODING 
  #BINDSTATUS_LOADINGMIMEHANDLER 
  #BINDSTATUS_CONTENTDISPOSITIONATTACH 
  #BINDSTATUS_FILTERREPORTMIMETYPE 
  #BINDSTATUS_CLSIDCANINSTANTIATE 
  #BINDSTATUS_IUNKNOWNAVAILABLE 
  #BINDSTATUS_DIRECTBIND 
  #BINDSTATUS_RAWMIMETYPE 
  #BINDSTATUS_PROXYDETECTING 
  #BINDSTATUS_ACCEPTRANGES 
EndEnumeration 

Structure IBindStatusCallback_Functions 
  QueryInterface.l 
  AddRef.l 
  Release.l 
  OnStartBinding.l 
  GetPriority.l 
  OnLowResource.l 
  OnProgress.l 
  OnStopBinding.l 
  GetBindInfo.l 
  OnDataAvailable.l 
  OnObjectAvailable.l 
EndStructure 

IBindStatusCallback_Functions.IBindStatusCallback_Functions 

Structure StatusObject 
  *IBindStatusCallback.IBindStatusCallback_Functions 
EndStructure 

Global StatusObject.StatusObject 

StatusObject\IBindStatusCallback = IBindStatusCallback_Functions 

Procedure.l StatusObject_QueryInterface(*THIS.StatusObject, *iid.IID, *Object.LONG) 
  If CompareMemory(*iid, ?IID_IUnknown, SizeOf(IID)) Or CompareMemory(*iid, ?IID_IBindStatusCallback, SizeOf(IID)) 
    *Object\l = *THIS    
    ProcedureReturn #S_OK 
  Else    
    *Object\l = 0 
    ProcedureReturn #E_NOINTERFACE 
  EndIf 
EndProcedure 

Procedure.l StatusObject_AddRef(*THIS.StatusObject) 
  Shared StatusObject_Count.l 
  StatusObject_Count + 1 
  ProcedureReturn StatusObject_Count 
EndProcedure 

Procedure.l StatusObject_Release(*THIS.StatusObject) 
  Shared StatusObject_Count.l 
  StatusObject_Count - 1 
  ProcedureReturn StatusObject_Count 
EndProcedure 

Procedure.l StatusObject_OnStartBinding(*THIS.StatusObject, Reserved.l, *IB.IBinding) 
  ProcedureReturn #S_OK 
EndProcedure 

Procedure.l StatusObject_GetPriority(*THIS.StatusObject, *Priority.LONG) 
  ProcedureReturn #E_NOTIMPL 
EndProcedure 

Procedure.l StatusObject_OnLowResource(*THIS.StatusObject) 
  ProcedureReturn #E_NOTIMPL 
EndProcedure 
 
Procedure.l StatusObject_OnProgress(*THIS.StatusObject, Progress.l, ProgressMax.l, StatusCode.l, szStatusText.l) 
  ProgressData.ProgressData 
  ProgressData\Progress = Progress 
  ProgressData\ProgressMax = ProgressMax 
  ProgressData\StatusCode = StatusCode 
  
  Length = WideCharToMultiByte_(#CP_ACP, 0, szStatusText, -1, 0, 0, 0, 0)  
  *String = HeapAlloc_(GetProcessHeap_(), 0, Length)    ; allocate memory for the string
  WideCharToMultiByte_(#CP_ACP, 0, szStatusText, -1, *String, Length, 0, 0) 
  
  Result =  SendMessage_(MainWindow,#WM_DOWNLOADPROGRESS,@ProgressData, *String) ; send a message to the main routine
  
  HeapFree_(GetProcessHeap_(), 0, *String) ; free the string
  
  If Result = #True     ; if the message returns true, then abort download!
    ProcedureReturn #E_ABORT 
  Else 
    ProcedureReturn #S_OK 
  EndIf 
EndProcedure 

Procedure.l StatusObject_OnStopBinding(*THIS.StatusObject, Result.l, szError.l) 
  ProcedureReturn #S_OK 
EndProcedure 

Procedure.l StatusObject_GetBindInfo(*THIS.StatusObject, BINDF.l, *bindinfo) 
  ProcedureReturn #S_OK 
EndProcedure 

Procedure.l StatusObject_OnDataAvailable(*THIS.StatusObject, BSCF.l, Size.l, *formatec, *stgmed) 
  ProcedureReturn #S_OK 
EndProcedure 

Procedure.l StatusObject_OnObjectAvailable(*THIS.StatusObject, *iid.IID, *UNK.IUnknown) 
  ProcedureReturn #S_OK 
EndProcedure 

IBindStatusCallback_Functions\QueryInterface    = @StatusObject_QueryInterface() 
IBindStatusCallback_Functions\AddRef            = @StatusObject_AddRef() 
IBindStatusCallback_Functions\Release           = @StatusObject_Release() 
IBindStatusCallback_Functions\OnStartBinding    = @StatusObject_OnStartBinding() 
IBindStatusCallback_Functions\GetPriority       = @StatusObject_GetPriority() 
IBindStatusCallback_Functions\OnLowResource     = @StatusObject_OnLowResource() 
IBindStatusCallback_Functions\OnProgress        = @StatusObject_OnProgress() 
IBindStatusCallback_Functions\OnStopBinding     = @StatusObject_OnStopBinding() 
IBindStatusCallback_Functions\GetBindInfo       = @StatusObject_GetBindInfo() 
IBindStatusCallback_Functions\OnDataAvailable   = @StatusObject_OnDataAvailable() 
IBindStatusCallback_Functions\OnObjectAvailable = @StatusObject_OnObjectAvailable() 

DataSection 
  IID_IUnknown:  ; {00000000-0000-0000-C000-000000000046} 
    Data.l $00000000 
    Data.w $0000, $0000 
    Data.b $C0, $00, $00, $00, $00, $00, $00, $46 
    
  IID_IBindStatusCallback:  ; {79eac9c1-baf9-11ce-8c82-00aa004ba90b} 
    Data.l $79eac9c1 
    Data.w $baf9, $11ce 
    Data.b $8c, $82, $00, $aa, $00, $4b, $a9, $0b    
EndDataSection 

Enumeration 
  #DownloadWindow 
EndEnumeration 

Enumeration 
  #Gadget_1 
  #Gadget_2 
  #Gadget_Url 
  #Gadget_SaveTo 
  #Gadget_ChooseFile 
  #Gadget_Status 
  #Gadget_Progress 
  #Gadget_Start 
  #Gadget_Stop 
  #Gadget_Close 
  #Gadget_StatusText 
EndEnumeration 

Procedure BackgroundDownload(Dummy.l) 
  Result.l = URLDownloadToFile_(0, @Url, @SaveTo, 0, @StatusObject) 
  SendMessage_(MainWindow, #WM_DOWNLOADEND, 0, Result) 
EndProcedure 

Procedure WindowCallback(Window.l, Message.l, wParam.l, lParam.l) 
  Result.l = #PB_ProcessPureBasicEvents 
  Select  Message
    Case  #WM_DOWNLOADPROGRESS 
      *Progress.ProgressData = wParam 
      ; let's update the ProgressBar: 
      If *Progress\Progress = *Progress\ProgressMax Or *Progress\ProgressMax = 0 
        SetGadgetState(#Gadget_Progress, 0) 
      Else 
        SetGadgetState(#Gadget_Progress, (*Progress\Progress*100)/*Progress\ProgressMax) 
      EndIf 
      ProcedureReturn Abort 
    Case  #WM_DOWNLOADEND ; download finished:
      If lParam = #S_OK     ;jippeeeee :) 
        SetGadgetState(#Gadget_Progress, 100) 
      Else  
        Fault=#True
      EndIf 
      Complete=#True
      DisableGadget(#Gadget_Stop, #True)                
  EndSelect
  ProcedureReturn Result 
EndProcedure 

Name$="ReportBuilder Update"

MainWindow=OpenWindow(#DownloadWindow,0,0,#WindowW,#WindowH,#PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_ScreenCentered,Name$)
If MainWindow=0
  Goto  Error
EndIf
If CreateGadgetList(WindowID())=0
  Goto  Error
EndIf

ProgressBarGadget(#Gadget_Progress,#OX,#OY,#WindowW-(#OX*2),#BtnH,0,100) 
ButtonGadget(#Gadget_Stop,#WindowW-#OX-#BtnW,#OX+#BtnH+#SpcY,#BtnW,#BtnH, "Abort") 

SetWindowCallback(@WindowCallback()) 

DisableGadget(#Gadget_Stop, #True) ; who needs an 'abort' button now?

; A nice little extra for the StringGadgets: AutoComplete feature only present on IE5+, so we load the function manually
#SHACF_URLALL = 2|4 
#SHACF_FILESYSTEM = 1 
CoInitialize_(0)  

Complete=#False
Abort = #False ; set Abort to false, so our download doesn't get stopped imediately
DisableGadget(#Gadget_Stop, #False)   
SetGadgetState(#Gadget_Progress, 0) ; clear gadgets:
Url = "http://www.applepanic.com/downloads/rb/install.exe"
SaveTo = "install.exe"
CreateThread(@BackgroundDownload(), 0) ; finally, start the download by creating the thread:

Repeat 
  Event = WindowEvent()
  Select Event
    Case #PB_EventCloseWindow
      Abort=#True
    Case #PB_EventGadget 
      Select EventGadgetID() 
        Case #Gadget_Stop 
          Abort=#True
      EndSelect 
    Default
      Delay(1)
  EndSelect
Until Abort=#True Or Complete=#True

If Abort=#True
  MessageRequester(Name$,"You aborted the download, no changes made!"+Chr(10)+"Click okay to restart ReportBuilder...")
  RunProgram("ReportBuilder.exe")
Else
  If Fault=#True
    MessageRequester(Name$,"The download was NOT successful!"+Chr(10)+"Click okay to restart ReportBuilder...")
    RunProgram("ReportBuilder.exe")
  Else
    MessageRequester(Name$,"The download was a success!"+Chr(10)+"Click okay to install new the version of ReportBuilder...")
    RunProgram("Install.exe","auto","")
  EndIf
EndIf

End

Error:
  MessageRequester(Name$,"An error occurred while initialising the AutoUpdate..."+Chr(10)+"Click okay to restart ReportBuilder...")
  RunProgram("ReportBuilder.exe")
End
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

:? Very strange, the problem is localized in

Code: Select all

Result.l = URLDownloadToFile_(0, @Url, @SaveTo, 0, @StatusObject) 
.

Really, I don't know why
PB 6.21 beta, PureVision User
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

Sorry... If I change

Code: Select all

SaveTo = "install.exe" 
to

Code: Select all

SaveTo = "install.ex" 
(removing last 'e') There are no problems!
PB 6.21 beta, PureVision User
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

I've been intouch with the antivirus company and sent them the file. I'll forward this info too.

I wonder if they just check for .exe ?

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

DoubleDutch wrote:I've been intouch with the antivirus company and sent them the file. I'll forward this info too.

I wonder if they just check for .exe ?

-Anthony
It can be... I changed the source url of the exe to any url with any extension and with the original code

Code: Select all

SaveTo = "install.exe"
and the antivirs gets a "virus"
PB 6.21 beta, PureVision User
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

No problems with McAffee!
Srod: Thanks Are you Secondary or Primary? We plan to do a secondary version as soon as possible.
I teach in a secondary school. I've used a similar product in the past, but it was not very good, not very flexible. Yours looks and feels a hell of a lot better.
I may look like a mule, but I'm not a complete ass.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thats a pretty easy way of them saying they catch all known viruses...

... they also catch all known legal programs as viruses too ;)

I wonder what the reply from them will be...

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

srod: Thanks for checking it out with mcaffee. Looks like that program doesn't cheat. :)

Was the program you tried before called ReportAssist? This is the main program people seem to be unhappy about, its also the most popular. Our program will be able to import data from ReportAssist. ;)

Would you also mind trying the secondary version when we get it ready? I woudn't mind knowing what features you would like in such a program, I will try my best to add them.
Last edited by DoubleDutch on Tue Dec 13, 2005 11:58 am, edited 1 time in total.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Post Reply