Charts as Trend Displays in Access. (1 Viewer)

Status
Not open for further replies.

ChrisO

Registered User.
Local time
Today, 12:03
Joined
Apr 30, 2003
Messages
3,202
G’day all.

Here is a demo that has two charts, kW hours and power factor as the Y-axis, both on the same time X-axis.
There is also a detail chart for the kW hours/power factor that can be viewed by dragging the time axis for each of the major charts.
The detail chart dynamically resizes on each axis depending of the source chart. (KW or PF)

Two reports have been included. The report with the detail chart also calculates DMin, DMax and DAvg for all three charts. These arguments are passed and Eval(uated) by the called procedure. Further math arguments could be passed but that’s up to you because I don’t know ahead of time just what math functions would be required. (Please be careful if you modify the Public Function GetChartValue(). The syntax is not straightforward nor is it commented.)

The sample data is set on database open and will display data starting today and for 4 days.

The data set is random for both kW hours and Power Factor between limits as set for each (therefore it’s not totally random but usable). There is also a simulation of power outage within the data set where it flat lines. An error is included in the flat line power outage to simulate measurement inaccuracies for both kW’s and Power Factor.

Also included is a method to…
1. Round the border corners of objects in reports. It is a consequence of doing so that the border style and back style must be transparent. The procedure will do that for you. The radius and colour can be passed but will default to set values if you don’t.
2. Show a progress meter actually based on data set size and step valve.
3. The ability to roll up a form on closure with step size and delay. (The splash screen in this case.)
4. Totally late bind everything. That means record sets, stored query SQL definitions and everything else.

Written in A97 but also tested in A2K and A2K3. Also tested at 1024 x 768 and 1280 x 1024…all seems well so far.
(Best displayed at 1024 x 768)

Sorry, but it’s mostly 'meat' (code) and not too much 'green gravy' (comments) so please move the mouse over various sections and control tip text should explain the function. If not then simply experiment.

Thanks to all that have tested it, Danny Seager, Adam Taylor and Doug.
Special thanks to Rob Richards and John Mishefske for the feedback. (All from UtterAccess.)
BTW, if you don’t like code you’re possibly in the wrong business. ;) )

Edited to add new download. (Version 9.1)

There were so many bugs, all due to Regional settings, that a redesign was required.
All Date/Time fields have been converted to straight Double storage and calculations.
This should also allow for time resolutions finer than one second.
All Regional settings that use the comma as a decimal separator should now work.
A few comments, where relevant at this stage, have been added.
Only requirement is that you run at least 1024x768 screen resolution.
Still totally late bound so should convert to any version of Access, A2K7 not tested.

I can’t test it in any non-English version of Access so it would be much appreciated if anyone can post failures they might receive.


As always, have fun and regards,
Chris.
 

Attachments

  • KWHoursForPostingA97.zip
    214.3 KB · Views: 2,935
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom