Page 5 of 14

Re: Arctic reports (visual report designer now available)

Posted: Thu Sep 10, 2009 9:08 pm
by srod
10th September 2009.

nxReport version 1.4 / Pyrex 1.1.

Binding for Powerbasic.


Hi,

a few bugs fixed both with the nxReport core module and the Pyrex visual designer. Have also added the option of generating 'MODAL' or 'MODELESS' preview windows. In the modal case, nxReport adds it's own message retrieval code and the library will not hand control back to the host application until the preview has been closed. This means that you can generate a preview without worring about message retrieval etc. Very useful.

Most importantly, however, is that there is now a Powerbasic binding for the nxReport core module and thus you can now easily use the Arctic reporting system with both Purebasic and Powerbasic applications (requires Powerbasic 9.0 onwards). The Powerbasic wrapper makes good use of nxReport's OOP interface and so the code required to work with this library is very very similar in both languages.

Work on the Powerbasic demos continues but should be complete in a couple of days or so.

To make use of the Powerbasic wrapper, you MUST upgrade to version 1.4 of nxReport. No existing code will be broken by this.

Regards.

Stephen.

Re: Arctic reports (visual report designer now available)

Posted: Mon Sep 28, 2009 4:52 pm
by srod
28th Sept 2009.

Pyrex 1.2 / nxReport 1.5.

Version 1.5 of the nxReport Core Module allows for importing existing Arctic-Reports into a report object. This means that you can easily create a 'bank' of report templates for use in other reports etc. Options include importing page properties, control units, fonts and images (on top of importing all subreports and controls etc.)

There are a couple of things to note though :
  • In the case of an error, the existing report object (into which you are attempting to import an additional report) is left as it was prior to the attempted import.
  • In the event of the imported report containing font or image ID's which clash with those in the host report then the new font / image IDs will be automatically renamed.
  • In the event of the imported report containing subreport or control ID's which clash with those in the host report then the new subreport / control IDs will be automatically renamed. However, in these cases, any expressions referring to the original IDs will not be altered as this would slow down proceedings too much. Because of this it is advised that when creating reports to be imported, subreport and control IDs are chosen so that they are very unlikely to be duplicated in host reports etc.
Pyrex 1.2 (the visual report designer) has the following changelog :
  • Some minor repainting bugs fixed.
  • The main Pyrex application window is now restored on application restart.
  • Added a rebar control allowing the various toolbars to be repositioned etc.
  • Support for the newly added import facility described above.
Note that because I do not like the look of a themed rebar when running on XP, I have turned off theming for the rebar control. You can turn this back on though through Pyrex's settings menu option.


Work now begins on a scripting component for the Arctic-Reports system in order to satisfy certain user requests. This component will allow each report to contain it's own code module(s).

Re: Arctic reports (visual report designer now available)

Posted: Sat Dec 05, 2009 4:41 pm
by srod
5th Dec 2009.

Pyrex 1.3

A minor update to the Pyrex report designer.

Have added F5 shortcut for previewing the current report.

Have also upgraded the expression builder tool to use a Scintilla control with fully customisable coloring of the various expression parts etc. Should make things easier when building complex expressions.

The installer is now a msi package and adds entries to the control panel 'Programs and features' etc. Desktop shortcuts etc. are added for all users.

Re: Arctic reports (visual report designer now available)

Posted: Tue Jun 22, 2010 8:18 pm
by srod
22nd Jun 2010.

Pyrex 1.35

Version 1.35 of the Pyrex visual report designer represents a significant update, bringing a few oft requested features designed to make the report design process much simpler.

This update is actually a prelude to the forthcoming version 1.4 update as it contains some important features which have been requested by many people (as mentioned above). Version 1.4 will add copy/paste and undo/redo, but in the meantime I release this version in order to make available the new facilities without delay. Think of version 1.35 then as an 'inbetween' version.

