Tornado Demo - Advanced Master with embedded Charting Details
Can you image you can do this with 57 lines of code without knowing too much about ASP?

IDCustomerOrders
ALFKI Alfreds Futterkiste
Obere Str. 57
Berlin, 12209

Maria Anders
Obere Str. 57
030-0074321

IDOrderedRequiredShipped
1070211/13/9512/25/9511/21/95
1083502/15/9603/14/9602/21/96
1095204/15/9605/27/9604/23/96
1101105/09/9606/06/9605/13/96
ANATR Ana Trujillo Emparedados y helados
Avda. de la Constitución 2222
México D.F., 05021

Ana Trujillo
Avda. de la Constitución 2222
(5) 555-4729

IDOrderedRequiredShipped
1062509/08/9510/06/9509/14/95
1075912/29/9501/26/9601/12/96
1092604/03/9605/01/9604/10/96
ANTON Antonio Moreno Taquería
Mataderos 2312
México D.F., 05023

Antonio Moreno
Mataderos 2312
(5) 555-3932

IDOrderedRequiredShipped
1050705/16/9506/13/9505/23/95
1053506/13/9507/11/9506/21/95
1057307/20/9508/17/9507/21/95
1064309/25/9510/23/9510/03/95
1067710/23/9511/20/9510/27/95
1068210/26/9511/23/9511/01/95
1085602/28/9603/27/9603/12/96
AROUT Around the Horn
120 Hanover Sq.
London, WA1 1DP

Thomas Hardy
120 Hanover Sq.
(171) 555-7788

IDOrderedRequiredShipped
1045303/24/9504/21/9503/29/95
1055807/05/9508/02/9507/11/95
1070711/16/9511/30/9511/23/95
1074112/15/9512/29/9512/19/95
1074312/18/9501/15/9612/22/95
1076801/08/9602/05/9601/15/96
1079301/24/9602/21/9602/08/96
1086403/04/9604/01/9603/11/96
1092004/02/9604/30/9604/08/96
1095304/15/9604/29/9604/24/96
1101605/10/9606/07/9605/13/96
BERGS Berglunds snabbköp
Berguvsvägen 8
Luleå, S-958 22

Christina Berglund
Berguvsvägen 8
0921-12 34 65

IDOrderedRequiredShipped
1044403/15/9504/12/9503/24/95
1044503/16/9504/13/9503/23/95
1052406/01/9506/29/9506/07/95
1057207/19/9508/16/9507/26/95
1062609/11/9510/09/9509/20/95
1065410/03/9510/31/9510/12/95
1067210/18/9511/01/9510/27/95
1068911/01/9511/29/9511/07/95
1073312/08/9501/05/9612/11/95
1077801/16/9602/13/9601/24/96
1083702/16/9603/15/9602/23/96
1085702/28/9603/27/9603/08/96
1086603/05/9604/02/9603/14/96
1087503/08/9604/05/9604/02/96
1092404/03/9605/01/9605/08/96

bottom next goreload

[1 - 5 : 91]

Advanced Embedded Drill Down
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
  Dim myself = Request.ServerVariables("SCRIPT_NAME")
  If Request.QueryString("details") = "" Then
  Dim pop As String = "<A HREF='" & myself & "?Details=#0#' Target='Details' onClick=""window.open('','Details', 'width=500, height=500, left=400, top=400, directories=no, menubar=no, toolbar=no, status=no, resizable=yes')"">#0#</A>"
  Dim E63 As New tornado.z()
  With E63
    .dbQP = "U=60| S=USA| M=G| D=Nwind| GDF=CustomerID,CompanyName,ContactName"
    .dbEmbeddedGridMagicCell = "(;![]#|~/+{})fi=OrderID|mac=" & pop
    .dbGridMagicCell = "(;![]#|~/+{})field=CompanyName|macro=#1#<br>#4#<br>#5#, #7#<p>#2#<br>#4#<br>#9#! field=ContactName|Macro=SQL:SELECT OrderID,OrderDate,RequiredDate,ShippedDate from orders where customerID= '#0#'"
    .dbNameMap = "field=CustomerID|alias=ID,field=CompanyName|alias=Customer,field=ContactName|alias=Orders"
    .dbEmbeddedGridNameMap = "field=OrderID|alias=ID,field=OrderDate|alias=Ordered,field=RequiredDate|alias=Required,field=ShippedDate|alias=Shipped"
    .dbSQL = "SELECT CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode, Country,Phone,Fax FROM Customers"
    .dbTextHolder = "Title=Tornado Demo - Advanced Master with embedded Charting Details|subtitle=Can you image you can do this with 57 lines of code without knowing too much about ASP?"
    .ASPdbNET()
  End With
  Else
  Dim ID As String = Request.QueryString("Details")
  Dim E61 As New tornado.z()
  With E61
    .dbQP = "U=61| S=tyairgate!bgpic=pagebg2.gif| M=GC| PS=-1| Ni=None| D=Nwind.mdb"
    .dbGridMagicCell = "field=0|tag=align=middle,field=2|tag=align=right,field=4|tag=align=right,field=SubTotal|tag=align=right|macro=#SubTotal:currency#,field=Quantity|tag=align=right|macro=#quantity#"
    .dbCommonTables = "index=PID,PDesc|sql=Select ProductID,ProductName from Products"
    .dbLookUpFlds = "field=1|keyindex=PID|Lookupindex=PDesc"
    .dbSQL = "SELECT ProductId,ProductId as Description,UnitPrice,Quantity,Discount,UnitPrice*Quantity*(1 -Discount) as SubTotal from [order details] where OrderID=" & ID
    .dbAggregate = "(~^:)Fields=3^5|AggType=SUM|BottomTemp=<tr bgcolor=yellow align=right><td ColSPAN=3><b>Total </b></td><td>[[3:###,###]]<td><td Colspan=2 align=right>[[5:Currency]]</td>|CellFormat=Val"
    .dbTextHolder = "Title=Order Details for Order " & ID
    .dbPieChart = "Label=#1#| Value=#(5)#"
    .dbChartParams = "TitleString=Description vs SubTotal Spinning Plot"
    .dbGridTemplate = "<center>[[Grid]]<P>[[Chart]]</center>"
    .ASPdbNET()
  End With
  End If
End Sub
</script>

This advanced Master-Detail-Chart-Aggregate application can be a real killer i fyou d not have to right tools to do it. This example have both the Master and Slave in the same appplication.

Send comments on this topic.
Copyright (c) 1998-2006 ASP-db