Charts

Labels
AJAX(112) App Studio(7) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(177) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(9) OAuth Scopes(1) OAuth2(13) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(11) PKCE(2) Postgre SQL(1) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(183) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(81) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) SSO(1) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(2) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
Charts
Sunday, March 18, 2012PrintSubscribe
Configuring a Chart in Web Site Factory Project

Charts are great at telling a story when numbers fail to impress. Ad hoc charts can be created by end users of your web application. You can also incorporate a chart that requires no effort on the user part.

Activate the Project Designer and choose Controllers tab. Add a new view to the Orders data controller.

Adding a new view to 'Orders' data controller

Enter the following properties in the view properties.

Property Value
Id chart1
Type Chart
Command command1
Label Sales Chart
Header Text Sales of orders by quarter

Click OK button to save the new view.

Right-click the new view chart1 and choose New Data Field option.
 
'New Data Field' option in the context menu of the data controller view

Set Field Name property of the new data field to OrderID and click OK button to save the new field.

Repeat this procedure one more time and add OrderDate data field to the view.

Right-click the node Orders / Views / chart1 and choose Show All Data Fields option.

'Show All Data Fields' option in the context menu of the data controller view

Note that the right-most column Chart shows the value of None for both fields.

Data fields of a chart view in Project Designer

Change the properties of both data fields as follows.

Data Field Property Value
OrderID Chart Bar (Cylinder)
OrderID Σ (Aggregate) Count
OrderDate Chart X, Quarters
OrderDate Format MMM yy

These property values will result in chart presenting a breakdown of order count by order date quarters.

Chart view data fields configured to display a total count of orders broken down by order date quarters

Click Browse button on the designer toolbar to the open the application in your default web browser.

Navigate to Orders page and select Sales Chart option form the view selector.

View selector displayed in a web application created with Code On Time

The chart view will be displayed in the main area of the data view on the page.

Chart view in a master data view of a Code On Time web application

Navigate to the Customers page, select  a customer, and choose Sales Chart option in the view selector of the child view on the tab Orders. The chart view of orders linked to the selected customer will be rendered.

Chart view in a child data view of a Code On Time web application

Let’s say you want to have this chart view on the application home page.

Activate Pages tab on the Project Explorer and select the node Home / container2. Right-click the node and choose New Data View option from the context menu.

'New Data View' option in the context menu of a container in Project Explorer

Set Controller property to Orders, set View property to chart1.

Select the Show Pager option. Unselect all other check boxes under Presentation.

Click OK to save the new data view.

Click Browse button on the designer tool bar. The application home page will load with the chart displayed at the bottom of the second container.

Chart data view displayed on the home page of an application created with Code On Time

Sunday, March 18, 2012PrintSubscribe
Export to Spreadsheet

Code On Time web applications offer the Export to Spreadsheet action. The feature is available in all grid views of your application by default.

'Export to Spreadsheet' action in Code On Time web applications

Select this option and you will be prompted to download a file. The following screen shot shows the prompt displayed by Internet Explorer 9 at the bottom of the web browser window.

Prompt displayed in IE9 in response to 'Export to Spreadsheet' action in Code On Time web application

The file has the “*.iqy” extension. This file format is recognized and supported by Microsoft Excel.

If you save the file to the hard drive and open it in the Notepad then you will see a cryptic-looking URL that points to your web application.

If you choose Open option instead then Microsoft Excel will start if you have it installed on your computer. You will see a prompt similar to the one in the next picture.

The prompt to download '*.iqy' file displayed by Microsoft Excel

Microsoft Excel wants to let you know that it is going to download the content, which is not located on your computer. You have to authorize that by clicking on Enable button. Nothing dangerous is coming your way. The content is an XML file produced by your application in response to the URL in the “*.iqy” file.

XML content produced in response to the URL specified in '*.iqy' file

Click Enable and you will see the prompt shown next.

This time Microsoft Excel contacts your web application. Your application needs to know the identity of the user and requests this information from Excel. That is why you are seeing the prompt.

The prompt to enter the application user id/password displayed in response to 'Export to Spreadsheet' action in Code On Time web application

Enter the identity of the user registered in the membership database. For example,enter admin/admin123% or user/user123% – these are two default users accounts created automatically in the baseline application.

Click OK button and you will see the data from your web application display in Microsoft Excel.

Application data exported to Microsoft Excel

Select Insert tab on the ribbon and choose to insert the PivotTable.

'Insert PivotTable' option in Microsoft Excel

Dialog Create PivotTable is displayed.

'Create PivotTable' dialog in Microsoft Excel

Click OK to insert a new sheet with the pivot table.

Empty pivot table created in Microsoft Excel

The pivot table PivotTable1 is empty. Notice the list of fields on the right-hand side of the window. All visible fields from the Orders screen are listed there.

Drag Customer Company Name field to the “Values” box and you will see the total number of orders in the database.

Total number of orders in the application database

Drag Employee Last Name to the “Row Labels” box and you will see that the most product employee is Ms. Peacock. She has placed 156 orders.

The most productive employee in the pivot table

Drag Ship Via Company Name field to “Column Labels” box and you will see the breakdown of orders by employees and shippers delivering the goods to customers.

Breakdown of orders by employees and shipping companies

Numbers don’t always tell the story.

Choose PivotChart item on the right-hand side of the Options ribbon. Select 3-D Cylinder chart and click OK button.

'Insert Chart' dialog in Microsoft Excel

We can now clearly see that Ms. Peacock is heavily utilizing the shipping company United Package. If this is the most expensive shipping option then we should call Ms. Peacock and advise to switch to another freight operator. If this this is the least expensive option then a bonus is due in recognition of an employee thinking about the business bottom line.

Ms. Peacock is heavily utilizing the shipping company 'United Package'

You can save this spreadsheet to the hard drive.  Open the spreadsheet a week a later and choose Data | Refresh All and you will be prompted to re-enter user name and password – the new data feed will be produced by your application and the charts and cross tables will automatically refresh.

'Data | Refresh All' option in Excel will contact your web application and retreive a fresh data set, which will result in updated charts and cross tables.

You web application created with Code On Time becomes an information hub of your company. Business users can do ad hoc data analysis with the tool they know best. The business decision makers don’t even need to sign in the web application to know what’s going on. Microsoft Excel charts and pivot table swill let them know everything they need.

Tuesday, August 23, 2011PrintSubscribe
Enhanced Charts, Sample Databases

New release of Code On Time web app generator includes a collection of bug fixes and enhancements.

  • Chart support was enhanced to allow X axes with grouping for data fields of type Date and DateTime. For example, create an ASP.NET 4.0 project with the sample  Northwind database and activate Project Designer. Find Orders data controller on All Controllers tab and create a new view of type Chart. Configure the data fields of the chart as shown in the picture.
     
    image
     
    Generate the sample app and activate the new view. You will see a chart of orders groups by quarter. You can now print the chart by clicking on  print icon in the pager area of the chart view.
     
    image
     
  • It is now possible to create a database straight from the web app generator database connection configuration string.
     
    image
     
  • Sample databases are support for MS SQL Server. For example, you can create Northwind sample with just a few clicks.

    image
     
  • User interface of the Project Wizard has been changed to present Business Logic Layer, Membership and Authentication, and Features pages as tabbed views.
     
  • URL Hashing is the new EASE feature available in Unlimited edition. The purpose of this feature is to encrypt any hyperlinks produced by Navigate action, Hyperlink Format String, and History. URL Hashing will also ensure that any attempts to specify URL parameters other than _link or ReturnUrl  will result in Access Denied message. This allows to provide assurance that only authorized commands are passed to the application. The tutorial will be available shortly. 
     
  • New projects will not be trying to treat table/view names with “_” in them as the source of grouping schema. This property can be enabled on Features page if needed. Most developers will not want this feature to be enabled.
     
  • Repeating patterns of words in labels of the baseline app are now detected. The code generator will reduce any patters with up to four words.
     
  • The issue with master detail navigation and switching between grid and form views has been resolved. 
     
  • Multiple selection in grid views with a single primary key will affect Report and Actions items on the action bar. Only selected records are included in the output of reports and export actions if a multi-row selection is detected.
     
  • SQL Server’s hierarchyid and geography fields are now correctly processed. It is now possible to create an application from Adventure Works 2008 R2 without any errors.
     
  • The bug with "View Details" arrow in Project Designer views has been fixed.
     
  • Check Box List now fully supports context fields, which allows implementing cascading dependencies on many-to-many fields.
     
  • Memory management in the code generator has been improved to further increase the speed of code generation. The benefits will be visible in Premium and Unlimited editions on quad-core machines.
     
  • Hyperlink Format String with lookups is working correctly with NULL values when Relationship Explorer or URL Hashing is enabled.
     
  • Rendering of an automatic report from the view with multiple image fields will result in a correctly generated report.
  • Continue to Chart View