BKS Shorts 1.8.0

BKeeney Software has released version 1.8 of our reporting classes and tool for Xojo.

Thanks for using BKS Shorts, the premier reporting tool for Xojo projects. We appreciate all of the feedback we’ve received over the course of the year. Trust me when I say that
Shorts wouldn’t be where it is without your dedicated use and feedback of issues, concerns, and feedback requests.

Version 1.8 fixes a rather insidious bug that’s been in the Designer since day one. The Top property for PrintItems was always reported as relative to the top of the page. Well, this is just plain wrong because in a banded reporting tool Top and Left should be relative to the BAND, not the page. This one change literally affected everything from read & write, to drawing of the display, to all of the mouse handling. PLEASE REPORT ANY ISSUES YOU FIND ASAP to Mantis.

Version 1.8 is the last major release of the 1.x series. Version 2 will add Report Headers/Footers and a new SQL engine that will hopefully make reports much faster than they are today. When Xojo gets their act together for 64 bit debugging you can be sure we’ll do 64 bit debugging and make sure things work. A stretch goal for version 2 is subreports. VERSION 2.0 will be an upgrade.

Full change list:

New:

  • Added Informix to the list of databases
    • Uses the SQL Plugin from MonkeyBread Software. Requires additional license purchase from MBS.
  • Added Constants to the tool. Essentially a Dictionary that allows a user to add constants to a report without having to put it in a database table.
    • Constants show up in the Tool List
    • Constants Editor is invoked under the Report menu in the Demo
    • Constants are saved in the JSON string and can be changed at runtime before rendering
    • Constants are by report. Please let us know if you want global constants.
  • Added the ability to have nested conditional statements in the filter data option of Report Designer.
    • Added two integer properties (Leading and Trailing) to PAF_DatabaseKit.QueryCondition required to include these in SerializeJSON, Constructor, and Clone methods
    • updates to winDBFilter adding a mousedown event and UpdateList method.
    • Also modified Display method to accomodate the nested conditions
      updatte to winDBFilter added pushbuttons to add, remove and clear groupings.
    • update to winDBFilter added headerpressed event to prevent sorting of clumns in listbox so logic is not changed

Changes:

  • Added graphics to the primitive elements (line, rect, oval, image, text) you can drag to the design canvas
  • Removed the metadata shortcuts.
  • Turned off sorting filters by column in winDBFilter to prevent changes in filter logic
  • Changed location of Sakila (example database) download location.
  • Resize item behavior changed a bit from previous version. WANT FEEDBACK.

Bug Fixes:

  • When rendering directly from JSON string the DB schema isn’t rescanned unless necessary.
  • Exporting to CSV not brings back all rows.
  • When changing a text format to an already existing style, the stylename was not being updated, thus in some cases causing the style to revert to the default.
    This was a particular problem when saving a report and then printing directly to a PDF.
  • Positioning of the items in the bands is now relative to the band rather than the page.
    • So setting an item to (0,0) will put it to the top/left of the band it’s assigned rather than moving it to top/left of the page.
  • Fixed issue with Encoding of special characters. (Thanks to Valdemar De Sousa)
  • May have found the issue causing occasional hard crash. Had to do with updating the Property List after it had already been dismissed

Product home page at http://www.bkeeney.com/allproducts/bkeeney-shorts/

BKS Shorts Version 1.7.0 Released

pens128BKeeney Software is pleased to announce a new release of BKeeney Shorts, their Reporting tool for Xojo.  BKS Shorts allows users to embed a report designer into their desktop applications and render reports onscreen, to a printer, as well as to HTML, CSV, and PDF formats (PDF requires a DynaPDF license). Web applications can render reports to HTML, CSV and PDF Formats.

Version 1.7 is an extensive update with a new, faster, file format.  Users with dynamic queries can now put a summary of selections in the header.  Dynamic queries that use popup list selections can now make them optional.  And much, much more.  Complete change list below.

BKeeney Shorts Product Page:  http://www.bkeeney.com/allproducts/bkeeney-shorts/

BKeeney Shorts costs $300 and is shipped with 100% unencrypted Xojo source code.

