Charts

Labels
AJAX(112) App Studio(9) 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(178) 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(184) 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(3) 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
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.
  • Monday, January 24, 2011PrintSubscribe
    Chart View

    Code On Time applications now offer a new type of data rendering – “Chart” view. Chart view is just another way of presenting a set of data records retrieved from the database. Chart view supports many end-user features including sorting and adaptive filtering.

    image

    Creating a Chart View

    Generate a new web application from the Northwind database.  Browse the generated web site and select Reports | Sales by Category menu option. The following data view will be displayed. Columns CategoryID, Category Name, Product Name, and Product Sales are visible in the grid view.

    image

    The data controller is based on the database view dbo.[Sales by Category]. This view is a part of the Northwind database and is defined as follows.

    create view [dbo].[Sales by Category] AS
    SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductName, 
        Sum("Order Details Extended".ExtendedPrice) AS ProductSales
    FROM     Categories INNER JOIN 
            (Products INNER JOIN 
                (Orders INNER JOIN "Order Details Extended" ON 
                   Orders.OrderID = "Order Details Extended".OrderID) 
            ON Products.ProductID = "Order Details Extended".ProductID) 
        ON Categories.CategoryID = Products.CategoryID
    WHERE Orders.OrderDate BETWEEN '19970101' And '19971231'
    GROUP BY Categories.CategoryID, Categories.CategoryName, Products.ProductName

    Start the code generator, select the project name, and click Design button.

    Select the data controller SalesbyCategory and click on Views tab.

    Add a new view, set its Id to chart1, select Chart as view type, and select command1 as command.

    Set label to Sales Chart.

    Enter “Total sales by product category.”  in the header text.

    Save the view and click on its name in the list of available data controller views, select Data Fields tab.

    Add new data field with the field name set to CategoryName. Set its Chart property under Miscellaneous section to X. Save the field.

    Add another data field with the field name set to ProductSales. Enter letter “c” without double quotes into Data Format String. Set the Aggregate Function property of the data field to Sum. Set its Chart property to Bar (Cylinder).

    The list of data views in Designer will look as follows.

    image

    Exit the Designer and generate your application. Activate the same page and select Sales Chart option in the view selector in the right hand corner of the action bar. The following chart will be displayed.

    image

    Activate the filter in the view selector and select “Filter…”  item in the popup menu of the Category Name option.

    image

    Select several filter options to review subset of data presented in the chart.

    image

    Displaying Multiple Values

    The chart view is capable of displaying multiple data series. Let’s add a calculated field to the same data controller to simulate the “Previous Product Sales”.

    Select the data controller in Designer and activate Fields tab.

    Add a new field with name PreviousProductSales, indicate that the field value is calculated by SQL formula and enter the following SQL formula

    cast(ProductSales * Rand() as Numeric(10,2))

    into SQL Formula text box.

    Set the label of the field to “Previous Product Sales”.  Set its Data Format String to “c” without quotes.

    Save the field and select Views tab. Select chart1 in the list of available views.

    Bind the new field to the chart1 view and set its properties to make them look as shown in the screenshot. Notice that we are using a different Chart type Column(Cylinder) for ProductSales.

    image

    Run the generated application. The following chart view will be presented if you activate Sales Chart in the view selector. The actual spline that you will see may look different due to randomization factor of the formula that we have specified to simulate the previous sales.

    image

    Legend

    You can activate a legend if you select the chart view in Designer and mark the check box “Enable legend in the chart area”. The data field header will be used as the text displayed in the chart legend.

    image

    Custom charts

    Chart views are based on the standard Microsoft Data Visualization component included with ASP.NET 4.0. Unlimited customization options are available to developers. You can quickly customize a chart view if you select “Custom” as Chart property of the data field.

    All charts are generated as ASP.NET user controls stored in ~/Controls folder of your web application. For example, the name of the chart in this sample is ~/Controls/Chart_SalesbyCategory_chart1.ascx. The name of a chart user control always starts with Chart and includes the name of the data controller and the chart view ID.

    “Custom” charts are generated once only. If a “Custom” chart exists then the code generator will not make an attempt to generate the chart again. You can safely modified hundreds of the chart control properties.

    What’s Next

    The upcoming updates of the code generation library will include support for Filter Groups on the view level to allow transitioning of grid view data filters applied to a selected chart view and vice versa. Additional chart types will also be supported. We are also working on bring interactive features of the chart such as tool tips and hyperlinks into the code generation library.

    Continue to Charting Preview