Bugs fixed :
  • A mouse capture bug when adding new controls.
  • A bug related to altering subreport ID's.
  • Various rendering problems with the property box controls.
  • A bug related to altering image ID's.
  • A latent bug regarding font escapements.
New features :
  • You can now simply double-click a control to bring up the expression builder (for those controls taking text or expressions as their source).
  • Reposition and resize controls by clicking the mouse and dragging them etc. Previous to this you had to use the arrow buttons or the cursor keys. This is a major enhancement.
  • Pyrex now attempts to display a list of field-names for the subreport currently being edited (assuming it has a data-source). This is a very complex thing for Pyrex to attempt since subreport connection strings / SQL statements are in the form of nxReport expressions which can only be evaluated at 'run-time' (e.g. previewing a report). Having said this, Pyrex is nevertheless proving very adept at identifying the field-names. The listed field-names will exactly match those required for bound field controls which should assist massively when constructing reports (no more print failures due to users using incorrect field-names!)

    If Pyrex succeeds in listing the field-names, then the user can simply drag fields to the design canvas etc. as opposed to having to drag out a control by hand.
  • Pyrex now allows the user to set values for report parameters which will enable Pyrex to preview parameterised reports (assuming all data-sources are present). The option of saving the parameter values within the underlying report file is disabled for now as that requires an upgrade to the nxReport core module (forthcoming).
As mentioned above, this update should make life a lot easier for the user charged with designing reports. Especially being able to move/size controls with the mouse. The lists of data-source field-names should also prove very valuable.

For those who requested these features I offer my aplogies for things taking a little longer than I anticipated.

Click here for a screenshot of Pyrex 1.35.

Stephen.

Re: Arctic reports (visual report designer now available)

Posted: Wed Jun 30, 2010 5:45 pm
by srod
30th Jun 2010.

Pyrex 1.36

Pyrex 1.36 follows hot on the tails of Pyrex 1.35 and adds a couple more important features. (Expect many more updates whilst I now work full-time on the Arctic Reports system!)

New features :
  • Added the option of using a square design grid (as opposed to a dotted one). This is now the default (and looks much better than a dotted grid!)
  • When selecting multiple controls (e.g. by holding down the shift key whilst clicking controls), all such selected controls are now highlighted in the design grid (as opposed to just the main selected control being highlighted). This makes it much easier to work with the multiple controls.
  • As well as being able to move/size multiple controls etc. you can now alter many control properties simultaneously for the selected controls. For example, select 10 controls and use the property box control to alter the background color and all selected controls will be altered as appropriate. Previously, you would have to alter the background color individually for each control which could be very time consuming.

    Applicable control properties are :
    • visibility
    • border style
    • border width
    • border color
    • background mode
    • background color
    • foreground color
    • image
    • image format
    • text format
    • clip text setting
    • clip custom control setting
    • font
    • font escapement
    • horizontal alignment
    • vertical alignment.
    There of course remain some control properties with which it is not possible to apply changes to more than the primary selected control (e.g. a control's source expression).
Click here for a screenshot of Pyrex 1.36.

Pyrex 1.40 will follow soon.

Stephen.

Re: Arctic reports (reporting system - Windows)

Posted: Wed Jun 30, 2010 9:22 pm
by Rook Zimbabwe
I still cnnot get Pyrex to open my Access ODBC database.

Maybe you need to actually OPEN the database in Pyrex? -- I have no clue!!!

I use 3 databases in my POS program and the one it will open is the menu database... I suspect a cosmic plot!!! :wink:

I was hopin gmy reportss could be on the (ASCII) TICKET.mdb file. I even changed the opener name to AREPORT in my program but that does not show up as a possible when I use Pyrex.

Using latest version 1.36

I even have reports in the DB that I simply want to transmit to pyrex and be able to print!!! :oops:

I feel soooo stupid!!!

Re: Arctic reports (reporting system - Windows)

Posted: Wed Jun 30, 2010 9:43 pm
by Marco2007
What happens, if
-> you choose the the right DSN...
-> SQL String: "select * from table"
-> refresh connection
?

Re: Arctic reports (reporting system - Windows)

Posted: Thu Jul 01, 2010 10:05 am
by srod
Rook,

it should boil down to something simple. I have used ODBC with all kinds of drivers with Arctic Reports without a problem. Can you please e-mail me the .nxr report file and the database file in question (along with any username/password I may require to access it).

A simple .mdb file should pose no problem whatsoever. I use them all the time.


**EDIT : you do realise that Pyrex isn't there to print your reports? It is a report designer. Sure, it will preview/print your reports (if it can locate all data-sources etc.) but Pyrex itself is not intended to give your application preview/printing facilities - that is the job of the core nxReport module. Pyrex is not intended to be shipped with your application!

Re: Arctic reports (reporting system - Windows)

Posted: Thu Jul 01, 2010 7:08 pm
by srod
@Rook : well, I told you it would be something simple! In this case, you hadn't created a flaming report you great steaming twit!!! :) (Just kidding!)

Now, the Pyrex report designer works with .... well, reports! It does not work with ODBC DSNs! You cannot just shove a database at Pyrex (or any other part of the Arctic Reports system) and hope for it to produce some kind of report for you. It simply does not work that way. If you have ever used any reports in MS Access then you will have some idea of how the Arctic Reports system works. A report (in the Arctic Reports sense) is separate from any database in that it is not tied to any particular provider etc. If you want a report listing records taken from, say, a SQL server database then you begin by designing a simple report. You then tie parts of that report to your SQL server database as appropriate. Indeed, a single report can utilise as many different data-providers as you wish and they can all be linked in various ways. Your report file will remain separate to any databases you use etc.

You create a report either through code or via the Pyrex designer. In Pyrex, create a new report. This report will be completely empty, devoid of content, devoid of controls, devoid of subreports and, yes, devoid of ODBC datasources (or any other kind!)

You give a report content via subreports, as many as you need. You could use a separate subreport for each individual page (which would be a poor way to design a report) or use a separate subreport for different aspects of the whole.

So, use the relevant toolbar button to add a subreport. You will notice that the subreport has various sections; page header, subreport header, group header, detail and so on. You can add controls to any of these sections. The 'detail' section is obviously the 'work-horse' of the subreport (this section will be repeated for each record in any datasource you assign to the subreport). Select the detail section in the object tree and use the property-box to change it's height to, say, 10 (mm).

You can now add controls to the detail section of the new subreport by using the appropriate toolbar buttons and dragging out suitable rectangles etc.

Now, let us add your datasource. Click the subreport in the object tree and in the property-box double-click the 'Data-source' title to expand the group. Under 'Type' select ODBC.

Now, select the 'Connection' item in the data-source group and click the ellipsis which appears. This will bring up Pyrex's ODBC connection tool. With the tool, select your DSN from the drop down combo box control (assuming you have created a suitable DSN etc.)

If you click the 'Refresh connection' button then Pyrex will endeavour to display a list of tables within the database (it worked fine here with your MDB file when I tried it).

Happy? Now enter a suitable SQL string in the relevant part of the ODBC builder. If entering a simple SQL statement, then just go ahead and type it. For more complex statements involving parent subreports and/or parameters etc. you need to enter an nxReport expression (beginning with an = symbol) but I suggest you just stick with a simple SQL statement for now; something like SELECT * FROM DAYTICKET.

Hit 'Refresh connection' if you wish to run the SQL statement within the tool so that you can peruse the fields returned etc.

When you are happy click 'Okay' and all being well, the datasource fields should be listed alongside the design canvas.

Now drag the 'ITEM' field to the detail section and you will have a bound field control all made up and waiting (you can also create it manually of course if you prefer). Use the mouse to resize/reposition it as appropriate. Hit the preview button and there you are... an instant report!

I can send you a copy of this report if you would like?

Now, when you have finished with the report design then alongside your application you ship the .nxr report file, any data-sources and the nxReport core module. The nxReport module is required in order to allow your application to offer up the report for previewing and/or printing etc. Do not ship the Pyrex designer!

As soon as Pyrex 1.4 is complete I shall turn to the online manual which now needs revamping and completing. I shall include a bunch of tutorials with the manual as well.

I hope this helps?

Re: Arctic reports (reporting system - Windows)

Posted: Thu Jul 01, 2010 7:52 pm
by Rook Zimbabwe
I AM NOT A TWIT!!! I AM A DUNDERHEAD!!! :oops:

I am having issues creating a DSN for this though. I open the mdb in my program with the following:

Code: Select all

DSN$ = "AREPORT"
File$ = "TICKET.mdb" ; "menu.mdb"
; Debug "TICKET DB OPEN!"
Attrib$ = "DSN=" + DSN$ + ";DBQ=" + File$
If MakeConnection(Driver$, Attrib$)
  If OpenDatabase(#DatabaseTIK, "AREPORT", "", "") ;"Admin","")
  EndIf
EndIf
If you click the 'Refresh connection' button then Pyrex will endeavour to display a list of tables within the database (it worked fine here with your MDB file when I tried it).
I have 60+ DSNs and when I do this I get a:

UNABLE TO OPEN DATA-SOURCE popup

Please send me the file!

I KNOW this is my issue!!! I am goinng to look at how to RESET the DSN. The only one that opens correctly was from when I had to create a DSN for it back in my software version 1.0!

I wish there was a tool to check/create a DSN

Re: Arctic reports (reporting system - Windows)

Posted: Thu Jul 01, 2010 8:00 pm
by srod
First, Pyrex does not actually require access to any data-sources. You can happily design your report(s) without having access to your databases etc. Of course, in these cases, Pyrex will not be able to display lists of fields etc. and you will thus have to create all bound controls manually. Only the nxReport core module needs definite access to the databases in order to offer report previews to your finished application etc.

If you do want Pyrex to list database fields whilst you are designing your report then it needs access to the databases in question. In the case of ODBC, the DSN needs to be persistent - that is you should create the DSN through the Windows control panel and do not delete it. If you create the DSN through code (as you have listed) then make sure you do not delete the DSN at the program's end. If you delete it then Pyrex will not be able to locate the DSN.

If Pyrex is unable to locate the DSN (and it hasn't been deleted) then simply type the DSN name into Pyrex's ODBC builder rather than use the drop down list etc.

Re: Arctic reports (reporting system - Windows)

Posted: Thu Jul 01, 2010 8:14 pm
by srod
I wish there was a tool to check/create a DSN
It's called the Windows control panel! :wink:

(Administrative tools.)

Arsing around with DSNs can be a pain in the... arse! This is why, for mdb files in particular, I use OLE-DB instead. Pyrex (and Arctic Reports in general) offers OLE-DB. The invoices demo does exactly this.

Re: Arctic reports (reporting system - Windows)

Posted: Thu Jul 01, 2010 8:29 pm
by Rook Zimbabwe
See that is it! You are a GENIUS Stephen!!! I did that and all the fields popped up so my report design was 1000% easier!!! :shock:

Re: Arctic reports (reporting system - Windows)

Posted: Thu Jul 01, 2010 8:43 pm
by srod
Rook Zimbabwe wrote:See that is it! You are a GENIUS Stephen!!! I did that and all the fields popped up so my report design was 1000% easier!!! :shock:
Well, the word 'genius' is perhaps stretching things a wee bit, not much mind! :wink:

Bear in mind that Pyrex will not always be able to retrieve the field-names of a subreport's data-source. If it does fail in some situation, then don't worry because, as stated above, this does not prevent you from designing your report. Unlike some designers, Pyrex does not halt proceedings if a particular datasource is unavailable at design time etc. (As long as the sources are available when you run your app then all is well!)

So, Pyrex being able to retrieve a subreport's fieldlist should be considered as a bonus! :)

For straight forward SQL statements there will be no problem. It is only when using very complex nxReport expressions to create your SQL statements (e.g. when using parameters or an SQL statement that refers to another subreport's data-source or controls) that Pyrex may fail to retrieve the said list. I say 'may fail' because I have yet to encounter a situation in which Pyrex does actually fail in this regard, which has suprised me a little! :) The reason it may fail is because well, only the nxReport core module is equipped to process and evaluate an nxReport expression, and only then at 'run time', i.e. when the undelying report is being previewed or printed etc. The Pyrex designer is thus not equipped to process such expressions because it cannot afford to 'execute' a report (by that I mean preview or print it) whenever a data-source is altered etc. Too wasteful!

Instead, when faced with such an expression, Pyrex essentially cheats and tears the nxReport expression apart, pulling out those parts containing valid SQL syntax. It then creates a 'bastardised' version of the SQL statement, enough to retrieve just the sought after field names which it then runs past the underlying data provider (e.g. an ODBC mdb driver etc.) With enough luck on our side, the data provider will not complain too much at this hashed up SQL statement and will indeed provide us with the list of field names! :)

The reason that Pyrex passes the bastardised SQL statement to the underlying provider as opposed to parsing the SQL statement looking for field names is because of statements like : SELECT * FROM myTable etc. Try getting the field names from that! :)

The point is that we should really consider ourselves fortunate whenever Pyrex does provide us with a helpful list of field names etc. and to not worry if we encounter a situation in which the field names cannot be listed for some reason whilst we are designing the report. :wink: I say again though that I have yet to encounter a case in which the field names could not be listed.

Re: Arctic reports (reporting system - Windows)

Posted: Tue Jul 20, 2010 1:23 pm
by srod
20th July 2010.

Hi,

Pyrex 1.4.0 (incorporating updates 1.3.5 and 1.3.6 which were released to assist users of Pyrex) is a major update to the visual report designer. A huge update!

Before listing the changelog let me just say that work will now begin on revamping and completing the online manual and upon a series of major updates to the core nxReport module (see the nxSoftware blog for more details).

First, a whole heap of bugs have been fixed, but I won't bore you with them here. You can see the list in the relevant history file available in the Arctic Reports download section.

New features :
  • Cut / Copy and Paste of individual controls added.
  • Undo / redo.
  • Reposition and resize controls by clicking the mouse and dragging them etc.
  • When moving/sizing a control via the mouse, the dimensions of the control are now displayed in the statusbar as the control is moved/sized etc.
  • Added a context menu to the design canvas (just right click the design canvas). This menu allows us to quickly paste controls at specific locations and shortcuts the business of adding new controls etc.
  • Added the option of using a square design grid (as opposed to a dotted one). This is now the default.
  • Multiple selected controls. All selected controls are now highlighted in the design grid (as opposed to just the main selected control being highlighted).
  • Many control properties, when altered via the main property box, are applied to all selected controls, not just the primary selected control. Applicable control properties : visibility, border style, border width, border color, background mode, background color, foreground color, image, image format, text format, clip text setting, clip custom control setting, font, font escapement, horizontal alignment and vertical alignment.
  • Double click a control to bring up the expression builder (for those controls taking text or expressions as their source).
  • Pyrex now attempts to display a list of field-names for the subreport currently being edited (assuming it has a data-source). If it succeeds then the user can simply drag fields to the design canvas etc.
  • Pyrex now allows the user to set values for report parameters which will enable Pyrex to preview parameterised reports (assuming all data-sources are present). The option of saving the parameter values within the underlying report file is disabled for now as that requires an upgrade to the nxReport core module (forthcoming).
Copy/cut/paste operate upon single controls only at the moment. You cannot copy multiple controls or entire subreports etc. There are a couple of operations which cannot be undone (or redone) which are listed in an accompanying text file in the download section.

This new version of Pyrex is to be considered a test version only at this stage. A previous stable version is still available.

Click here for a screenshot of Pyrex 1.4.0.

Stephen.