New Features:

  • Added SupressField property to Fields. This will keep rows with identical text to the row above it from displaying. Resets on each page.
  • Added ?? shortcut to Header/Footer bands to be able to put report parameters into the report. Feedback appreciated.
  • Added check upon opening reports in the designer to see if all fields in the report are still valid.
  • Now provide an error message to user if there were any errors while generating report.
  • Added a Version field to the report to make it easier for future file format changes. New file format is 1. Added a conversion routine to convert to version 1.
  • The Property List now has a dedicated popup menu for Date fields.
  • The Query List Dynamic queries can now be made optional to ‘select all’ for that field.

Changes:

  • Now provide feedback to the user during report generation. This will give rough estimates of numbers of rows created.
  • When switching back to Design view we now make sure the thread generating the report is killed if still running.
  • Major rewrite to the DBWrapper class to make it much more effecient.
  • PAF_QueryCondition made part of the PAF_DatabaseKit and renamed to PAF_DatabaseKit.QueryCondition
  • Reports will save the DefaultStyle from the StylesList.
  • Added some Localization strings into the object list.
  • Removed the Contextual Menu from the Property List format item. Only used for Dates and it now has dedicated Date Popup.
  • Added a WaterMark to two of the Coded reports.

Bug Fixes:

  • Fixed issue where Grand Summary bands weren’t working.
  • Views are now properly vetted through the TableViewAddCheck.
  • Rescanning the schema will refresh the object list properly now.
  • Can no longer drag a report objects (from the Report section of the Object List) into the designer. Now you can only drag fields and report primitives.
  • Repeat Each Page and Page Break are now only valid and displayed for group headers.
  • Adding/Removing items from the Designer now updates the Report Objects section of the object list.
  • Fixed wording in the Band Editor.
  • Background Text Color now saved properly in Style editor.
  • Pressing Enter/Return while in the Properties List will update the object in the Editor.
  • Fixed issue with report time in Report Footer if user had never set format in preferences.
  • Fixed issue with line objects not calculating their top/right property properly.
  • Fixed a date conversion issue when formatting the dates to other than default.
  • Fixed mouse handling and drawing issues when the canvas width was smaller than the page width.
  • Fixed Report window Title not showing on initial save of report in designer.
  • Fixed odd random Nil Object Exceptions when updating from the property list.
  • Fixed the WindowMenu class to work with multiple menu bars used in the project.
  • Fixed issues with the IsFunction property when generating reports.

Views are Your Friend

One of the challenges I see regularly in my work as a database administrator is finding a way to bridge the gap between the well-normalized physical implementation of a database behind an application and providing a way to make the data available in an easy-to-use (and understand) fashion for the end user.  For many clients this means letting them design their own reports.  Database views are my go-to method for making a complex database structure easy to use for end-users and even developers.

Views have a number of advantages.  For one, they are available in all SQL databases, including SQLite.  Views allow you to reduce the complexity of the end user experience by managing and limiting the data presented.  This might mean taking a very complex query joining multiple tables and presenting it in a single table with the end user (or developer) not needing to know the gory details of the SQL behind it.

This last point is important for the developers too.  Having the programmers figure out the complex joins for a query pulling from multiple tables is sometimes challenging and not always a good use of their time.  Having the Xojo application do all that work for a complex query is sometimes painfully slow.  Views not only speed up the development process but make the Xojo application more efficient since the database has already created the view and optimized it internally.

Views are more secure since you can limit the data shown and control who has the rights to view it.  By giving users and developers access to the underlying tables you may be exposing sensitive data.  Views are an easy way of sanitizing data.  We use views as read-only constructs so the user cannot update the data (note:  not all databases treat views as read-only).

Views can be created, modified and deleted via simple SQL statements.  The syntax of the statements (in particular for modifying views) varies a bit from database to database but the details can be easily found.  To create a view, the syntax is:

    CREATE VIEW viewname AS

SELECT (fill in your query here)

We recently used views implementing a large customer records management (CRM) system for an insurance broker.  Their database has around 100 tables containing information on customers, policies, related products, agent and commission data.  The data is normalized and it isn’t always straightforward to get related data.  The client does not have a dedicated IT staff and reporting is the primary responsibility of a part-time administrative employee, “Jane”.

Our goal was to provide Jane with the easiest means possible to write any report that was requested by management.  While Jane has some knowledge of databases and foreign keys, she isn’t technical and doesn’t have any training on the SQL language.

Our answer was to use our desktop reporting tool, BKeeney Shorts, customized to only show her views created solely for reporting.  (We did this via a simple naming standard in the database.)  She is presented with options such as:  Agent Commission, Prospect Contact and Client Policy Details.  If she needs an additional view, it’s easy to add it to the database and not impact the Xojo code behind the application. (It doesn’t require a recompile and redeployment of the software).

The view incorporates the calculations behind the data, so the reports are always consistent in terms of things such as how commission checks are calculated or who is the primary agent for an account.  By using views we ensure that consistent results are shown to the end user even if someone else is assigned to write reports

Views provide a level of abstraction between the database and the end user and we find  them very useful.  For the developers, it means they don’t have to figure out the complex queries and have the Xojo application create inefficient and complex queries.  Views are your friend!

Shorts Report Designer 1.6.2

pens128BKeeney Software is proud to announce Version 1.6.2 of BKS Shorts with Report Designer, our reporting classes and tool for Xojo.  Shorts allows you to integrate a report designer into your own Xojo desktop application.  Desktop and Web applications can generate reports.  Both versions can export to PDF if they have the MonkeyBread DynaPDF plugin.

This is a free update to all existing users.  This version fixes a couple of important bugs and is recommended for all users.  In this version we also added a CSV Renderer that allows you to export your reports to CSV in addition to HTML and PDF.

Product Home Page:  http://www.bkeeney.com/allproducts/bkeeney-shorts/

New:

  • Added a CSV Renderer that can export reports to CSV format ignoring page headers and footers.  (Note: CSV Export isn’t perfect. We’re just taking the text and putting it in a file.)
  • Added CSV Export into the File->Export Menu to give example.
  • Added Chinook Invoice Database Example.
  • Added ability to get exception messages back from the Report Thread.

Changes:

  • Tightened up the spacing in the dynamic DateTime container.
  • Did some prep work in the Designer and in ReportPF to allow fields in the header in a future release.

Bug Fixes:

  • Fixed Formatting of page numbers so it can go up to 4 digits.
  • Fixed loading of Schema and Views in the report viewer.
  • When opening a report the view switches automatically to the Design View.
  • Fixed an issue where adding ? to the Filter Data (thus making it a dynamic runtime variable) would not get saved without unchecking and checking the dynamic checkbox in the list.
  • Fixed issue with Lines line staying put in proper location in the Designer.
  • Fixed issue where adding a Field in the Header of the report would cause what appeared to be an infinite loop (really was an exception in the thread). Now it will finish the report.

Shorts Report Designer 1.6.1

pens128BKeeney Software is proud to announce Version 1.6.1 of BKS Shorts with Report Designer, our reporting classes and tool for Xojo.  Shorts allows you to integrate a report designer into your own Xojo desktop application.  Desktop and Web applications can generate reports.  Both versions can export to PDF if they have the MonkeyBread DynaPDF plugin.

This is a free update to all existing users.  This version is mostly a bug fix release and is recommended for all users.

Change List:

  • The Footer Constants can now also be used in the header
  • Refactored DesignCanvas and ReportPF and moved some of that code into PAF_DatabaseKit.DBWrapper where it makes more sense
  • Loading a report into the designer, or for rendering, will no longer re-read the schema and overwrite any manually created relationships
  • Added Tables and Views section into the report definition file
  • Fixed an issue with report width/height not being remembered correctly. Changed from using PrinterSetup string which is not cross platform safe to use the dimentions instead.
    • YOU NEED TO RESAVE YOUR REPORTS TO TAKE ADVANTAGE OF CHANGE
  • Fixed issue where landscape reports weren’t being exported properly to HTML and PDF.
  • Added breaks in the PreparedStatement creation to help in debugging.
  • Added some missing field handling to ODBC
  • DBWrapper will no longer create a missing SQLite Database.
  • Fixed UI in winDBRelations

Shorts Report Designer Release 1.6.0

pens128

BKeeney Software is proud to announce Version 1.6.0 of BKS Shorts with Report Designer, our reporting classes and tool for Xojo.  Shorts allows you to integrate a report designer into your own Xojo desktop application.  Desktop and Web applications can generate reports.  Both versions can export to PDF if they have the MonkeyBread DynaPDF plugin.

This is a recommended update for all registered users and is a free upgrade.  Besides a number of important bug fixes there are also some big new features

Runtime DateTimeThe first is the ability to ask the user for runtime parameters for a query.  For example, if you created a report based on a fiscal year you can now ask the user which fiscal year they want.  The dynamic runtime query lets you ask the user for a number of different things.  Strings, numbers, user supplied lists, and even a list based on a database query are possible.
Drilldown EventThe second thing we added is the ability to get an event back from the generated report on what row was clicked.  This event gives you the information for all objects in that row so you could implement a drill-down report.  Along with this event we now allow invisible objects to be created to provide additional information.

Our product page is at http://www.bkeeney.com/allproducts/bkeeney-shorts/

Full change list:

• Dynamic Runtime Query variables. Allows the report designer to ask the user what values they want at runtime. Current paramters types::
– Boolean value using a Checkbox
– String value
– Numeric (integer and double values)
– User List (popup)
– Query List (popup)
– Date, DateTime, or Time

• Moving items via the mouse will immediately update the save status on the Toolbar

• Changing Filter Data will update the save status and undo status

• Undo now works for changing of filter data.

• Added Filter Data to report designer Toolbar

• Added an ObjectSelected event on the BKS_ShortsBaseViewer that will pass back the clicked BKS_Shorts.Item and if there is one, the BKS_Shorts.GroupItem. This will allow you to implement a drill down report.

• Invisible TextItems are rendered in the background color to allow the MouseHit to bring back additional information in the group

• Added a FieldName property to BKS_Shorts.Item and reports run through the Report Designer will fill that in at generation time. This allows the user to query what the field (if there is one) from the selected item.

• Added OK/Cancel generic container for all dialogs

• Bug Fix [Windows Only]: Now respect the number of copies specified for a print. Note that this is not in Shorts classes itself but how the supporting code prints.

• Bug Fix: Fixed another instance where it was possible to NOT have a Default Style when generating a report.

• Improved German localizations.

• Moved About Shorts Designer Menu Item out of winReportDesigner

• Bands that are marked as invisible no longer get rendered on the report.
Known Limitations:
• Dynamic Queries do not work with IN clause in where statements.

Shorts Report Designer Release 1.5.4

pens128We released version 1.5.4 of the Report Designer today.  One of the bigger changes is it ships with a web example of how to take a report definition and display it for a web app.  This affects a significant amount of methods and properties throughout the project to make them work on desktop and web but seems to work well.

BKeeney Shorts (with report designer) is 100% Xojo code (DynaPDF Starter kit required to export to PDF) and comes with a drop in Report Designer and Report Viewer component for both desktop and web apps.

For purchasing information please visit http://www.bkeeney.com/allproducts/bkeeney-shorts/

Version 1.5.4 change list:

  • Major code changes to allow most classes to work in web apps too.
    • Simply copy BKS_Shorts_ReportDesigner folder into your existing web project.
    • Delete PAF_PrintKit.DesignCanvas (desktop ScrollCanvas subclass)
    • Create a new PAF_PrintKit.DesignCanvas that is a WebCanvas subclass
  • Changing text values in the Properties List is now Case Sensitive
  • Added Portugese Localization
  • Added a commented out example of how to connect to MySQL without using the winDBConnection Window.
    • See winRPTViewer.Display
  • Fixed an issue that would cause the SQL statement to not be saved properly in the JSON string
  • Added a Default Style if none is in the local dictionary
  • How reports are saved so they can be viewed without first having to be in the designer
    • WARNING! YOU WILL NEED TO RESAVE ALL OF YOUR REPORTS
  • Cleaned up some localizations and made some more strings dynamic.
  • Made the Report Designer the default pushbutton in Demo Window
  • New Report opens a new Report Designer Window instead of copying the current connection. (this affected menu handlers in odd ways one wouldn’t expect)
  • Created a Web Example

Shorts Report Designer 1.5.3

We released version 1.5.3 of BKS Shorts today.  A number of bug fixes, changes, and additions were added.  The change list below.

I will be the showing off Shorts at the next Xojo webinar on February 2nd at at 1:00 PM (GMT-5:00) Eastern Time (US and Canada).   Signup at https://zoom.us/webinar/register/7a19681a9a0c3f5f7c24e00bf0acd2b8

