Filters 'OR' function not passing the values to the sql
Hi,
I am facing an issue with the 'OR' function on the filters that are used in the reports.
The report needs to fetch all the records on the three tables as the user enters the value in the dashboard prompts.
eg: [ update_dt_A1 is prompted
and user_name_A1 is prompted ]
or
[ update_dt_B1 is prompted
and user_name_B1 is prompted ]
or
[ update_dt_C1 is prompted
and user_name_C1 is prompted ]
The values entered in the dashboard prompt gets passed to the filter, but the vaules are not passed over to the SQL that runs on the database, hence the reports shows all values and does not reflect the values entered.
When the 'OR' function is replaced with 'AND' the values get passed to the SQL.
Can anyone help on what is the issue on the filters?
Thanks
Here is how my Filters are set up
Vendor Name is Prompted
AND
Vendor Number is Prompted
AND
[ [Last_update_date_Vendor is prompted
AND
User_name_Vendor is prompted]
OR
[Last_update_date_Site is prompted
AND
User_name_Site is prompted]
OR
[Last_update_date_Bank is prompted
AND
User_name_Bank is prompted]
The values from the dashboard prompts gets passed to the filter, but the sql that runs does not take the values in the where clause.
Similar Messages
-
Issue : In sharepoint 2013, I am experiening below error while using filter in the list view due to the number of items in this list exceeds the list view threshold, which is 10000 items. Tasks that cause excessive server load (such as those
involving all list items) are currently prohibited.
Error :cannot show the value of the filter.The Field may not be filterable or the number of items returned exceeds the list view threshold enforced by administrator
Could you please suggest a way to avoid this issue apart from incrementing the list view threshold limit .
PrashanthReorganizing content, or creating more specific views. sharepoint is warning you that the content is structured in such a way that it can cause performance issues, which should be addressed in some way.
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com -
Job scheduling(passing the values to the child program)
when i'm trying to schedule a background job(using job_open job_submit and job_close) i'm passing the values of the selection screen(parent program) to my child program using set parameter id. And trying to get the values using get parameter id in the cild program.
But the values of the parent program are not being passed to the child program what may be the cause for it?rathan,
Why con't you use
SUBMIT... [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>].
When you start an executable program, the standard selection screen normally appears, containing the selection criteria and parameters of both the logical database connected to the program and of the program itself (see Direct Execution - Reports). When you start an executable program using SUBMIT, there are various additions that you can use to fill the input fields on the selection screen:
SUBMIT... [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>].
These options have the following effects:
VIA SELECTION-SCREEN
The selection screen of the called executable program (report) appears. If you transfer values to the program using one or more of the other options, the corresponding input fields in the selections screen are filled. The user can change these values. By default, the system does not display a selection screen after SUBMIT.
USING SELECTION-SET <var>
This option tells the system to start the called program with the variant <var>.
WITH <sel> <criterion>
Use this option to fill individual elements <sel> of the selection screen (selection tables and parameters). Use one of the elements <criterion>:
<op> <f> [SIGN <s>], for single value selection
If <sel> is a selection criterion, use <op> to fill the OPTION field, <f> to fill the LOW field, and <s> to fill the SIGN field of the selection table <sel> in the called program.
If <sel> is a parameter, you can use any operator for <op>. The parameter <sel> is always filled with <f>.
[NOT] BETWEEN <f1> AND <f2> [SIGN <s>], for interval selection
<f1> is transferred into the LOW field, <f2> into the HIGH field, and <s> into the SIGN field of the selection table <sel> in the called program. If you omit the NOT option, the system places the value BT into the OPTION field; if you use NOT, the system fills OPTION with NB.
IN <seltab>, transferring a selection table
This addition fills the selection table <sel> in the called program with the values of the table <seltab> in the calling program. Table <seltab> must have the structure of a selection table. Use the RANGES statement to create selection tables.
WITH FREE SELECTION <freesel>, user dialog for dynamic selections
To use this option, the called program must be connected to a logical database that supports dynamic selections. In the calling program, use the function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. They allow the user to enter dynamic selections on a selection screen. One export parameter of these function modules has structure RSDS_TEXPR from the RSDS type group. Transfer the values of this export parameter by means of the internal table <freesel> of the same structure to the called report.
WITH SELECTION-TABLE <rspar>, dynamic transfer of values
You need an internal table <rspar> with the Dictionary structure RSPARAMS. The table then consists of the following six fields:
SELNAME (type C, length 8) for the name of the selection criterion or parameter
KIND (type C, length 1) for the selection type (S for selection criterion, P for parameter)
SIGN, OPTION, LOW, HIGH as in a normal selection table, except that LOW and HIGH both have type C and length 45.
This table can be filled dynamically in the calling program with all of the required values for the selection screen of the called program. If the name of a selection criterion appears more than once, the system creates a multiple-line selection table for that criterion in the called program. If the name of a parameter appears more than once, the system uses the last value. Note that LOW and HIGH have type C, so that the system executes type conversions to the criteria of the called program. This is important for date fields, for example. Before your program is used in a live context, you should check it using the VIA SELECTION-SCREEN addition.
Except for WITH SELECTION-TABLE, you can use any of the above options several times and in any combination within a SUBMIT statement. In particular, you can use the WITH <sel> option several times for one single criterion <sel>. In the called program, the system appends the corresponding lines to the selection tables used. For parameters, it uses the last value specified. The only combination possible for the WITH SELECTION-TABLE option is USING SELECTION-SET.
If the input fields on the selection screen are linked to SPA/GPA parameters, you can also use this technique to pass values to the selection screen (see Passing Data Between Programs).
The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
REPORT demo_program_submit_rep1.
DATA number TYPE i.
PARAMETERS paramet(14) TYPE c.
SELECT-OPTIONS selecto FOR number.
The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
DATA: int TYPE i,
rspar TYPE TABLE OF rsparams,
wa_rspar LIKE LINE OF rspar.
RANGES seltab FOR int.
WRITE: 'Select a Selection!',
SKIP.
FORMAT HOTSPOT COLOR 5 INVERSE ON.
WRITE: 'Selection 1',
/ 'Selection 2'.
AT LINE-SELECTION.
CASE sy-lilli.
WHEN 4.
seltab-sign = 'I'. seltab-option = 'BT'.
seltab-low = 1. seltab-high = 5.
APPEND seltab.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH paramet eq 'Selection 1'
WITH selecto IN seltab
WITH selecto ne 3
AND RETURN.
WHEN 5.
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
wa_rspar-low = 14. wa_rspar-high = 17.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
wa_rspar-low = 'Selection 2'.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
wa_rspar-low = 10.
APPEND wa_rspar TO rspar.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar
AND RETURN.
ENDCASE.
Pls. reward if useful... -
How to pass a value from the report to a form ( BIT OF URGENT ).
Hi,
I had created a "Form on a Table with Report" on the report I had remove the edit link and set one of the column feilds that functionality. Now I want to know how to pass that value that is clicked ( having hyper link ) on to the form where it runs a SQL query and then displays the reuslts on the form.
Illustrating with an example.
I am having these following columns on the report ( these are the results for the join statement )
JOBNUM JOBNAME DEPTNUMBER SAL EMPNO LNAME FNAME
In the above JOBNUM is having Hyper link as I removed the edit image.
Now this is area I am having problem. When the user clicked on the JOBNUM then on form it should display 20 other columns( pulled from 5 other tables ) which are related to that particualr JOBNUM.
Anybody give me a solution in which area I have to include my SQL statement and how to pass that selected value to that SQL statement.
Cheers,
KrishnaHi Ron,
I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
Thanks for your help in advance.
Cheers,
Krishna. -
Passing multiple values to the QUERY BDOC parameter?
hi All,
Below is my Query BDOC Anchor Before Query Execute even handler... I'm trying to pass multiple values to the bq.Z_PartnerFunction query parameter... i.e.
PARTNER_FCT in( '00000012','ZDIVMGR','ZAREADR')
is it possible without creating new Query Bdoc ?
====================================
Private Sub aempchoicewinTCWSearchTAnchor_beforeQueryExecute(ByRef bq As BusinessQuery, ByRef cancel As Boolean)
If Not bq Is Nothing Then
If sWcDummy = "Yes" Then
bq.WcDummy = sWcDummy
End If
bq.Z_PartnerFunction = "00000012"
If ctrlZ_Territory.Value <> "" Then
bq.PRNB_TerrID = "*" & ctrlZ_Territory.Value
End If
End If
End Sub
================================
Thanks in advance
HetalHi,
it looks that you already enhanced the query BDoc because you have a new query parameter bq.Z_PartnerFunction, right?
To which BDoc parameter is this BQ parameter mapped? And how looks the related where clause?
For a single filter normally a "=" operator is used. Therefore your example with "in" won't work.
If these three partner functions are fixed then you might hardcoded them directly in the where clause (supposed the BDoc is not used somewhere else where you don't want to have this filter).
Or you might add 3 new BDoc parameters, add 3 new where clauses using a disjunction for them (and using an embracing bracket). In this case always all these 3 BQ parameters need to be filled (or all stay empty) to avoid a SQL syntax error.
Regards,
Wolfhard -
XMLTABLE function not returning any values if xml has attribute "xmlns"
Hi,
XMLTABLE function not returning any values if xml has attribute "xmlns". Is there way to get the values if xml has attribute as "xmlns".
create table xmltest (id number(2), xml xmltype);
insert into xmltest values(1,
'<?xml version="1.0"?>
<emps>
<emp empno="1" deptno="10" ename="John" salary="21000"/>
<emp empno="2" deptno="10" ename="Jack" salary="310000"/>
<emp empno="3" deptno="20" ename="Jill" salary="100001"/>
</emps>');
insert into xmltest values(2,
'<?xml version="1.0"?>
<emps xmlns="http://emp.com">
<emp empno="1" deptno="10" ename="John" salary="21000"/>
<emp empno="2" deptno="10" ename="Jack" salary="310000"/>
<emp empno="3" deptno="20" ename="Jill" salary="100001"/>
</emps>');
commit;
SELECT a.*
FROM xmltest,
XMLTABLE (
'for $i in /emps/emp
return $i'
PASSING xml
COLUMNS empno NUMBER (2) PATH '@empno',
deptno NUMBER (3) PATH '@deptno',
ename VARCHAR2 (10) PATH '@ename',
salary NUMBER (10) PATH '@salary') a
WHERE id = 1;
The above query returning results but below query is not returning any results because of xmlns attribute.
SELECT a.*
FROM xmltest,
XMLTABLE (
'for $i in /emps/emp
return $i'
PASSING xml
COLUMNS empno NUMBER (2) PATH '@empno',
deptno NUMBER (3) PATH '@deptno',
ename VARCHAR2 (10) PATH '@ename',
salary NUMBER (10) PATH '@salary') a
WHERE id = 1;
how to get rid out of this problem.
Thanks,
-ManiAdded below one in xmltable, its working now.
XmlNamespaces(DEFAULT 'http://emp.com') -
//Initialize the Engine
EngineClass myEngine = new EngineClass();
myEngine.LoadTypePaletteFilesEx(TypeConflictHandlerTypes.ConflictHandler_Prompt, 0);
Step myStep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname,StepTypes.StepType_Action);
myStep.Name = "object";
DotNetModule dotnetmodule = myStep.Module as DotNetModule;
dotnetmodule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File,@"C:sequence.dll");
dotnetmodule.ClassName = "CN";
dotnetmodule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
dotnetmodule.MemberName = "ISI";
mySequence.Locals.NewSubProperty("object", PropertyValueTypes.PropValType_Reference, false, "", 0);
Sequence mySequence = myEngine.NewSequence();
mySequence.Locals.NewSubProperty(varName, PropertyValueTypes.PropValType_Reference, false, String.Empty, 0);
mySequence.InsertStep(myStep, 0, StepGroups.StepGroup_Main);
SequenceFile seqFile = myEngine.NewSequenceFile();
seqFile.InsertSequence(mySequence);
seqFile.Save("C:\\mySeq.seq");
I have done this,dynamically creating a sequence file in teststand programatically through c#.
Problem is
1.I created an action step and object Reference variable for the step, but i am not able to pass parameter values to the objectReference
2.I am not able to load the sequence in to the main Sequence of the sequence file in the teststand. How can I do these two things.Hi,
have you ever followed on my Links ?!?!?
If not please jump to this one
http://forums.ni.com/ni/board/message?board.id=330&thread.id=26880
and read the the answer from Mannoch
starting with this words:
Anthony -
Currently, functionality for retrieving the Metadata Token for a class constructor or member is not fully provided in the TestStand .NET Adapter API. The DotNetModule.GetConstructorMetadataToken() and DotNetModule.GetMetadataToken() methods only return the correct Metadata Token when the member/constructor prototypes have already been loaded. Thus, in the case of your code, when you call DotNetModule.GetMetadataToken(), the method is returning -1 because the member prototype for the Step you are referring to has not yet been loaded.
That means have to do a workaround for your stuff.
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e= -
TryParse not passing correct values?
All,
I'm trying to parse text box input to an integer. Then based on the value of that integer a sub will set values for various other variables (integers). Then the integers that are obtained from the sub are passed to a sb.appendline.
I am doing this for about 20 text boxes. However, sometimes it works and sometimes it doesn't. Sometimes every line in the text file will contain the correct quotas (integers). Sometimes the first line in the text file contains
all zeros for the quotas and the rest of the lines in the text file contain the correct quotas. Sometimes all of the lines will contain either incorrect values for the quotas or all zeros for the quotas.
I am baffled as to why. Any help would be greatly appreciated.
James
Public Class Form1
Public inBW As Integer
Public outBW As Integer
Public inTCP As Integer
Public inUDP As Integer
Public inICMP As Integer
Public inIGMP As Integer
Public outTCP As Integer
Public outUDP As Integer
Public outICMP As Integer
Public outIGMP As Integer
Public tempInt As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim FileName As String
Dim FileNameAndPath As String
FileName = "Test.txt"
FileNameAndPath = IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, FileName)
Dim sb As New System.Text.StringBuilder
'Get Bandwidth 1 Quotas
Integer.TryParse(txtInboundBW1.Text, inBW)
Integer.TryParse(txtOutboundBW1.Text, outBW)
Get_Quotas()
'Write Bandwidth 1 quotas to file
sb.AppendLine(("create Quotas -bw_in ") & txtInboundBW1.Text & (" -bw_out ") & txtOutboundBW1.Text & (" -in_tcp_quota " & inTCP & " -in_udp_quota " & inUDP & " -in_icmp_quota " & inICMP & " -in_igmp_quota " & inIGMP & " -out_tcp_quota " & outTCP & " -out_udp_quota " & outUDP & " -out_icmp_quota " & outICMP & " -out_igmp_quota " & outIGMP))
'Get Bandwidth 2 Quotas
Integer.TryParse(txtInboundBW2.Text, inBW)
Integer.TryParse(txtOutboundBW2.Text, outBW)
Get_Quotas()
'Write Bandwidth 2 quotas to file
sb.AppendLine(("create Quotas -bw_in ") & txtInboundBW2.Text & (" -bw_out ") & txtOutboundBW2.Text & (" -in_tcp_quota " & inTCP & " -in_udp_quota " & inUDP & " -in_icmp_quota " & inICMP & " -in_igmp_quota " & inIGMP & " -out_tcp_quota " & outTCP & " -out_udp_quota " & outUDP & " -out_icmp_quota " & outICMP & " -out_igmp_quota " & outIGMP))
SaveFileDialog1.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.Desktop
SaveFileDialog1.FileName = FileName
SaveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
IO.File.WriteAllText(SaveFileDialog1.FileName, sb.ToString)
Process.Start(SaveFileDialog1.FileName)
End If
End Sub
Public Sub Get_Quotas()
'5,000 kbps = 80,50,10,10
'10,000 kbps = 75,50,9,9
'100,000 kbps= 75,50,2,2
'1,000,000 kbps= 75,50,1,1
'10,000,000 kbps= 75,50,1,1
'40,000,000 kbps= 75,50,1,1
If inBW > 0 And inBW <= 5000 Then
inTCP = 80
inUDP = 50
inICMP = 10
inIGMP = 10
End If
If outBW > 0 And outBW <= 5000 Then
outTCP = 80
outUDP = 50
outICMP = 10
outIGMP = 10
End If
If inBW > 5000 And inBW <= 10000 Then
inTCP = 70
inUDP = 50
inICMP = 9
inIGMP = 9
End If
If outBW > 5000 And outBW <= 10000 Then
outTCP = 70
outUDP = 50
outICMP = 9
outIGMP = 9
End If
If inBW > 10000 And inBW <= 100000 Then
inTCP = 70
inUDP = 50
inICMP = 2
inIGMP = 2
End If
If outBW > 10000 And outBW <= 100000 Then
outTCP = 70
outUDP = 50
outICMP = 2
outIGMP = 2
End If
If inBW > 100000 And inBW <= 4000000 Then
inTCP = 70
inUDP = 50
inICMP = 1
inIGMP = 1
End If
If outBW > 100000 And outBW <= 4000000 Then
outTCP = 70
outUDP = 50
outICMP = 1
outIGMP = 1
End If
End Sub
End ClassVersion with XML comments (IntelliSense support):
Option Strict On
Option Explicit On
Option Infer Off
Namespace James
Public Class BandwidthPolicy
''' <summary>
''' An enumerator for the policy type (currently five).
''' </summary>
''' <remarks></remarks>
Public Enum PolicyType
Global_Policy
Web_Policy
Mail_Policy
FTP_Policy
DNS_Policy
End Enum
Private _global_PolicyQuota As BandwidthQuota
Private _web_PolicyQuota As BandwidthQuota
Private _mail_PolicyQuota As BandwidthQuota
Private _fTP_PolicyQuota As BandwidthQuota
Private _dNS_PolicyQuota As BandwidthQuota
Public Sub New()
End Sub
''' <summary>
''' Gets the DNS policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property DNS_PolicyQuota As BandwidthQuota
Get
Return _dNS_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the FTP policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property FTP_PolicyQuota As BandwidthQuota
Get
Return _fTP_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the Global policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Global_PolicyQuota As BandwidthQuota
Get
Return _global_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the Mail policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Mail_PolicyQuota As BandwidthQuota
Get
Return _mail_PolicyQuota
End Get
End Property
''' <summary>
''' Gets the Web policy quota.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Web_PolicyQuota As BandwidthQuota
Get
Return _web_PolicyQuota
End Get
End Property
''' <summary>
''' A method to set the policy quota for any of the policy types.
''' This method requires that you have already created/initialized
''' the BandwidthQuota.
''' </summary>
''' <param name="type">The enumerator to indicate which policy type
''' to initialize.</param>
''' <param name="bq">The instance of PolicyType to set this policy
''' to.</param>
Public Sub SetPolicy(ByVal type As PolicyType, _
ByVal bq As BandwidthQuota)
Try
Select Case type
Case PolicyType.DNS_Policy
_dNS_PolicyQuota = bq
Case PolicyType.FTP_Policy
_fTP_PolicyQuota = bq
Case PolicyType.Global_Policy
_global_PolicyQuota = bq
Case PolicyType.Mail_Policy
_mail_PolicyQuota = bq
Case PolicyType.Web_Policy
_web_PolicyQuota = bq
End Select
Catch ex As Exception
Throw
End Try
End Sub
''' <summary>
''' A method to set the policy quota for any of the policy types.
''' This method will create/initialize the BandwidthPolicy for any
''' of the policy types.
''' </summary>
''' <param name="type">The enumerator to indicate which policy
''' type to initialize.</param>
''' <param name="bandwidthIn">The bandwidth input value.</param>
''' <param name="bandwidthOut">The bandwidth output value.</param>
''' <remarks></remarks>
Public Sub SetPolicy(ByVal type As PolicyType, _
ByVal bandwidthIn As Integer, _
ByVal bandwidthOut As Integer)
Try
Select Case type
Case PolicyType.DNS_Policy
_dNS_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.FTP_Policy
_fTP_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.Global_Policy
_global_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.Mail_Policy
_mail_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
Case PolicyType.Web_Policy
_web_PolicyQuota = New BandwidthQuota(bandwidthIn, bandwidthOut)
End Select
Catch ex As Exception
Throw
End Try
End Sub
''' <summary>
''' A method which will return a formatted string indicating the
''' values of the BandwidthQuota for any of the policy types.
''' </summary>
''' <param name="type">The enumerator to indicate which policy type
''' to retrieve.</param>
''' <param name="throwIfNotInitialized">OPTIONAL: A boolean value
''' indicating whether or not to throw an exception if the policy
''' type chosen has not been initialized. Default: False.</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function GetFormattedString(ByVal type As PolicyType, _
Optional ByVal throwIfNotInitialized As Boolean = False) As String
Dim retVal As String = String.Empty
Try
Dim bq As BandwidthQuota
Select Case type
Case PolicyType.DNS_Policy
If _dNS_PolicyQuota.BW_In > 0 AndAlso _dNS_PolicyQuota.BW_Out > 0 Then
bq = _dNS_PolicyQuota
With bq
retVal = _
String.Format("create DNSPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The DNS policy has not been initialized.")
End If
End If
Case PolicyType.FTP_Policy
If _fTP_PolicyQuota.BW_In > 0 AndAlso _fTP_PolicyQuota.BW_Out > 0 Then
bq = _fTP_PolicyQuota
With bq
retVal = _
String.Format("create FTPPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The FTP policy has not been initialized.")
End If
End If
Case PolicyType.Global_Policy
If _global_PolicyQuota.BW_In > 0 AndAlso _global_PolicyQuota.BW_Out > 0 Then
bq = _global_PolicyQuota
With bq
retVal = _
String.Format("create GlobalPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The Global policy has not been initialized.")
End If
End If
Case PolicyType.Mail_Policy
If _mail_PolicyQuota.BW_In > 0 AndAlso _mail_PolicyQuota.BW_Out > 0 Then
bq = _mail_PolicyQuota
With bq
retVal = _
String.Format("create MailPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The Mail policy has not been initialized.")
End If
End If
Case PolicyType.Web_Policy
If _web_PolicyQuota.BW_In > 0 AndAlso _web_PolicyQuota.BW_Out > 0 Then
bq = _web_PolicyQuota
With bq
retVal = _
String.Format("create WebPolicy" & _
" -bw_in {0}" & _
" -bw_out {1}" & _
" -in_tcp_quota {2}" & _
" -in_udp_quota {3}" & _
" -in_icmp_quota {4}" & _
" -in_igmp_quota {5}" & _
" -out_tcp_quota {6}" & _
" -out_udp_quoata {7}" & _
" -out_icmp_quota {8}" & _
" -out_igmp_quota {9}", _
.BW_In, .BW_Out, .TCP_In, _
.UDP_In, .ICMP_In, .IGMP_In, _
.TCP_Out, .UDP_Out, .ICMP_Out, _
.IGMP_Out)
End With
Else
If throwIfNotInitialized Then
Throw New ArgumentException("The Web policy has not been initialized.")
End If
End If
End Select
Catch ex As Exception
Throw
End Try
Return retVal
End Function
End Class
Public Structure BandwidthQuota
Private Enum InOut
Input
Output
End Enum
''' <summary>
''' Gets the minimum value for bandwidth.
''' </summary>
''' <remarks>Note that this is "hard-coded".</remarks>
Public Shared ReadOnly MinValue As Integer = 1
''' <summary>
''' Gets the maximum value for bandwidth.
''' </summary>
''' <remarks>Note that this is "hard-coded".</remarks>
Public Shared ReadOnly MaxValue As Integer = 40000000
Private _bW_In As Integer
Private _bW_Out As Integer
Private _tCP_In As Integer
Private _tCP_Out As Integer
Private _uDP_In As Integer
Private _uDP_Out As Integer
Private _iCMP_In As Integer
Private _iCMP_Out As Integer
Private _iGMP_In As Integer
Private _iGMP_Out As Integer
''' <summary>
''' The constructor for this structure.
''' </summary>
''' <param name="bandwidthIn">The value of the input bandwidth.</param>
''' <param name="bandwidthOut">The value of the output bandwidth.</param>
''' <remarks></remarks>
Public Sub New(ByVal bandwidthIn As Integer, _
ByVal bandwidthOut As Integer)
Try
If bandwidthIn < MinValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth In", _
"The minimum value is " & _
MinValue.ToString & _
" kBPS")
ElseIf bandwidthIn > MaxValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth In", _
"The maximum value is " & _
MaxValue.ToString & _
" kBPS")
ElseIf bandwidthOut < MinValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth Out", _
"The minimum value is " & _
MinValue.ToString & _
" kBPS")
ElseIf bandwidthOut > MaxValue Then
Throw New _
ArgumentOutOfRangeException("Bandwidth Out", _
"The maximum value is " & _
MaxValue.ToString & _
" kBPS")
Else
_bW_In = bandwidthIn
_bW_Out = bandwidthOut
ComputeValues(bandwidthIn, InOut.Input)
ComputeValues(bandwidthOut, InOut.Output)
End If
Catch ex As Exception
Throw
End Try
End Sub
''' <summary>
''' Gets the value of the input bandwidth.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property BW_In() As Integer
Get
Return _bW_In
End Get
End Property
''' <summary>
''' Gets the value of the output bandwidth.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property BW_Out() As Integer
Get
Return _bW_Out
End Get
End Property
''' <summary>
''' Gets the value for the input ICMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property ICMP_In() As Integer
Get
Return _iCMP_In
End Get
End Property
''' <summary>
''' Gets the value for the output ICMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property ICMP_Out() As Integer
Get
Return _iCMP_Out
End Get
End Property
''' <summary>
''' Gets the value for the input IGMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property IGMP_In() As Integer
Get
Return _iGMP_In
End Get
End Property
''' <summary>
''' Gets the value for the output IGMP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property IGMP_Out() As Integer
Get
Return _iGMP_Out
End Get
End Property
''' <summary>
''' Gets the value for the input TCP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property TCP_In() As Integer
Get
Return _tCP_In
End Get
End Property
''' <summary>
''' Gets the value for the output TCP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property TCP_Out() As Integer
Get
Return _tCP_Out
End Get
End Property
''' <summary>
''' Gets the value for the input UDP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property UDP_In() As Integer
Get
Return _uDP_In
End Get
End Property
''' <summary>
''' Gets the value for the output UDP.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property UDP_Out() As Integer
Get
Return _uDP_Out
End Get
End Property
Private Sub ComputeValues(ByVal value As Integer, _
ByVal io As InOut)
If value > 0 AndAlso value <= 5000 Then
SetValues(80, 50, 10, 10, io)
ElseIf value > 5000 AndAlso value <= 10000 Then
SetValues(75, 50, 9, 9, io)
ElseIf value > 10000 AndAlso value <= 100000 Then
SetValues(75, 50, 2, 2, io)
ElseIf value > 100000 AndAlso value <= 40000000 Then
SetValues(75, 50, 1, 1, io)
End If
End Sub
Private Sub SetValues(ByVal tcp As Integer, _
ByVal udp As Integer, _
ByVal icmp As Integer, _
ByVal igmp As Integer, _
ByVal io As InOut)
Select Case io
Case InOut.Input
_tCP_In = tcp
_uDP_In = udp
_iCMP_In = icmp
_iGMP_In = igmp
Case InOut.Output
_tCP_Out = tcp
_uDP_Out = udp
_iCMP_Out = icmp
_iGMP_Out = igmp
End Select
End Sub
End Structure
End Namespace
Still lost in code, just at a little higher level. -
Not able to get the value in the next page
Hi,
I am newbee for JSF and this question may sound silly. I tried to search through this
forum, google....but did not find a solution....I hope some one here could please help
me :-(
I have Page1 and Page2. Page1 has a h:inputText field and a submit button.
On click of the "Submit" button in Page1, I have to pass this text value entered by
the user to Page2. In Page2, I have <h:inputText readonly="true" /> field,
which will display the value that the user entered in Page1. Also, Page2 has a "Submit"
button. On click of Page2.Submit button, the value displayed in the Page2.textfield
is not getting populated to the Page2 bean attribute.
Here are the code that I am using
1. Page1:
<f:view>
<h:form id="Page1">
<h:inputText id="primaryKey" required="true" value="#{Page1.primaryKey}" />
<h:commandButton id="command" value="Submit" action="Page1"/>
</h:form>
</f:view>
2. Page2:
<f:view>
<h:form id="Page2">
// Yes, Value attribute points to Page1.primaryKey to display user entered value in this page.
<h:inputText id="test" value="#{Page1.primaryKey}" readonly="true" />
<h:commandButton id="command" value="Submit" action="#{Page2.save()}"/>
</h:form>
</f:view>
3. faces-config.xml
<navigation-rule>
<from-view-id>/Page1.jsp</from-view-id>
<navigation-case>
<from-outcome>Page1</from-outcome>
<to-view-id>/Page2.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>Page1</managed-bean-name>
<managed-bean-class>com.Page1Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/Page2.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/success.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>Page2</managed-bean-name>
<managed-bean-class>com.Page2Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
4. com.Page1Bean.java
public class Page1Bean {
private String primaryKey;
//getter and setter method below
5. com.Page2Bean.java
public class Page2Bean {
private String test;
//getter and setter method below
public String save() {
Now let me explain my issue, I enter a value in Page1 -> click on submit -> I see this value in the text field of
Page2. But when I click on submit button of Page2, test attribute is still null. Could you please suggest me what
am I suppose to do inorder to get this value in Page2Bean when I click on save button?
Hope to listen from one of you,
Thank you,
VinodRamuGo here
http://jsffaq.com/
Many of your questions will be answered -
How to Pass Parameter/Value to the second page????
Hi,
I am trying to display same popup window when I click on ADD,UPDATE and VIEW buttons. I don’t have any problem in displaying the popup when I click on ADD and UPDATE button but with VIEW button I wanted to display the popup at read only mode. In order to do that I have created a bean with session scope and set a ‘SetActionListener‘on VIEW button and set ‘from’ property to true and ‘to’ property to "#{IndividualSummaryDetails.readOnlyAddress}". I could not pass the value of readOnlyAddress to the popup. How can I pass the value of readOnlyAddress to the popup?
This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
Here is my View button
<af:commandButton text="#{CoreProperties['Global.commandButton.View']}"
windowHeight="450" windowWidth="600"
useWindow="true"
action="dialog:FromIndividualSummaryDetailsToAddress"
id="justView">
<af:setActionListener from="#{true}"
to="#{IndividualSummaryDetails.readOnlyAddress}"/>
Here is my Bean
public class IndividualSummaryDetails {
private Boolean readOnlyAddress;
public IndividualSummaryDetails() {
readOnlyAddress = true;
public Boolean isReadOnlyAddress() {
return readOnlyAddress;
public void setReadOnlyAddress(Boolean readOnlyAddress) {
this.readOnlyAddress = readOnlyAddress;
This value becomes true when I click on view button. If I pass that value to the popup then I can set the read only property of the fields on the popup with that value. So that the fields become read only.
Message was edited by:
V.PirabaWe need to use portlet events for sending parameters across different pages.
Following documents can give you insight on this :
1. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/PRIMER.PORTLET.PARAMETERS.EVENTS.HTML
2. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/DESIGNING.PAGES.USING.PDKJAVA.SAMPLE.EVENT.WEB.PROVIDER.HTML
-AMJAD. -
Passing the values from the graph when we use Navigate to the BI Content
Hi,
The following are the problems which we are facing when navigating to the other BI report.
1)When using the “Navigate to BI content” action the values are not getting passed to the detail report from the graph. Is there any limitation or any alternative to make it work?
When I click on the Bar graph I need to pass the corresponding period and the dimension (EX: Operating Unit – Vision Services R+D) to the detail report.
2)I have tried using the “Navigate to Web page” action. I am able to pass the values but the page is getting opened in another window. I want that page to be opened in the same window so that my presentation variable values are not lost.
3)When I click on the bar graph, I am able to pass the values period and operating unit. But my presentation variable values are lost. I want to retain them.
Please help me out in achieving this scenario.
Thanks,
ChaithanyaHi,
In the column properties give the navigation to other reports from the interaction tab and make a chart with the column and in the dashboard -->edit dashboard-->in the section where the report is placed--->give 'drill in place'.
Regards
MuRam
NOTE: Please mention if this resolved your problem/still facing and close the thread. -
PASSING EMPTY VALUES TO THE REPORT
Hello,
I am having an issue with generating reports published on Crystal XI Server.
When I do not pass any value for a parameter and try generating the report, an error is occurred which says "REPORT LINKING ERROR - There was an error in launching the viewer: empty String".
Crystal Version 9 reports are fine even if I do not pass any value to a parameter.
Can anyone help me out in resolving this issue?
Thanks,
BK.You may refer to the article:
http://wiki.sdn.sap.com/wiki/display/BOBJ/WebItrick-drillamongmultiplereports
And you will find out the way to transfer the all value. -
Passing different values to the same servlet
Hi,
Is there a way to pass different values to the same servlet?
Background:
I have a database that I query to acquire a list of customers, then I show each customer as a link, that when clicked will show details of that customer. (The customer table is dynamic so I can't create a new page for each customer)
When using JSP what I do is
//Do query database
while (rst.next())
String cust = rst.getString ("cust");
out.write("<a href = \"cust2.jsp?cust=" + cust + " \" >" + cust + "</a> ");
}Then on the cust2.jsp. I will use
String str = request.getParameter ("cust");to acquire the customer to get details of.
Is there a way to do the same using servlets?
I could swap to JSP when creating this particular part of the project but it won't look good and it would help me learn a few things when there is another way.I want to know if there is a way to pass a variable from a webpage link like in my JSP example using servlets.
Here is what I wanted to do:
I have a webpage that contains customer names and each name has a link to the same servlet (let's say the link is famia/servb). I want servb to show detailed information about the customer my visitor clicked in the webpage.
The logic I was thinking is to pass a variable to this servlet, then I can use that variable to know which customer should I query in my database. So that I can show the details to my users.
Here lies my problem, I don't know how I can pass this variable, or even know which customer my visitor clicked. I can't use a new servlet for each client since the customer is in a database and if my customer base grows then I would need to create a lot more web page that does the same thing.
The JSP example I gave is how I will be coding it if I am using JSP, but now I am using servlets. So I was wodnering if there is a way to do this using servlet. Or should I stay with using JSP for this particular logic and just call servb after the JSP page acquired the variable.
I'm trying not to use "<original URL> + ? + <variable> = <value>" (eg: http://www.famia.net/customer?cust=famia) as the means for passing the variable. (or in the example as a means of passing variable cust with value famia) -
Passing variable values to the navigation block
Hi WAD Experts,
I have a requirement regarding passing variable values to the navigation block. User requirement is first give the selections on the selection screen and then after executign output should display in browser. In the output page we have a navigation block. So when user gives selections those selections should also populate in the navigation block. Your help will be appreciated.
Prasad.Hi,
if your variable is 'Changeable at Query Navigation' the chosen values will appear in the Navigationblock.
Variables which are 'Not Changeable at Query Navigation'
will not appear.
You can set this Property when you create a Variable.
Kind Regards,
Alican Polat -
How can I pass a value to the command prompt?
I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?
Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
There are also overloaded forms of exec(),
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
Another lower level approach that does not require extension associations to be quite as well set up is:
Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
Note that
rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
Start the script with #!bash or whatever the interpreter's name is.
Mark the script file itself with the executable attribute.
Alternatively start the script interpreter, e.g.
Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";
Maybe you are looking for
-
My website is not showing up at all
I recently published my domain www.danielrentals.com, and its not showing up in any browser after publishing to Business Catalyst. I have change the name servers with my domain registrar, and have reached out to their tech support, but they are limi
-
How can I check email from 2 Apple IDs on my Mac?
Since recently, I can´t check my .me mail account any more on my Macbook any more. I have 2 Apple IDs, and the main one is another email address (which I need, too). Therefore, I can´t access the .me email any more from my Mac. Will I have to buy a W
-
Printing event start and stop times
In month view, is there any way to have both the start and stop times for an event show when you print the calendar so you can see the duration of an event - thanks.
-
Invoking a web service from ODI
Hi All, I am using the Odi Invoke Web Sevice functionality to inoke a web service(BPEL). I was able to successfully invoke this in couple of environments. The same code deployed in a particular environment is failing at this stage with an error messa
-
Toshiba A60 USB 2.0 Host Controller, Can Anyone Help?
Hi everyone, I recentry purchased a new Toshiba Satellite A60 notebook. Of course, instantly I formatted it, and installed XP Pro, because I didn't need half the programs that the laptop comes installed with. Problem is now that all they gave me was