Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    aiuto fare opreazioni matematiche su più record

    buongiorno a tutti,

    devo compilare una tabella con i risultati di un contenuto di un sb + un numero

    ho fatto <% =(sviluppi.Fileds.Iten("BASE").value)+10 %>
    quindi mi scrive il risultato del valore del contenuto+10

    e qui ci siamo, però con solo il primo record, lo devo fare per tutti i record
    inseriti nella tabella come faccio?

    praticamente faccio una Select sulla tabella sviluppi e mi si crea una tabella
    con tutte le righe. Nelle altre tabelle devo fare i calcoli corrispondenti

    allego img che forse è meglio
    Immagini allegate Immagini allegate

  2. #2

    Re: aiuto fare opreazioni matematiche su più record

    Originariamente inviato da fabionet31
    ..
    ho fatto <% =(sviluppi.Fileds.Iten("BASE").value)+10 %>...
    credo sia item
    cmq pubblica il tuo codice

  3. #3
    questo codice funziona ma con la prima riga, sevo espandere tutta la tabella
    e fare i calcoli correlati:

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

    <%
    Dim ORDINI_ESPLOSI__MMColParam
    ORDINI_ESPLOSI__MMColParam = "FD30EZ MAGNETE STANDARD"
    If (Request("MM_EmptyValue") <> "") Then
    ORDINI_ESPLOSI__MMColParam = Request("MM_EmptyValue")
    End If
    %>
    <%
    Dim ORDINI_ESPLOSI
    Dim ORDINI_ESPLOSI_numRows

    Set ORDINI_ESPLOSI = Server.CreateObject("ADODB.Recordset")
    ORDINI_ESPLOSI.ActiveConnection = MM_SQL_PRODUZIONE_STRING
    ORDINI_ESPLOSI.Source = "SELECT * FROM dbo.ESPLOSI WHERE MODULO LIKE '%" + Replace(ORDINI_ESPLOSI__MMColParam, "'", "''") + "%'"
    ORDINI_ESPLOSI.CursorType = 0
    ORDINI_ESPLOSI.CursorLocation = 2
    ORDINI_ESPLOSI.LockType = 1
    ORDINI_ESPLOSI.Open()

    ORDINI_ESPLOSI_numRows = 0
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>GESTIONE PRODUZIONE</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    body {
    background-color: #D9D5D6;
    margin-left: 0px;
    margin-top: 0px;
    }
    body,td,th {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #000000;
    }
    -->
    </style>
    </head>

    <body>


    </p>
    <table width="100%" border="0">
    <tr>
    <td valign="top">

    </p>
    <table width="100%" border="1" bordercolor="#999999" bgcolor="#FFFFFF">
    <tr>
    <td>[img]images/logoCLA.gif[/img] CLA s.r.l. S. Giacomo di Teglio (SO) </td>
    <td></td>
    </tr>
    <tr bordercolor="#666666">
    <td width="50%" valign="top">

    </p> <table width="100%" border="1" bordercolor="#FFFFFF">
    <tr bordercolor="#999999" bgcolor="#CCCCCC">
    <td>Base</td>
    <td>Altezza</td>
    <td>Profondit&agrave;</td>
    <td>Quantit&agrave;</td>
    </tr>
    <tr bordercolor="#999999">
    <td><%=(ORDINI_ESPLOSI.Fields.Item("BASE").Value)% ></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("ALTEZZA").Valu e)%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").V alue)%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("QUANTITA").Val ue)%></td>
    </tr>
    </table>
    <blockquote></blockquote></td>
    <td width="50%"><p align="center">REPARTO TAGLIAFUOCO</p>
    <table width="300" border="1" align="center" bordercolor="#FFFFFF">
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">ordine n&deg; </td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("NUMERO").Value )%></td>
    </tr>
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">Cliente:</td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("CLIENTE").Valu e)%></td>
    </tr>
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">Codice articolo:</td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("CODICE").Value )%></td>
    </tr>
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">Tecnico:</td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("TECNICO").Valu e)%></td>
    </tr>
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">Scadenza:</td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("SCADENZA").Val ue)%></td>
    </tr>
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">Note:</td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("NOTE_PRODUZION E").Value)%></td>
    </tr>
    <tr bordercolor="#FFFFFF" bgcolor="#FFFFFF">
    <td></td>
    <td></td>
    </tr>
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">Materiale:</td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("MATERIALE").Va lue)%></td>
    </tr>
    <tr bordercolor="#999999">
    <td bgcolor="#FFFFCC">spessore:</td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("SPESSORE").Val ue)%></td>
    </tr>
    </table> <p align="center"> </p></td>
    </tr>
    <tr>
    <td><table width="100%" border="0">
    <tr>
    <td valign="top"><div align="center">


    [img]images/MODULI/F30EZ/BASI.gif[/img]</p>
    <table width="90%" border="1" bordercolor="#FFFFFF">
    <tr bordercolor="#999999" bgcolor="#CCCCCC">
    <td><div align="center">B</div></td>
    <td><div align="center">H</div></td>
    <td><div align="center">Quantit&agrave;</div></td>
    <td><div align="center">N&deg; fori 6,5</div></td>
    </tr>
    <tr bordercolor="#999999">
    <td><%=(ORDINI_ESPLOSI.Fields.Item("BASE").Value)+ 50%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").V alue)+68%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("QUANTITA").Val ue)*2%></td>
    <td><% if(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").Value) =300 Then%>
    8
    <% else %>
    <% if(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").Value) =500 Then%>
    12
    <% else %>
    -
    <%end if%>
    <%end if%>


    </td>
    </tr>
    </table>


    </p>
    </div></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    </table></td>
    <td width="50%" valign="top"><div align="center">
    <table width="100%" border="0">
    <tr>
    <td valign="top"><div align="center">


    [img]images/MODULI/F30EZ/ALTEZZE_FORO.gif[/img]</p>
    <table width="90%" border="1" bordercolor="#FFFFFF">
    <tr bordercolor="#999999" bgcolor="#CCCCCC">
    <td><div align="center">A</div></td>
    <td><div align="center">H</div></td>
    <td><div align="center">Quantit&agrave;</div></td>
    <td><div align="center">N&deg; fori 6,5</div></td>
    </tr>
    <tr bordercolor="#999999">
    <td><%=(ORDINI_ESPLOSI.Fields.Item("ALTEZZA").Valu e)+60%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").V alue)+68%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("QUANTITA").Val ue)*2%></td>
    <td><% if(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").Value) =300 Then%>
    8
    <% else %>
    <% if(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").Value) =500 Then%>
    12
    <% else %>
    -
    <%end if%>
    <%end if%>
    </td>
    </tr>
    </table>


    </p>
    </div></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    </table>
    <blockquote></blockquote>
    </div></td>
    </tr>
    <tr>
    <td><table width="100%" border="0">
    <tr>
    <td valign="top"><div align="center">


    [img]images/MODULI/F30EZ/ALTEZZE.gif[/img]</p>
    <table width="90%" border="1" bordercolor="#FFFFFF">
    <tr bordercolor="#999999" bgcolor="#CCCCCC">
    <td><div align="center">A</div></td>
    <td><div align="center">H</div></td>
    <td><div align="center">Quantit&agrave;</div></td>
    <td><div align="center">N&deg; fori 6,5</div></td>
    </tr>
    <tr bordercolor="#999999">
    <td><%=(ORDINI_ESPLOSI.Fields.Item("ALTEZZA").Valu e)+60%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").V alue)+68%></td>
    <td><%=(ORDINI_ESPLOSI.Fields.Item("QUANTITA").Val ue)*2%></td>
    <td><% if(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").Value) =300 Then%>
    8
    <% else %>
    <% if(ORDINI_ESPLOSI.Fields.Item("PROFONDITA").Value) =500 Then%>
    12
    <% else %>
    -
    <%end if%>
    <%end if%>
    </td>
    </tr>
    </table>


    </p>
    </div></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    </table></td>
    <td valign="top"></td>
    </tr>
    </table>
    <p align="center"></p>

    </p></td>
    </tr>
    </table>


    </p>
    </body>
    </html>
    <%
    ORDINI_ESPLOSI.Close()
    Set ORDINI_ESPLOSI = Nothing
    %>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.