One of the new items is the ability to show a Row Number on any band using the new SC_GetCount XojoScript.  Add this to any Band Script to modify a TextItem.

We added a couple of new examples based on user feedback.  The first is using the SC_GetCount Band Script to set row numbers.  The second, is an example of how to print directly to a printer without having to go through the viewer.

Change List:

  • Added SC_GetCount in the Band XojoScript editor. This lets you get how many times this band has been shown.  Example of use is to have line numbers on your report without having to do it in SQL.
  • Updated German localization
  • Rearranged UI on ccPAF_Filter (Filter Data) to make it a bit more obvious
  • As a Text Item or Field Item are put on a report it will automatically use the “Default Style”
  • Fixed an issue where the Default Style wasn’t getting passed to the generated report.
  • The Styles Editor now allows you to delete multiple Styles at a time.
  • Added a new example of how to print directly to printer without having to use the viewer.
  • Reconfigured Demo window to break between Report Designer stuff and older code-only stuff.
  • Added SC_GetCount Demo
  • Fixed some items in the HTML Renderer
  • In PAF_PrintKit.PrintText.constructor if there is no DefaultStyle we create one.
  • ReportPF will now extract Styles from the report definition file.

BKS Shorts with the Report Designer is $300 and you get the full source code.  More information can be found at http://www.bkeeney.com/allproducts/bkeeney-shorts/

 

BKS Shorts Report Designer

picAppIcon256BKeeney Software is pleased to announce version 1.5 of BKeeney Shorts, our reporting classes for Xojo.  This free update for Short Professional users is a major update to the tool and includes a set of classes that allow developers to embed a report designer into their Xojo applications.

Since its release in 2013 BKeeney Shorts has been used by Xojo programmers around the world to create complex reports using nothing but Xojo code.  The number one request from users was to have an external reporting tool that let them create reports quickly and easily without the need to code the entire report.  With the Report Designer we’ve removed the need to code all but the most complex of reports:  most reports can be created in minutes instead of hours.

Gems Report Designer

Included in the BKS Shorts demo project is a fully functioning Report Designer.  Developers can copy and paste the Xojo code into their own project and integrate the Designer in just a few minutes.

Reports are saved in a simple JSON string that allows the developer to have reports defined outside of their project.  The Demo project saves a report file but a Xojo programmer can easily save them as strings for use in their own document or database.

Reports Bands can run XojoScript code to do complex runtime actions such as change text, styles, concatenate text, show images and much more.  This allows end-user changes in a report without the developer coding it up front and having to recompile the executable.

Gems Report Rendered

BKeeney Shorts Professional costs $300 and comes with full, 100% unencrypted source code.  To export to PDF (without a watermark) a separate purchase of the MonkeyBread DynaPDF Starter plugin is required.  This is a free update to existing Shorts Professional users and a $75 update to existing Shorts Standard Users.

BKeeney Shorts requires Xojo 2014 R3 or better.

Homepage:  http://www.bkeeney.com/allproducts/bkeeney-shorts/

Video of Report Designer in Action:  http://www.bkeeney.com/allproducts/bkeeney-shorts/shorts-designer-in-action/

Video of Integrating the Report Designer:  http://www.bkeeney.com/allproducts/bkeeney-shorts/integrating-shorts-report-designer/

For questions regarding BKS Shorts, please contact Bob Keeney at support@bkeeney.com

The First Law of Demos

It’s the last full week before the Xojo Developer Conference in Austin.  I’ve gone through my presentation on Reporting Tools in Xojo at least once already.  I have the Keynote presentation done (added a few things), have the sample projects done and ready to upload to the website.  You’d think I’d be done, right?  Wrong!

The First Law of Demo’s says that unless you’ve done the demo multiple times on the hardware you’ll actually use it’s as if you’ve never done it in the first place.  I should know, I’ve been standing in front of a group of people to do a demo only to have the first element fail and then flounder away for the next twenty minutes with plenty of, “well, if this worked I’d be able to show you this feature.”

I have learned from my mistakes, the hard way.  Several times.  Here are Bob’s rules of effective demo’s.

Rule #1:  Disconnect from your normal network/regular computer

