index | search | no replies | posting guidelines | help login | register
Index » News » AspWebSolution News
search this forum:
:: Version 2.5.43 - HideReportsWithIDs :: (4)Post a Reply
Jun 28 2005, 5:03 AM
 Version 2.5.43 - HideReportsWithIDsPost a Reply
 ghost

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

from: Washington, DC

Version 2.5.43 of the Report Wizard has just been released.
This version features support for query string parameters being maintained accross state as requested by this post
This version also features a new property HideReportsWithIDs which can be used to hide individual reports. An example is shown below:

Dim strHiddenFields
strHiddenFields = Request("hf")

With objWiz
      .ReportsFile = "data/nwind.xml"
      .Title = "ASP Report Wizard v" & .Version
      .UsePopupFilters = False
     '.LocaleFile = "data/locale_es.xml"  
      .HideProcedures = True
      .HiddenFields = strHiddenFields
      .HideReportsWithIDs = "R1,R3,R10"
End With








-------------------------
Ghost
Jul 5 2005, 10:03 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

Hello,

I don't understand how this will maintain a query string parameter.  I have a parameter in my original URL ... http://localhost/default.asp?dbcode=1, where dbcode is used to build a connection string to a specific oracle database.  dbcode is not a field of the database.  It is used only to do a lookup on a function driven connection string in ASP.  When I click one of the built in features, such as a postback to print, doc, excel, csv, etc... I am not getting my dbcode param in the postback.  The origianal param string is not included in the postback.  How do I get it there?  Do I set it as a HiddenField?
If so, is it like....

strHiddenFields = "dbcode =1"

The examples seem to refer to hidden fields and all I reall want is the original param string passed along.

Thanks,
Tony Z.

Jul 6 2005, 3:37 PM
 Re: Version 2.5.43 - HideReportsWithIDsPost a Reply
 ghost

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

from: Washington, DC

You don't have to. Just use the Request object as shown below:

Dim strDbCode
strDbCode = Request("dbCode")



-------------------------
Ghost
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: