ASP Call Crystal Report with Store Procedure(6)

來源:互聯網
上載者:User
'rptserver.asp

Case "SRCH"
Call RetrieveObjects
Call CheckForError
' create page variable
gvPageNumber = CInt(PAGE)

Select Case VFMT
Case "ENCP"
if goPageGenerator.FindText(TEXT, 0, gvPageNumber) then
Response.ContentType = EMFMIMETYPE
session("oEMF").sendpagenumberrecord(gvPageNumber)
else
gsErrorText = "The specified text, '" & TEXT & "' was not found in the report"
Response.ContentType = EMFMIMETYPE
session("oEMF").SendErrorMsg 33, gsErrorText
end if

Case "HTML_FRAME"
' We are being called by HTML viewer
' need to get the text from the form post
dim searchFound
TEXT = request.form("text")
' Now find out what page the text is on
tempNumber = gvPageNumber + 1
If(CBool(goPageGenerator.FindText(TEXT, 0, tempNumber))) then
session("CurrentPageNumber") = tempNumber
searchFound = 1
else
session("CurrentPageNumber") = gvPageNumber
searchFound = 0
End If
if BRCH <> "" then
gvURL = "framepage.asp?brch=" & BRCH & "&SEARCHFOUND=" & searchFound
else
gvURL = "framepage.asp?SEARCHFOUND=" & searchFound
end if
response.redirect gvURL

Case "HTML_PAGE"
' We are being called by HTML viewer
' need to get the text from the form post
TEXT = request.form("text")
' Now find out what page the text is on
tempNumber = gvPageNumber
If(CBool(goPageGenerator.FindText(TEXT, 0, tempNumber))) then
gvPageNumber = tempNumber
Set goPage = goPageCollection(gvPageNumber)
session("oPageEngine").ImageOptions = 1
response.binarywrite goPage.Renderhtml(1,3,3,request.ServerVariables("SCRIPT_NAME"),8209)
else
' Send back an html page indicating the text was not found.
Response.Write "<html><title>Seagate ASP Reports Server</title><body bgcolor='white'><center><h1>The text cannot be found in this report.</h1></center></body></html>"
End If

end select


Case "TOOLBAR_PAGE"

' Redirect to the framepage, need to know if we are
' on the last page.

if session("LastPageNumber") <> "" then
if CInt(PAGE) > CInt(session("LastPageNumber")) then
session("CurrentPageNumber") = session("LastPageNumber")
else
session("CurrentPageNumber") = PAGE
end if
else
Call RetrieveObjects
Call CheckForError
' create the actual page
Set goPage = goPageCollection(PAGE)
' check for an exception on the page number
Call ValidatePageNumber
if goPage.IsLastPage then
session("LastPageNumber") = goPage.pagenumber
session("CurrentPageNumber") = session("LastPageNumber")
else
session("CurrentPageNumber") = PAGE
end if
end if
if BRCH <> "" then
gvURL = "framepage.asp?brch=" & BRCH
else
gvURL = "framepage.asp"
end if

response.redirect gvURL

Case "EXPORT"
Set ExportOptions = Session("oRpt").ExportOptions
if(FillExportOptionsObject( EXPORT_FMT)) Then
Call RetrieveObjects
response.binarywrite goPageGenerator.Export(8209)
Call CheckForError
else
Response.ContentType = EMFMIMETYPE
session("oEMF").SendErrorMsg 1, "Invalid Export Type Specified"
end if

Case "MAP_DD"
' only supported in java and active X smart viewers
Select Case VFMT

Case "ENCP"

' Get page coll



相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.