There are things floating around on your drive that you tend to use all the time.  So when you take your development project off your home network, or move to a separate machine, you’ll quickly find the things that you forgot include in your demo packages.

In my case, I discovered that a Xojo project had references to graphic files that weren’t included in the folder I moved to the presentation machine.  The graphics weren’t necessary and it was easy to fix but how embarrassing to be in front of your peers to have a simple error like that occur.  It shows a lack of preparation.

Rule #2:  Run all of your Demo’s in the latest version of the software

This sounds silly, I know, but I found that one of the reporting tools I’m talking about in my session doesn’t work with Xojo 2015 R1 and R2.  For whatever reason I was using 2014 when I first created the project and didn’t run into the problem until I started working with it on the laptop which had the latest version of Xojo.

Another reporting tool I’m talking about in my session had to have a number of libraries installed to work properly.  And then it needed a newer version of its plugin.  These issues were not very hard to fix when I have reliable internet access and access to all my files, but once you’re away from home that’s not always the case.  Again, if this happens in a presentation it looks like you have not prepared.

Rule #3:  Practice saying your presentation out loud  

Speaking your presentation is important in a number of ways.  First, it will show you where you have not prepared enough.  If you find yourself um’ing and ah’ing in a particular session that’s an area to do again (and again).  Since you can think faster than you’re speaking you’ll often find yourself saying “I need to mention this.”  Having this happen during your actual presentation is a bad time.  Practicing beforehand will show you these problems.  Practice multiple times to catch even more of them.

I’m a good writer (I’m sure that’s open for debate) and I have my ‘inner voice’ that talks to me when I’m reading something.  That’s not good enough when practicing for a presentation because your inner voice lacks depth.  It lacks the pauses and breaths that you need when speaking.  Practice your presentation as if there are people in the room.  Pause for effect.  Pause for eye contact.  And in technical presentations pause for people to wrap their head around the idea.  Silence is good in a technical presentation and that pause is never as long as you think it is.

A lot of people have a fear of public speaking.  I can’t say was overly enthused about the subject a few years ago either.  I decided to tackle that fear and enrolled in a local chapter of Toastmasters (TM).  At this point I have achieved the Competent Communicator award and feel more comfortable speaking in a crowd.  Frankly, after two years of TM it’s hard not to evaluate all speakers and count their use of um’s and ah’s.  Toastmasters is a safe and friendly environment to learn how to speak in public.

Rule #4:  Practice, Practice, Practice

This seems intuitive but I’ve seen it happen to myself and others way too often.  The more you can practice your presentation, out loud, the better off you’ll be.  I can’t remember which Toastmaster’s speech I was giving but I didn’t have the same preparation as I normally did and it showed.  My use of fillers words was awful, I fidgeted a lot more, and I was uncomfortable with the topic, and I had to use my notes more often than I wanted.  I did okay but it was not my best speech.

Steve Jobs was known for his awesome keynote speeches where he introduced new, sometimes buggy, products to the world.  He practiced, on stage, with the actual product hundreds of times until everything seemed magical and when something didn’t go as planned he could make joke of it and move on (and use the backup device).  That last bit is very hard, but if you’ve practiced your presentation to the point where you’re dreaming of it you should do okay if things go awry.

Rule #5:  Relax

I can’t say I’ve ever been to a technical presentation where the audience was hostile to the speaker.  We usually have a choice on what sessions to attend and we are there to learn something new and hopefully be entertained.  The audience is pulling for you!  When you make a mistake during your presentation know that we’ve been there and had the same thing happen to us.

Toastmasters has another fine tradition of telling a joke to start off their meetings.  It makes everyone relax a bit and if the joke, even an awful joke, can get a chuckle or two it’s a great way to start a presentation.  If you can do a joke somehow related to the topic you’re even better!  One word of caution on jokes, though, unless you’ve practiced the heck out of telling this joke don’t bother!  The timing of joke is everything and unless you’re are comfortable with it don’t screw it up (unless you’re comfortable enough to botch the joke and recover from it and make everyone laugh anyway).

So that’s it.  I have a lot of work to do before the conference next week.  I have to practice some more and when I get tired of talking about it I’ll do it again once or twice.

Hope to see you at the conference.  Please stop me and introduce yourself.  I really enjoy meeting my fellow Xojo developers.