Order Details for Order 10759

ProductIdDescriptionUnitPriceQuantityDiscountSubTotal
32 Mascarpone Fabioli 32 10 0 $320.00
Total 10$320.00

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