Pagination Displaying Count of Total Records available and Current Page

Hi,
I need to implement paging in one of our pages.
The problem is we need to display the count of total number of records the search has resulted and the search results that fall into the current page.
For e.g. If the search resulted in 100 records total and we are in page 5 (with 10 records per page), I need to display the count 100 on the top and records 51-50 in the page.
How to get the count of fetched results without running a second SELECT COUNT(1) FROM ... clause.
Is there a way to do this in a optimized way?
Thanks

How to get the count of fetched results without running a second SELECT COUNT(1) FROM ... clause.
SQL> select cnt "Total", rn "Line", empno, ename, job
  from (select count (*) over () cnt, row_number () over (order by empno) rn,
               empno, ename, job
          from emp)
where rn between 4 and 6
     Total       Line      EMPNO ENAME      JOB     
        14          4       7566 JONES      MANAGER 
        14          5       7654 MARTIN     SALESMAN
        14          6       7698 BLAKE      MANAGER 

Similar Messages

  • Query in SQL to display count of all records but where condition is present

    Hi All,
    I have situation where I need to display count of all records all particular period but in where condition type condition has to be present :
    Please find the below sample data :
    PERIOD_ID     TYPE     MV_COUNT     IS_FLAG
    20110401     AM     1     0
    20110401     AM     1     0
    20110401     MS     29     0
    20110501     MS     1     0
    20110601     MS     14     0
    20110701     MS     2     0
    20110401     MS     1     0
    20110401     AM     2     0
    20110401     AM     69     0
    20110401     AM     2     0
    finally I need for type = MS
    i) total is_flag count for all the periods
    ii) for period=20110501 what is the mv_count
    I need to use the table single time (ie not self join outer joins )
    I have tried to use partition by clause but it will filter out the data .
    Cheers,
    Sp

    842106 wrote:
    finally I need for type = MS
    i) total is_flag count for all the periods
    ii) for period=20110501 what is the mv_count
    I need to use the table single time (ie not self join outer joins )
    I have tried to use partition by clause but it will filter out the data .
    select sum(is_flag) is_flg_count,
             sum
                 case when period = 20110501 then mv_count else 0 end
                ) mv_cnt_for_20110501
    from your_table
    where type = 'MS';

  • CSS Rollover Menu with Images and Current Page Indicator

    Hello.
    I have found a very interesting video here: http://www.youtube.com/watch?v=vv8cRYGCvIY about creating a CSS Rollover Menu with Images and Current Page Indicator (I tested it and it is working fine).
    I have a web site with 15 pages based on a template and I want to use that video sample to do the same thing on my web site.
    Please tell me if I can use the sample from the link above to do that.
    What should I change in the css file (what new class should I make) to make this work on a web site based on a template  ?
    Thank You !

    I don't know about that video tutorial but a sitewide persistent menu indicator ('you are here' highlighting) is very simple to do with CSS classes.
    Details and code examples below:
    http://alt-web.com/Articles/Persistent-Page-Indicator.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Spry Menu Bars, Templates and Current Page Indicators

    Hello,
    If you have a spry menu bar in your design, then create a template, how do you then go about making the menu bar have a current page indicator on each page created from the template?
    Thanks,
    Ferg.

    Can I send you on a different path? This solution will only be required in a non-editable area of the DWT.
    First we write a function to initialse the page
    function InitPage(){
    Spry.$$('#MenuBar1 li').forEach(function(node){
        var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
        if(a.href == window.location){
            Spry.Utils.addClassName(node,"activeMenuItem");
    The function compares the URL of the page with the link in the menubar and if they are both the same, it will add an 'activeMenuItem, class to the menuitem.
    Next we nee a trigger to activate the function. This is done with a load listener as per
    Spry.Utils.addLoadListener(InitPage);
    Now we need to ensure that our active menuitem looks different, by assigning a couple of style rules as in the following. The !important needs to be there to override the JS.
    .activeMenuItem a {
        background:#a59a84 !important;
        color:#ffffff !important;
    And lastly we need to add SpryDOMUtils.js as the JS script that we based our JS scripts on
    <script src="SpryAssets/SpryDOMUtils.js"></script>
    The whole thing will look like
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet">
    <style>
    .activeMenuItem a {
        background:#a59a84 !important;
        color:#ffffff !important;
    </style>
    </head>
    <body>
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a class="MenuBarItemSubmenu" href="#">Item 1</a>
        <ul>
          <li><a href="#">Item 1.1</a></li>
          <li><a href="#">Item 1.2</a></li>
          <li><a href="#">Item 1.3</a></li>
        </ul>
      </li>
      <li><a href="#">Item 2</a></li>
      <li><a class="MenuBarItemSubmenu" href="#">Item 3</a>
        <ul>
          <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
            <ul>
              <li><a href="#">Item 3.1.1</a></li>
              <li><a href="#">Item 3.1.2</a></li>
            </ul>
          </li>
          <li><a href="#">Item 3.2</a></li>
          <li><a href="#">Item 3.3</a></li>
        </ul>
      </li>
      <li><a href="#">Item 4</a></li>
    </ul>
    <script src="SpryAssets/SpryMenuBar.js"></script>
    <script src="SpryAssets/SpryDOMUtils.js"></script>
    <script>
    function InitPage(){
    Spry.$$('#MenuBar1 li').forEach(function(node){
        var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
        if(a.href == window.location){
            Spry.Utils.addClassName(node,"activeMenuItem");
    Spry.Utils.addLoadListener(InitPage);
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>
    Or see it live here http://shoguncarco.com.au/index.php where the function has been externalised in http://shoguncarco.com.au/js/plugins.js
    Gramps

  • SCCM report query that displays count of cpus per host and if host is physical or virtual

    Hello,
    I have this query that displays the count of CPUs per host.  How can I add a column to show if the host a physical or virtual?
    SELECT
    DISTINCT(CPU.SystemName0) AS [System Name],
    CPU.Manufacturer0 AS Manufacturer,
    CPU.Name0 AS Name,
    COUNT(CPU.ResourceID) AS [Number of CPUs],
    CPU.NumberOfCores0 AS [Number of Cores per CPU],
    CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
    FROM [dbo].[v_GS_PROCESSOR] CPU
    GROUP BY
    CPU.SystemName0,
    CPU.Manufacturer0,
    CPU.Name0,
    CPU.NumberOfCores0,
    CPU.NumberOfLogicalProcessors0

    I see that you have posted this exact question in another forum for CM12, however this is an CM07 forum.  
    Are you CM07 or CM12?
    If you are CM12, use my answer here.
    http://www.systemcentercentral.com/forums-archive/topic/sccm-report-query-for-cpu-cores/
    If you are CM07, this is NOT a simple how exactly do you detect that a computer is a VM? You can guess by looking at the manufacturer name but it is only a guess.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Display count of all records in a query on VC

    Hi all,
    I have a query for debtors. I want that on VC, only the no of document present in that query should be displayed instead of all documents in a chart or table. Is that possible on dash board? If yes then how??
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    If it's an SQL query then do a: "select count(*) from table_debtors where ......"
    Or you can use the Sigma operator. Just add this between your data source and the output table. When configuring the operator choose "count" for the fields.
    Henning
    Edited by: Henning Strand on Jan 22, 2008 8:04 AM

  • Retina display - blurry office for mac 2011 and web pages?

    Hi everyone,
    I was planning on making a trip to my uni tomorrow to make the purchase of the macbook pro 13 inch 8GB RAM and 256 GB SSD (for student discount) but while doing some final research I came across several disadvantages of the RD.
    For the next 3 months, the macbook will be used for report/thesis writing which means ill be using office for mac 2011 and adobe reader heavily as well as the internet. I have read many articles saying office for mac 2011 even after applying the update is still blurry and grainy as are the majority of web pages and this has put me off buying and made me think id be better off with the non retina display model, meaning I'd save £200 too.
    Can anyone offer any advice on this and confirm whether or not this is true, and whether you would recommend going ahead with the purchase? A screenshot of office for mac 2011 on a retina display would be perfect
    Thanks!

    I agree with BobTheFisterman.  I have Pages 5, Pages '09 and Office for Mac 2011.  I really like the Pages programs - each of the versions in their own way - but I don't like using Word on Office for Mac.  It's not the same as Office 10 when used on a Windows machine.  Not close at all in fact.  I use it because I have it, and emailing documents between my Mac and work where we use Windows makes it easy.  "Easy" is not the same as liking the software though.
    The point of this, is that I would not recommend buying it.  I've heard that Open Office and Libre Office are very credible alternatives, and work very much like Word on Windows.  Both are free and get very good reviews.  I've not used either so can't speak from personal experience, but what I would say after buying Office for Mac is that I wish I had tried the free alternatives first.
    The other alternative to consider of course of Google Drive.  I use that for non-confidential documents, but I wouldn't trust it for storage of any confidential work related stuff.

  • Browser URL and current page

    I dunno if it's a bug or something in my j2ee configuration, but the URL that i see in my browser is always of the page i last visited, not the current one. I see that in srdemo too so it couldn't be my fault. This is an issue,for example, when i use a specific css for a page and to see this working i have to change the page and then go back. Thanks in advance for help

    Hi,
    the reason for this is that the default navigation behavior in JSF uses postback, which performs page navigation on the server side. You can changes this behavior by setting the navigation case to perform a page redirect instead (declarative option on the navigation case)
    Frank

  • Powershell: Count total messages to and from external domain

    Hi All,
    I'm attempting to get a count of total messages to and from our clients domains.  For example, @customer1.com 23.
    So far, I have the following code
    get-messagetrackinglog -start (Get-Date).adddays(-1) -resultsize unlimited |where-object {$_.EventID -eq
    Send" -or $_.EventID -eq "Receive"}
    What I'm looking for is the following:
    If the Sender or the Recipient is NOT @ourcompanydomain.com, count total messages either sent or received from the domain.  Output to csv.
    123.com, 53
    456.com, 32
    Any help would be greatly appreciated.
    Brian
    Syncronet

    Ok, so I've made some progress and now have it so I get an accurate count of total messages.  Now I need to group them by @recipientdomain.com and have totals for each recipientdomain.com.  I also need to get the output correct.  
    Add-PSSnapin Microsoft.Exchange.Management.Powershell.E2010 -ea silentlyContinue
    [long]$IntSent=0
    [long]$IntRec=0
    [long]$IntTotal=0
    $domain="extdomain.com"
    get-messagetrackinglog -start (Get-Date).adddays(-1) -resultsize unlimited -Eventid Send| ForEach{$IntSent++}
    get-messagetrackinglog -start (Get-Date).adddays(-1) -resultsize unlimited -EventID Receive |Where {[String]$_.recipients -notlike "*@mydomain.com*"}|ForEach{$IntRec++}
    #write-host ($IntSent)
    #Write-host ($IntRec)
    $IntTotal=$IntSent + $IntRec
    write-host ($IntTotal)
    $table=@"
    Domain,Messages
    $domain,$IntTotal
    $Table |set-content c:\temp\messages.csv
    Any help is greatly appreciated.
    Thanks
    Brian
    Syncronet
    Directly loading in the snap in for Exchange 2010 and 2013 is not supported.
    Please update scripts to use remoting:
    http://blogs.technet.com/b/rmilne/archive/2015/01/28/directly-loading-exchange-2010-or-2013-snapin-is-not-supported.aspx
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Total records in database equals -1?

    I have some code, accessing an Access database. As part of development I need to see how many total records there are, so I have the code I took off of bindings in CS 5:
              <p align="center">/<%=(Recordset1_first)%>/<%=(Recordset1_last)%>/<%=(Recordset1_total)%></p >
    Why would _total always equal -1? The code is otherwise functional but the -1 does not change regardless if I add a record or delete a record?
    Curiouser and curiouser…
    Ross

    I try changing the cursor type and it had no effect whatsoever I also tried looking for a simple "attach" for this posting and could not find one. I therefore attached the full ASP so you could see what kind of stuff I'm talking about. Could you forward this as appropriate?
    Thanks.
    Ross
    =============================code=========================
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include virtual="/Connections/nextdns.asp" -->
    <%
      dim MM_nextdns_STRING
          MM_nextdns_STRING ="PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\ids2.mdb")
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
      MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
    End I
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' *** Redirect if username exists
    MM_flag = "MM_insert"
    If (CStr(Request(MM_flag)) <> "") Then
      Dim MM_rsKey
      Dim MM_rsKey_cmd
      MM_dupKeyRedirect = "/already.asp"
      MM_dupKeyUsernameValue = CStr(Request.Form("11"))
      Set MM_rsKey_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsKey_cmd.ActiveConnection = MM_nextdns_STRING
      MM_rsKey_cmd.CommandText = "SELECT id2 FROM login2 WHERE id2 = ?"
      MM_rsKey_cmd.Prepared = true
      MM_rsKey_cmd.Parameters.Append MM_rsKey_cmd.CreateParameter("param1", 200, 1, 255, MM_dupKeyUsernameValue) ' adVarChar
      Set MM_rsKey = MM_rsKey_cmd.Execute
      If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
        ' the username was found - can not add the requested username
        MM_qsChar = "?"
        If (InStr(1, MM_dupKeyRedirect, "?") >= 1) Then MM_qsChar = "&"
        MM_dupKeyRedirect = MM_dupKeyRedirect & MM_qsChar & "requsername=" & MM_dupKeyUsernameValue
        Response.Redirect(MM_dupKeyRedirect)
      End If
      MM_rsKey.Close
    End If
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
      If condition = "" Then
        MM_IIf = ifFalse
      Else
        MM_IIf = ifTrue
      End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "form3") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_nextdns_STRING
        MM_editCmd.CommandText = "INSERT INTO login2 (id2, password2, AccessLev) VALUES (?, ?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("11")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("22")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 5, 1, -1, MM_IIF(Request.Form("accesslev"), Request.Form("accesslev"), null)) ' adDouble
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
      End If
    End If
    %>
    <%
    ' *** Delete Record: construct a sql delete statement and execute it
    If (CStr(Request("MM_delete")) = "form2" And CStr(Request("MM_recordId")) <> "") Then
      If (Not MM_abortEdit) Then
        ' execute the delete
    mm_nextdns_string = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\ids2.mdb")
           Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_nextdns_STRING
        MM_editCmd.CommandText = "DELETE FROM login2 WHERE id2 = ?"
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 200, 1, 255, Request.Form("MM_recordId")) ' adVarChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
      End If
    End If
    %>
    <%
    If (CStr(Request("MM_insert")) = "form3") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
       MM_nextdns_string = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\ids2.mdb")
         MM_editCmd.ActiveConnection = MM_nextdns_STRING
        MM_editCmd.CommandText = "INSERT INTO login2 (id2, password2) VALUES (?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("121212")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("343434")) ' adVarWChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        Dim MM_editRedirectUrl0
        MM_editRedirectUrl = "inserted.asp"
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim delit_total
    Dim delit_first
    Dim delit_last
    ' set the record count
    ' set the number of rows displayed on this page
    If (delit_numRows < 0) Then
      delit_numRows = delit_total
    Elseif (delit_numRows = 0) Then
      delit_numRows = 1
    End If
    ' set the first and last displayed record
    delit_first = 1
    delit_last  = delit_first + delit_numRows - 1
    ' if we have the correct record count, check the other stats
    If (delit_total <> -1) Then
      If (delit_first > delit_total) Then
        delit_first = delit_total
      End If
      If (delit_last > delit_total) Then
        delit_last = delit_total
      End If
      If (delit_numRows > delit_total) Then
        delit_numRows = delit_total
      End If
    End If
    %>
    <%
    ' *** Recordset Stats: if we don't know the record count, manually count them
    response.write("precount")
    If (Recordset1_total = -1) Then
      ' count the total records by iterating through the recordset
      Recordset1_total=0
    response.write("incount")
       While (Not Recordset1.EOF)
        Recordset1_total = Recordset1_total + 1
        Recordset1.MoveNext
      Wend
      ' reset the cursor to the beginning
      If (Recordset1.CursorType > 0) Then
        Recordset1.MoveFirst
      Else
        Recordset1.Requery
      End If
      ' set the number of rows displayed on this page
      If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
      ' set the first and last displayed record
      Recordset1_first = 1
      Recordset1_last = Recordset1_first + Recordset1_numRows - 1
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
    End If
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("idid2"))
    If MM_valUsername <> "" Then
      Dim MM_fldUserAuthorization
      Dim MM_redirectLoginSuccess
      Dim MM_redirectLoginFailed
      Dim MM_loginSQL
      Dim MM_rsUser
      Dim MM_rsUser_cmd
      MM_fldUserAuthorization = ""
      MM_redirectLoginSuccess = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/g.asp"
      MM_redirectLoginFailed = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/b.asp"
      MM_loginSQL = "SELECT id2, password2"
      If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
      MM_loginSQL = MM_loginSQL & " FROM login2 WHERE id2 = ? AND password2 = ?"
      Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsUser_cmd.ActiveConnection = MM_nextdns_STRING
      MM_rsUser_cmd.CommandText = MM_loginSQL
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 255, MM_valUsername) ' adVarChar
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 255, Request.Form("pwd2")) ' adVarChar
      MM_rsUser_cmd.Prepared = true
      Set MM_rsUser = MM_rsUser_cmd.Execute
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccess = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccess)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("asd1"))
    If MM_valUsername <> "" Then
      MM_fldUserAuthorization = ""
      MM_redirectLoginSuccess = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/g.asp"
      MM_redirectLoginFailed = "file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/b.asp"
      MM_loginSQL = "SELECT id2, password2"
      If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
      MM_loginSQL = MM_loginSQL & " FROM login2 WHERE id2 = ? AND password2 = ?"
      Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsUser_cmd.ActiveConnection = MM_nextdns_STRING
      MM_rsUser_cmd.CommandText = MM_loginSQL
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 255, MM_valUsername) ' adVarChar
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 255, Request.Form("asd2")) ' adVarChar
      MM_rsUser_cmd.Prepared = true
      Set MM_rsUser = MM_rsUser_cmd.Execute
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccess = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccess)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_nextdns_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM login2"
    Recordset1_cmd.Prepared = true
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <!--#include virtual="/includes/adovbs.inc" -->
    <%
    Repeat1__numRows = 20
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim Recordset1_total
    Dim Recordset1_first
    Dim Recordset1_last
    ' set the record count
    Recordset1_total = Recordset1.RecordCount
    ' set the number of rows displayed on this page
    If (Recordset1_numRows < 0) Then
      Recordset1_numRows = Recordset1_total
    Elseif (Recordset1_numRows = 0) Then
      Recordset1_numRows = 1
    End If
    ' set the first and last displayed record
    Recordset1_first = 1
    Recordset1_last  = Recordset1_first + Recordset1_numRows - 1
    ' if we have the correct record count, check the other stats
    If (Recordset1_total <> -1) Then
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
      If (Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
    End If
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
    MM_valUsername=CStr(Request.Form("idid2"))
    If MM_valUsername <> "" Then
      MM_fldDynamicRedirect=""
      MM_fldUserAuthorization="AccessLev"
      MM_redirectLoginSuccessDynamic="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712- 4265-839B-02EB4947FC25}/g.asp"
      MM_redirectLoginFailed="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839 B-02EB4947FC25}/b.asp"
      MM_flag="ADODB.Recordset"
      set MM_rsUser = Server.CreateObject(MM_flag)
      MM_rsUser.ActiveConnection = MM_nextdns_STRING
      MM_rsUser.Source = "SELECT id2, password2"
      If MM_fldDynamicRedirect <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldDynamicRedirect
      If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
      MM_rsUser.Source = MM_rsUser.Source & " FROM login2 WHERE id2='" & Replace(MM_valUsername,"'","''") &"' AND password2='" & Replace(Request.Form("pwd2"),"'","''") & "'"
      MM_rsUser.CursorType = 0
      MM_rsUser.CursorLocation = 2
      MM_rsUser.LockType = 3
      MM_rsUser.Open
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        ElseIf (MM_fldDynamicRedirect <> "") Then
          MM_redirectLoginSuccessDynamic = CStr(MM_rsUser.Fields.Item(MM_fldDynamicRedirect).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccessDynamic = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccessDynamic)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    body {
        background-image: url(/graphics/spackle.gif);
    .ctable {
        border-top-style: solid;
        border-right-style: solid;
        border-bottom-style: solid;
        border-left-style: solid;
    </style>
    <script src="/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table width="160" border="1">
      <tr>
        <td width="106"><p><img src="/graphics/coed1.jpg" width="42" height="53" alt="coed1" /></p>
          <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
            <input type="hidden" name="cmd" value="_cart" />
            <input type="hidden" name="add" value="1" />
            <input type="hidden" name="bn" value="webassist.dreamweaver.4_5_0" />
            <input type="hidden" name="business" value="[email protected]" />
            <input type="hidden" name="item_name" value="aaaa" />
            <input type="hidden" name="item_number" value="aaaa" />
            <input type="hidden" name="amount" value=".12" />
            <input type="hidden" name="currency_code" value="USD" />
            <input type="hidden" name="cancel_return" value="http://heritage.site88.net/badorder.asp" />
            <input type="hidden" name="receiver_email" value="[email protected]" />
            <input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
            <input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
            <input type="hidden" name="no_shipping" value="0" />
            <input type="hidden" name="no_note" value="0" />
            <input type="image" name="submit" src="http://images.paypal.com/images/sc-but-03.gif" border="0" alt="Make payments with PayPal - it's fast, free and secure!" />
        </form></td>
        <td width="16"> </td>
        <td width="16"> </td>
      </tr>
      <tr>
        <td> </td>
        <td><img src="/graphics/coed1.jpg" width="14" height="18" alt="coed1" /></td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td> </td>
        <td><img src="/graphics/coed1.jpg" width="20" height="31" alt="coed1" /></td>
      </tr>
    </table>
    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <div align="center">
        <input type="hidden" name="cmd" value="_cart" />
        <input type="hidden" name="display" value="1" />
        <input type="hidden" name="bn" value="webassist.dreamweaver.4_5_0" />
        <input type="hidden" name="business" value="[email protected]" />
        <input type="hidden" name="receiver_email" value="[email protected]" />
        <input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
        <input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
        <input type="image" name="submit" src="http://images.paypal.com/images/view_cart_02.gif" border="0" alt="Make payments with PayPal - it's fast, free and secure!" />
     </div>
    </form>
    <p> </p>
    <table width="492" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td width="63"><label for="recnum6">Recnum</label></td>
        <td width="101"> ID</td>
        <td width="154">Password </td>
        <td width="164">AccessLev</td>
      </tr>
    </table>
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
    <td><input name="recnum" type="text" id="recnum" value="<%=(Recordset1.Fields.Item("recnum").Value)%>" size="10" /></td>
    <td><input name="idid" type="text" id="idid" value="<%=(Recordset1.Fields.Item("id2").Value)%>" size="10" /></td>
    <td><input name="pwd" type="text" id="pwd" value="<%=(Recordset1.Fields.Item("password2").Value)%>" /></td>
    <td><input name="accesslev" type="text" id="accesslev" value="<%=(Recordset1.Fields.Item("AccessLev").Value)%>" /></td>
    <label for="accesslev"></label>
    <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      Recordset1.MoveNext()
      response.write("<br>")
    Wend
    %>
    <p align="center">/<%=(Recordset1_first)%>/<%=(Recordset1_last)%>/<%=(Recordset1_total)%>/</ p>
    <p align="center"> </p>
    <form id="form4" name="form4" method="post" action="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/ inscust.asp">
      <div align="center">
        <input type="submit" name="register" id="register" value="Register as New User" />
      </div>
    </form>
    <p align="center">-or- </p>
    <form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
      <label for="idid2">                                                                      ID:</label>
      <input type="text" name="idid2" id="idid2" />
      <label for="pwd2">Pwd:</label>
      <input type="password" name="pwd2" id="pwd2" />
      <input type="submit" name="login" id="login" value="Login" />
      <a href="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/re gister.asp">
      </a>
    </form>
    <form action="<%=MM_editAction%>" method="POST" id="form3" name="form3">
        <label for="11">IdId:</label>
        <input type="text" name="11" id="11" />
        <label for="22">Password2:</label>
        <input type="password" name="22" id="22" />
      <label for="accesslev">AL:</label>
      <input name="accesslev" type="text" id="accesslev" value="2" size="1" maxlength="1" />
      <input type="submit" name="insins" id="insins" value="Insert" />
        <input type="hidden" name="MM_insert" value="form3" />
      </p>
    </form>
    <p></p>
    <p></p>
    <form ACTION="file:///C|/Users/Admin/AppData/Local/Temp/{C0C804DA-3712-4265-839B-02EB4947FC25}/ dodel.asp" METHOD="POST" id="form2" name="form2">
      <label for="delrec">Recnum:</label>
      <input type="text" name="delrec" id="delrec" />
      <input type="submit" name="deleir" id="deleir" value="Delete" />
    </form>
    <p></p>
    <p>
      <script type="text/javascript">
    function zappaypalcookies()
        alert("called");
        alert(document.cookie.length);
        alert(document.cookie);
        document.cookie="fred=sam";
            alert(document.cookie);
      </script></p>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

  • Hierarchal Report for Fund Centre Hierarchy/Group for Total Records

    Hello Gurus,
    I need to check if there is some Hierarchal report in FM which displays the data as per my Funds Centre Hierarchy or group. Like there is a report in Cost Centre Accounting (S_ALR_87013611) which displays the figures according to different grouping on the left hand side of the screen.
    In FM report for example if I will go to - FMB_PT01 - Totals Records report and populate the Funds Centre Group then system populates the report for the relevant funds centres in that group individually but do not group the figures logically as per the group structure like we have in Cost Centre Reporting.
    Please advise if there is any such kind of report or is there any possibility of creating a report painter/writer or we need to go for fully customized report.
    Thanks in Advance!
    Regards
    Rohit

    Hi,
    This is a standard feature with Report Painter reports. S_ALR_87013611 is a Report Painter report in library 1VK report 1SIP-001. There are 4 standard FM reports in Report Painter library 4FM. You can also define your own FM reports under library 4FM. Please see the link below on how to create a report:
    Report Painter / Report Writer - SAP Library
    Regards,
    Ming

  • Viewer TOTAL record count display CRViewer9

    Post Author: niblick
    CA Forum: General
    A application written in a previous version of Crystal Reports (7 or 8 ?) displays the TOTAL record count in the viewer (not in the report).  I had to upgrade the reports to version 9 (RDC - CRViewer9) and when I preview the report there is no TOTAL record count in the viewer.  How do I enable this in Crystal Reports 9?
    Thanks

    check inbox. forwarded the updated template

  • I cannot backup because no more storage is displayed when the storage statistics shows Total Storage 5GB and Available Storage 5GB - basically i haven't used any memory but i cannot backup! please help

    i cannot backup my iphone4s because no more storage is displayed when the storage statistics shows Total Storage 5GB and Available Storage 5GB - basically i haven't used any memory but i cannot backup! please help. i am only trying to back up my notes and contacts. that's it. and i don't think it will use up 5GB

    On your iPhone, go to Settings>iCloud>Storage & Backup>Manage Storage.  There you should be able to see how much of your used storage is allocated to different things (ex., iphone backup, ipad backup, mail).  From there you should be able to figure out what is going on.

  • How to get the total record count for the report

    Hi,
    How can I get count of the total records shown in the report. When we set the report attributes, we have an option "Set Pagination from X to Y of Z"
    Does anyone know how can I get the Z value from APEX variables.
    I know we can use that query and get the count but I just want to know how we can use APEX Variables effectively.
    Thanks in advance.

    You write a loop, something like this:
    Go_block('B1');
    If not form_success then
      Raise Form_Trigger_failure;
    End if;
    First_Record;
    If not form_success then
      Raise Form_Trigger_failure;
    End if;
    Loop
      If :system.record_status in('CHANGED','INSERT') then
        -- modify the record here--
      End if;
      Exit when :System.Last_Record = 'TRUE';
      Next_Record;
    End Loop;
    First_Record;But be very careful-- If your block can fetch a large number of rows, (over 100), this loop can take a long time, and you should not use this method. The loop will continue fetching more rows from the database until all rows satisfying the query are retrieved.

  • Running Total Issue:  How to calculate counts excluding suppressed records

    Post Author: benny
    CA Forum: Formula
    Hello All:
    I have a current report that gives the total counts of work requests.   However, in my section expert, there are some records in the detail that are suppressed (if there isn't any backlog). The current running totals are counting all the records including the suppressed records. I think I need three formulas:1. Calculate the counts2. Calculate the counts excluding suppressed records3. Reseting the counts by group
    May I ask if someone can give me an example of what I should do?
    Thanks so much!
    Benny

    Post Author: benny
    CA Forum: Formula
    Bettername,
    Actually, I should have been more specific.  This report is actually a PM backlog report.  It displays all the work requests (PM) issued including the backlogged. There are 9 columns (including one called Backlog) for the different counts of the pm's based from the status codes (Issued, Material on Order, Completed, Cancelled, etc) of the work requests. The detail records of worke requests are grouped by shop and PM end date.  The running totals are calculated at the pm date group level (group footer#2). Then based from those at the shop group level (group footer#1) there is a grand total of counts of the running totals. The detail records and pm end date group header (group header #2) are suppressed.
    Now the foremen would like the report to just display all the backlogged PMs. Using the section expert, I suppressed all the PM issued that have no back log ({@ backlog = 0}) and just display the back logged pm's.  This is where I run into the running total issue.
    This is very involved report and I will use the column PM Issued as an example.  I can still use the same logic as you suggested?
    1. declaration formula:
    whileprintingrecords;numbervar pmissued := 0;
    2. Suppression formula that uses the variable:
    whileprintingrecords;
    numbervar pmissued;
    if ({@ backlog = 0}) then pmissued:= pmissed else pmissued:=pmissuedr+1
    3. Display formula:whileprintingrecords;
    numbervar pmissued;
    If this is the right track, then I can use the same example for the other columns. 
    Thanks so much.
    Benny

Maybe you are looking for

  • Exception error in DTP  CX_static_check

    Hi , I am getting error when i run DTP , The request shows red when i see the log it says exception raised in Start routine , below is the Warning message in start routine when i go through the log see The exception CX_static_check is neither caught

  • Problem with images opened in Photoshop CS 5

    Hi, I have a problem with images that I open in Photoshop CS 5. F. ex. I opened the following image: The image appears with a purple color in Photoshop. If I hover over the image with a tool like lasso, it temporarily regains it´s original color. The

  • Separating stereo tracks already on a timeline

    I'm running CC 2014. I recorded all of my audio using a stereo track - there's a lav in the left and a shotgun mic in the right. I need to be able to adjust the volume of the channels independently. My problem is that I imported all of my footage usi

  • Vanishing or Disappearing Songs and Albums

    I have a problem with iTunes that I can't work out how to fix. Albums/songs that I have downloaded in the past appear in iTunes fine. Albums/songs that I am downloading now (either from a CD or online) appear in iTunes initally but then 'disappear' w

  • Can't find the tic-off for music in iTunes (only books and apps), Whats wrong?

    I run on PC with Vista