ASP call Crystal and Store Procedure (4)

Source: Internet
Author: User
Tags chr goto window
' Spstring.sql

If exists (select name from sysobjects where name = ' sprocstring ')
drop proc Sprocstring

Go

CREATE PROCEDURE sprocstring
@pTitle varchar (80)

As

SET NOCOUNT on

SELECT
*
From
Titleview

WHERE
Title = @pTitle
or @pTitle = ' * '



' Toolbar.asp


<%
' 05/02/98
' Added The following features:
' Tab Query String Parameter
'-This is the selected tab ' s Tabarray index value.
' Page expiry time
'-the page would expire when downloaded by browser so this user is insured to all data
' would be current.
' DrillDown Tabs
'-Added in the session ("Tabarray") object to keep track of the drill down tabs.
' Search
'-Added javascript window.alert function call to indicate when text isn't found in Rpt view.
' Goto Page Text Box
'-Added textbox and filenew.gif so user can enter and request desired page number.
' Note:netscape 2.0 browsers does not call the ' in ' submit event handler when the image is selected.
' Thus, the user won't be warned when incorrect the data was entered into the Goto page box.
' This problem does is not happen the user selects return.
Response.Expires = 0
' Viewer Tab Images
Drilld = "Drillu = "Previewu = "previewd = "' Set the correct numbers on the paging buttons
Brch = Request.QueryString ("Brch")
If Brch <> "" Then
Brch = "&" & "Brch=" & Brch
BasePage = "<a href=" & Chr (+) & "javascript:parent.parent.location=" rptserver.asp?init=html_frame& Page=1 ' "& Chr (+) &" > "

End If

Getpagecommand = "Rptserver.asp?cmd=toolbar%5fpage&viewer=html%5fframe&vfmt=html%5fframe" & Brch


Searchfound = Request.QueryString ("Searchfound")
If Searchfound <> "" Then
If Cint (searchfound) = 0 Then
MessageText = "OnLoad =" & Chr (a) & "Window.alert" (' Text not Found in the '); "& Chr (34)
End If
End If

Currentpagenumber = CSTR (Session ("Currentpagenumber"))
Lastknownpage = CSTR (Session ("Lastknownpage"))
Lastpagenumber = CSTR (Session ("Lastpagenumber"))

If Currentpagenumber = "" Then
Currentpagenumber = "1"
End If

If Lastknownpage = "" Then
Lastknownpage = "0"
End If



If Lastpagenumber <> "" and (Currentpagenumber = Lastpagenumber) Then
Lastknownpage = Currentpagenumber
' Remember the last known page
Session ("lastknownpage") = Currentpagenumber
Nextlink = ""
Lastlink = ""
If CInt (currentpagenumber) > 1 Then
PreviousPage = CInt (currentpagenumber)-1
Previouslink = "<a href=" & Chr (+) & "javascript:parent.location=" rptserver.asp?cmd=toolbar%5fpage& Viewer=html%5fframe&vfmt=html%5fframe&page= "& PreviousPage & Brch &" "& Chr (+) &" > "
FirstLink = "<a href=" & Chr (+) & "javascript:parent.location=" rptserver.asp?cmd=toolbar%5fpage& Viewer=html%5fframe&vfmt=html%5fframe&page=1 "& Brch &" "& Chr (+) &" > "
Else
Previouslink = ""
FirstLink = ""
End If
Else
if (CInt (Lastknownpage) < CInt (Currentpagenumber)) and Lastpagenumber = "" Then
' Remember the last known page
Session ("lastknownpage") = Currentpagenumber
Lastknownpage = currentpagenumber & "+"
Else
If Lastknownpage <> Lastpagenumber Then
Lastknownpage = lastknownpage & "+"
End If
End If
If CInt (currentpagenumber) > 1 Then



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.