index | search | no replies | posting guidelines | help login | register
Index » News » AspWebSolution News
search this forum:
:: Version 2.5.43 - HideReportsWithIDs ::    show all messagesPost a Reply
Jul 7 2005, 11:58 AM
 Re: Version 2.5.43 - HideReportsWithIDsPost a Reply
 tonyzoc

View this author's profile Send this author a private message Visit author's homepage

since: Jul 5, 2005
from: Buffalo, NY

It doesn't work.  Here is my code:

The include file has a function that returns the Oracle connection string based on a base code parameter that is passed in in the URL:

https://geobase.afrc.af.mil/facilityreports/test.asp?rid=RPFAC_ALL_PR&bcode=HTUX

My "IF" conditional at the top grabs the initial querystring var "bcode" and sets strDbCode to the value of bcode.  If bcode comes in empty like it does on the postback, I grab the strDbCode and set bcode to it.  This is assuming that the hiddenField is working.  Let me know if you see something wrong with my code....

Thanks


<!--#include virtual="../include.asp"-->

<%
dim OraConn, bcode
Dim strDbCode
bcode=request.QueryString("bcode")
strDbCode = Request("strDbCode")

response.write("bcode=" & bcode & "<br>")
response.write("strDbCode=" & strDbCode & "<br>")

if bcode="" or isnull(bcode) then
    bcode=strDbCode
else
    strDbCode=bcode
end if

response.write("bcode=" & bcode & "<br>")
response.write("strDbCode=" & strDbCode & "<br>")

OraConn=getOraSDEConn2(bcode)

Session("UserSeqLevel")="1"


'When the value is stored in a session variable it can be reached from ANY page in the ASP application:

'Response.Write(Session("UserSeqLevel"))


Dim objWiz
Set objWiz = Server.CreateObject("AspWebSolution.ReportWizard2")


With objWiz

   'replace the license key below with your own
   .LicenseKey = "MF9A-G0RR-HBJH-2ETQ-4XMM"            'Geobase.afrc.af.mil
   .AddTopNavigationBar = True

   'Set your print header
   .PrintHeader = "<h1>AFRC Facility Data</h1><h2>@ReportTitle</h2>"

   'objWiz.UsePopupFilters = True

   'set other parameters if required
   .ShowInactiveButtons = True


   .UsePopupFilters = False
   .HideProcedures = True
   .HiddenFields = strDbCode

    'if an administrator
    If CInt(Session("UserSeqLevel"))>4 Then
        'do nothing - an administrator
    ElseIf CInt(Session("UserSeqLevel"))>2 Then
        'a data input clerk
        .CanDelete = False
    Else
        .IsAdmin = False
    End If
End With



'Make sure you initialize before adding any HTML text
'TODO: Change this to your actual connection tring
'objWiz.Init("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=D:\Databases\nwind.mdb;")
'objWiz.Init("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=E:\Inetpub\wwwroot\geobaseportal\aws_sample\data\sample.mdb;")
'objWiz.Init("Provider=OraOLEDB.Oracle;Data Source=afrctb;User Id=gen_mitchell;Password=gen_mitchell;")
'response.write(OraConn & "<br>" )
'response.write("Provider=OraOLEDB.Oracle;Data Source=afrctb;User Id=gen_mitchell;Password=gen_mitchell;" )

objWiz.Init(cstr(OraConn))

%>


<html>
  <head>
  <LINK href="styles.css" rel="stylesheet" type="text/css">

    <title>First Quarter Reports</title>
  </head>
  <body>

<%

targetstr="https://geobase.afrc.af.mil/geobase_resources/index.html" & chr(34) & " TARGET=" & chr(34) & "_top"

'objWiz.HomeUrl = "https://geobase.afrc.af.mil/geobase_resources/index.html TARGET=<%chr34"_parent "
objWiz.HomeUrl = targetstr
objWiz.Title = "Facility Reports"
objWiz.PrintFooter = "<p align='center'>© AFRC, 2005. All rights reserved</p>"

'put this where you want your reports
objWiz.DisplayReports

Set objWiz = Nothing

%>


Pages: (1)   [1]

search this forum: