How do I convert the following code from crystal reports to Reporting Services?
stringvar rbt := "";
if { param} = -1 then rbt := "ALL | " else rbt := {rptStoreMasterByDC;1.RegionName} + " | ";
if {param2} = -1 then rbt := rbt + "ALL | " else rbt := rbt + {rptStoreMasterByDC;1.BranchName} + " | ";
if {param3} = -1 then rbt := rbt + "ALL" else rbt := {rptStoreMasterByDC;1.TerritoryName};
rbt
Add a customer code in the report. Call it from the report tablix cell using expression. Pass param,param2,param3, RegionName, BranchName, TerritoryName as parameters of the custom function/procedure.
Refer http://technet.microsoft.com/en-us/library/ms156028.aspx
The custom code will look like as below.
Public Function ChangeWord(ByVal param As Integer,ByVal param2 As Integer,ByVal param3 As Integer,ByVal RegionName As String,ByVal BranchName As String,ByVal param As Territory) As String
Dim s as string
If param = -1 then s = "ALL |" else s = RegionName & "|"
If param2 = -1 then s = s & "ALL |" else s = BranchName & "|"
If param3 = -1 then s = s & "ALL" else s = TerritoryName
Return s
End Function
Regards, RSingh
Similar Messages
-
How can we remove the following zeros from quantity field ?
Hi All.
how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
eg:getting output zqty = 2.000
but i need zqty = 2.
help me to reslove this issue.
Regards.
jayHi,
While populating the field catlog do the following thing to avoid zeros.
wa_fieldcat-tabname = 'I_OUTPUT'. " Curr
wa_fieldcat-fieldname = 'FWAER'.
wa_fieldcat-seltext_l = text-023.
wa_fieldcat-no_zero = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Thanks,
Khushbu. -
How can i get the source code from java concurrent program in R12
Hi 2 all,
How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
Regards,
Zulqarnainuser570667 wrote:
Hi 2 all,
How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
Regards,
ZulqarnainDid you see old threads for similar topic/discussion? -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Java+AND+Concurrent+AND+Source+AND+Code&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
How do i remove the restriction code from my iphone 4s? i forgot it
How do i remove the restriction code from my IPHONE 4S? I have forgotten what it is. PLEASE HELP!!!
If you lose or forget a restriction passcode, you will need to perform a factory restore to remove it.
That is what it says here http://support.apple.com/kb/ht4213
Message was edited by: Ocean20 -
How do I get the java code from a class file ?
I want to know how to findout the java code from a .class file . Is there any utility or any way to get the java code from a .class file. If so , please let me know the step by step procedure .
Thanks
ShivaCheck out Mocha (http://www.brouhaha.com/~eric/computers/mocha.html)
It's free! -
Whenever I try to compile any code the following messagem appears: "greeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo."
I'm using CodeBlocks v. 13.12. Its file (codeblocks-2.app) is inside the App folder.I suggest you ask whomever makes CodeBlocks.
They would be the most knowledgeable. -
if @CustNo = '0142' begin insert #custnos (CustNo, ClientNo) values ('0142', '1100') ,('0142', '1200') ,('0142', '1201') ,('0142', '1700') ,('0142', '1602') ,('0142', '1202') ,('0142', '1603') ,('0142', '2002') endstore procUSE ODSSupport
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.pr_Load_PASOArgusClaims_Work') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
drop procedure dbo.pr_Load_PASOArgusClaims_Work
IF OBJECT_ID ('dbo.pr_Load_PASOArgusClaims_Work') IS NOT NULL
PRINT '<<< FAILED DROPPING PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
ELSE
PRINT '<<< DROP PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
END
GO
CREATE PROC dbo.pr_Load_PASOArgusClaims_Work
@BatchNo varchar(7) = null,
@CustNo char(4) = null,
@NewBatchNo varchar(7) = null
AS
/* Object dbo.pr_Load_PASOArgusClaims_Work 2006234 */
-- SSR# : 2242
-- Date : 12/23/2005
-- Author : Roxy Newbill
-- Description : Add new PASO BCAT 1602
-- SSR# 1932 - 2/22/2006 SEN - Add logic to include only ArgusCustNo - 0142
-- and change PharmacyClaim.ProcessDate to DateWritten
-- SSR# : 2419
-- Date : 08/22/2006
-- Author : Betty Doran
-- Description : PASO reports project
-- Correct mapping of Dispense fee amt from 'AmtProfFee' to 'DispenseFee' -
-- Mapping changed by Argus - did not inform PHP. Used in calcs for mClaimTotAmtCharge and
-- mClaimAmtAllowed fields.
-- SSR# : 2496
-- Date : 06/27/2007
-- Author : Roxy Newbil
-- Description : PASO Reporting Project
-- Add data load for new columns: Prescription No, Drug Name, NDC
-- SSR# : PEBB PROJECT
-- Date : 10/13/2009
-- Author : Tj Meyer
-- Description : Add BCAT 1201 for new PEBB business--
-- SSR# : 132707
-- Date : 12/17/2009
-- Author : Terry Phillips
-- Description : PASO Reporting Project
-- Fix data length issues for Argus_SubGroupId,Argus_PlanCode,vchParticipantId,
-- vchProviderId
-- SSR# : 3253
-- Date : 03/28/2011
-- Author : Susan Naanes
-- Description : PrescriptionNo increased in size from 7 to 12 characters
-- SSR# : SPOCK project
-- Date : 08/09/2012
-- Author : Raymond Beckett
-- Description : Modifed to bring in RxKey from PharmacyClaim instead of using identity value for iRecId
-- Also, modified to load any new batches since last batch loaded into PASOArgusClaims
-- if @BatchNo not supplied
-- Various 'fixes'
-- - removed grouping from initial query due to unique grouping caused by BatchNo, ClaimNumber, ClaimType
-- SSR# : TFS 5264 - Premera Remediation -(3997)
-- Date : 12/21/2012
-- Author : Satish Pandey
-- Description : Add BCATs 1202 and 1603 to the Where clause selecting pharmclm.ArgusClientNo as BCAT
-- SSR# : TFS 10286
-- Date : 1/15/2014
-- Author : Raymond Beckett
-- Description : Add HRI Customer Number and BCAT's. Also add Customer Number and alternate batchno to parameters
-- Only use '@NewBatchNo' if adding data from missed custno and the batchno already exists in PASOArgusClaims
-- ITSM Ticket : 1800925
-- Date : 4/15/2014
-- Author : Roxy Newbill
-- Description : Silverton Hospital had new BCAT (2002) with start of 2014 business. This was never accomodated for
-- Adding this BCAT in so that we can start capturing these claims (Note, special insert being done to capture
-- all BCAT 2002 claims prior to this fix.)
-- ITSM Ticket : TFS 14587 -Intel BCAT Remediation
-- Date : 08/14/2014
-- Author : Andrew Omofonma
-- Description : Added BCAT's (1604,& 2103) for Intel
SET NOCOUNT ON
DECLARE @iCount int
create table #tmpArgusWork (
iRecId int,
BatchNo varchar (7) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
BatchDateTime datetime NULL ,
BatchStatus varchar (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
ReadyDateTime datetime NULL ,
Argus_GroupId varchar (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
Argus_SubGroupId varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
Argus_ClassId varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
Argus_PlanCode varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
Argus_BusinessCategory varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
FacetsClaimSubType varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASOClaimType varchar (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
vchClaimNumber varchar (14) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
dtPaidDate datetime NULL ,
dtProcessDate datetime NULL ,
dtServiceDate datetime NULL ,
vchParticipantId varchar (14) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
vchProviderId varchar (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
vchProviderName varchar (55) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
mClaimTotAmtCharge money NULL ,
mClaimAmtDiscount money NULL ,
mClaimAmtAllowed money NULL ,
mClaimAmtDenied money NULL ,
mClaimAmtDeduct money NULL ,
mClaimAmtCoinsurance money NULL ,
mClaimAmtCopay money NULL ,
mClaimAmtPaid money NULL ,
PASO_GroupId varchar (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_SubGroupId varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_ClassID varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_PlanCode varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_BusinessCategory varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
RecordStatus varchar (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
ErrorDesc varchar (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
PrescriptionNo char(12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
DrugName varchar(30)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
NDC char(11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
create table #batches (
BatchNo char(7) not null
primary key (BatchNo))
create table #custnos (
CustNo char(4),
ClientNo char(5), -- bcats associated with the customer
primary key (CustNo, ClientNo)
DECLARE
@len_Argus_SubGroupId smallint,
@len_Argus_PlanCode smallint,
@len_vchParticipantId smallint,
@len_vchProviderId smallint
--Get field lengths for the following fields
SELECT @len_Argus_SubGroupId = 4, --datalength([@tmpArgusWork].[Argus_SubGroupId]),
@len_Argus_PlanCode = 8, --datalength(@tmpArgusWork.Argus_PlanCode),
@len_vchParticipantId = 14, --datalength(@tmpArgusWork.vchParticipantId),
@len_vchProviderId = 12 --datalength(@tmpArgusWork.vchProviderId)
declare @maxbatch char(7)
IF @BatchNo IS NULL
begin
-- assume normal run. Add ClientNo's and custno's to tables
insert #custnos (CustNo, ClientNo)
values ('0142', '1100')
,('0142', '1200')
,('0142', '1201')
,('0142', '1700')
,('0142', '1602')
,('0142', '1202')
,('0142', '1603')
,('0142', '2002')
,('0142', '1604')
,('0142', '2103')
,('0669', '*')
-- get batches loaded since last batch loaded into PASOArgusClaims
SELECT @maxbatch=Max(BatchNo)
FROM ODSSupport.dbo.PASOArgusClaims
declare @dt datetime
declare @ds datetime
select @dt = MIN(DateTimeStamp)
from ODS.dbo.PharmacyClaim_Common
where BatchNo <= @maxbatch
and DateTimeStamp > DATEADD(dd,-16,getdate())
insert #batches (BatchNo)
select distinct BatchNo
from ODS.dbo.PharmacyClaim_Common pcc
inner join #custnos ct
on ct.CustNo = pcc.ArgusCustNo
and (
ct.ClientNo = '*'
or
ct.ClientNo = pcc.ArgusClientNo
where DateTimeStamp > @dt
; -- batch may have had a claim altered since last load, drop any batches already loaded into PASOArgusClaims
with pba as (
select distinct BatchNo
from ODSSupport.dbo.PASOArgusClaims
delete ba
from #batches ba
inner join pba
on pba.BatchNo = ba.BatchNo
end
else if @NewBatchNo is not null and @CustNo is not null
begin
--make sure we haven't already done this batch number/customer combination
set @maxbatch = @NewBatchNo
SELECT @iCount=count(*)
FROM PASOArgusClaims
WHERE BatchNo=@maxbatch
and Argus_BusinessCategory = @CustNo
IF @iCount > 0
begin
PRINT 'Msg: Batch ' + @maxbatch + ' already exists for CustNo ' + @CustNo + '.'
end
else
begin
if @CustNo = '0142'
begin
insert #custnos (CustNo, ClientNo)
values ('0142', '1100')
,('0142', '1200')
,('0142', '1201')
,('0142', '1700')
,('0142', '1602')
,('0142', '1202')
,('0142', '1603')
,('0142', '2002')
,('0142', '1604')
,('0142', '2103')
end
if @CustNo = '0669'
begin
insert #custnos (CustNo, ClientNo)
values ('0669', '*')
end
insert #batches (BatchNo)
values (@BatchNo)
end
end
else
begin
--make sure we haven't already done this batch number
set @maxbatch = @BatchNo
SELECT @iCount=count(*)
FROM PASOArgusClaims
WHERE BatchNo=@maxbatch
IF @iCount > 0
begin
PRINT 'Msg: Batch ' + @maxbatch + ' already loaded.'
end
else
begin
insert #batches (BatchNo)
values (@maxbatch)
end
end
** Insert Pharmacy Claims to temporary table
INSERT INTO #tmpArgusWork
SELECT
pharmClm.RxKey,
isnull(@NewBatchNo, pharmClm.BatchNo),
pharmclm.OrigDateTimeStamp as BatchDateTime,
'PENDING' as BatchStatus,
NULL as ReadyDateTime,
substring(pharmClm.GrpNumber,1,8)as Argus_GroupID,
left(pharmClm.ArgusSubgroup1,@len_Argus_SubGroupId) as Argus_SubgroupID,
substring(pharmClm.GrpNumber,9,4) as Argus_ClassId,
substring(pharmClm.GrpNumber,13,@len_Argus_PlanCode) as Argus_PlanCode,
pharmClm.ArgusClientNo as Argus_BusinessCategory,
'' as vchFacetsClaimSubtype,
PASOClaimType = CASE WHEN pharmClm.ClaimType='A'
THEN 'PHARMACY-ADJUST'
ELSE 'PHARMACY'
END,
pharmClm.ClaimNo,
pharmClm.DateCutoff as dtPaidDate,
pharmClm.DateWritten as dtProcessDate,
NULL as dtServiceDate,
left(pharmClm.MemberId,@len_vchParticipantId) as vchParticipantId,
left(pharmClm.PharmacyNo,@len_vchProviderId) as vchProviderId,
vchProviderName = CASE WHEN pharmclm.PayMemberInd = 'Y'
THEN 'Member Reimbursement'
ELSE pharm.PharmName
END,
mClaimTotAmtCharge = CASE WHEN pharmclm.PayMemberInd = 'Y' -- When this is a member reimbursement use the amt paid
THEN isnull(pharmClm.IngredientCostPaid,0) + isnull(pharmClm.DispenseFee,0) + isnull(APSFee,0) -- as amt charged.
ELSE isnull(pharmClm.AmtBilled,0)
END,
case when pharmclm.PayMemberInd = 'Y'
then isnull(pharmClm.AmtRejected,0) * -1
else isnull(pharmClm.AmtBilled,0) - isnull(pharmClm.IngredientCostPaid,0) - isnull(pharmClm.DispenseFee,0) - isnull(APSFee,0) -isnull(pharmClm.AmtRejected,0)
end as mClaimAmtDiscount,
isnull(pharmClm.IngredientCostPaid,0) + isnull(pharmClm.DispenseFee,0) + isnull(APSFee,0) as mClaimAmtAllowed,
isnull(pharmClm.AmtRejected,0) as mClaimAmtDenied,
isnull(pharmClm.MemberPaidAmt,0) - isnull(pharmClm.MemberCopayAmt,0) as mClaimAmtDeduct,
0 as mClaimAmtCoinsurance,
isnull(pharmClm.MemberCopayAmt,0) as mClaimAmtCopay,
isnull(pharmClm.AmtPaid,0) + isnull(APSFee,0) as mClaimAmtPaid,
NULL as PASO_GroupID,
NULL as PASO_SubgroupID,
NULL as PASO_ClassID,
NULL as PASO_PlanCode,
NULL as PASO_BusinessCategory,
'OK' as RecordStatus,
NULL as ErrorDesc,
PrescriptionNo = pharmClm.PrescriptionNo,
DrugName = pharmClm.DrugName,
NDC = pharmClm.NDC
FROM ODS..PharmacyClaim as pharmClm
LEFT JOIN ODS..pharmacy as pharm on
pharmClm.PharmacyNo = pharm.PharmacyNo
INNER join #batches ba
on ba.BatchNo = pharmClm.BatchNo
INNER join #custnos ct
on ct.CustNo = pharmClm.ArgusCustNo
and (
ct.ClientNo = '*'
or
ct.ClientNo = pharmClm.ArgusClientNo
WHERE pharmClm.ClaimType in ('P','A') -- Processed or Adjusted
--AND pharmClm.ProcessCode <> 'MC' --code doesn't exist
--GROUP BY
-- pharmClm.BatchNo,
-- substring(pharmClm.GrpNumber,1,8),
-- substring(pharmClm.GrpNumber,9,4) ,
-- substring(pharmClm.GrpNumber,13,@len_Argus_PlanCode),
-- pharmClm.ArgusSubgroup1,
-- pharmClm.ClaimNo,
-- pharmClm.ArgusClientNo,
-- pharmClm.DateCutoff,
-- pharmClm.DateWritten,
-- pharmClm.MemberId,
-- pharmClm.PayMemberInd,
-- pharmClm.PharmacyNo,
-- pharm.PharmName,
-- pharmClm.OrigDateTimeStamp,
-- pharmClm.ClaimType,
-- pharmClm.PrescriptionNo,
-- pharmClm.DrugName,
-- pharmClm.NDC
IF @@RowCount=0
BEGIN
PRINT 'Msg: No records found.'
RETURN
END
--Update the Discount column for these Pharmacy Claims
--UPDATE @tmpArgusWork
--SET mClaimAmtDiscount=mClaimTotAmtCharge-mClaimAmtAllowed-mClaimAmtDenied
** Get the lowest service Date for each claim and update temp table
UPDATE #tmpArgusWork
SET dtServiceDate = (SELECT min(pharmclm.DateSvc)
FROM ODS..pharmacyClaim AS pharmclm
WHERE pharmclm.ClaimNo = tcpr.vchClaimNumber
AND pharmclm.MemberID = tcpr.vchParticipantId)
FROM #tmpArgusWork as tcpr
** Copy over the eligibility fields that Argus provided
UPDATE #tmpArgusWork
SET PASO_GroupId = Argus_GroupID,
PASO_SubGroupId = Argus_SubGroupId,
PASO_ClassID=Argus_classid,
PASO_PlanCode=Argus_PlanCode,
PASO_BusinessCategory=Argus_BusinessCategory
FROM #tmpArgusWork pw
WHERE COALESCE(Argus_GroupID,'') <> ''
OR COALESCE(Argus_SubGroupId,'') <> ''
OR COALESCE(Argus_classid,'') <> ''
OR COALESCE(Argus_PlanCode,'') <> ''
OR COALESCE(Argus_BusinessCategory,'') <> ''
** If Argus did not provide all 5 eligibility fields, get them from faEnrollmentHistory
** based on the group, member, date of service
UPDATE #tmpArgusWork
SET PASO_GroupId = eh.GroupId,
PASO_SubGroupId = eh.SubGroupId,
PASO_ClassID=eh.Class,
PASO_PlanCode=eh.PlanCode,
PASO_BusinessCategory=eh.BusinessCategory
FROM #tmpArgusWork pw
INNER JOIN ODS..FAEnrollmentHistory eh
ON eh.MemberID =pw.vchParticipantID
AND eh.Groupid =pw.Argus_GroupID
AND eh.eligind='Y'
AND eh.ProcessCode<>'ID'
AND pw.dtServiceDate BETWEEN eh.EligEffDate AND eh.EligTermDate
WHERE COALESCE(Argus_GroupID,'') = ''
OR COALESCE(Argus_SubGroupId,'') = ''
OR COALESCE(Argus_classid,'') = ''
OR COALESCE(Argus_PlanCode,'') = ''
OR COALESCE(Argus_BusinessCategory,'') = ''
** If we have eligibility for all records, go ahead and set the ready date to today.
IF NOT EXISTS ( SELECT *
FROM #tmpArgusWork
WHERE COALESCE(PASO_GroupID,'') = ''
OR COALESCE(PASO_SubGroupID,'') = ''
OR COALESCE(PASO_ClassID,'') = ''
OR COALESCE(PASO_PlanCode,'') = ''
OR COALESCE(PASO_BusinessCategory,'') = '')
BEGIN
UPDATE #tmpArgusWork
SET ReadyDateTime=convert(varchar(10),GetDate(),101),
BatchStatus='READY'
END
ELSE
BEGIN
PRINT 'Msg: Exceptions found.'
UPDATE #tmpArgusWork
SET RecordStatus='ERR',
ErrorDesc='No valid Eligible span for this Member/Group/Subgroup at time of Service'
WHERE COALESCE(PASO_GroupID,'') = ''
OR COALESCE(PASO_SubGroupId,'') = ''
OR COALESCE(PASO_ClassID,'') = ''
OR COALESCE(PASO_PlanCode,'') = ''
OR COALESCE(PASO_BusinessCategory,'') = ''
END
** Insert the records into the final table.
INSERT INTO PASOArgusClaims
SELECT * FROM #tmpArgusWork
SET NOCOUNT OFF
END
GO
-- Verify that the stored procedure was created successfully.
IF OBJECT_ID ('dbo.pr_Load_PASOArgusClaims_Work') IS NOT NULL
PRINT '<<< CREATED PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
ELSE
PRINT '<<< FAILED CREATING PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
GO
GRANT EXECUTE ON dbo.pr_Load_PASOArgusClaims_Work to role_ODSLoad
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ONthis part of the code below
if@CustNo
= '0142'
begin
insert #custnos(CustNo,
ClientNo)
values ('0142',
'1100')
,('0142',
'1200')
,('0142',
'1201')
,('0142',
'1700')
,('0142',
'1602')
,('0142',
'1202')
,('0142',
'1603')
,('0142',
'2002')
end
store proc
How do I covert it to a common table where the values can be selected from when needed. -
How do I convert the MAP app from meters to miles?
In MAPS, how do I convert from meters to miles?
Hi willardfromaustin,
If you are having issues with the distance scale in Maps, you may find the following article helpful:
Tip: The scale guide in Maps uses the regional measurement preferences (miles or kilometers) you set in the Advanced section of the Language & Region settings in System Preferences.
Mac Basics: Maps app helps you find your destination
http://support.apple.com/kb/HT5973
Regards,
- Brenden -
How can i get the tax code from Condition record number
Hi all,
i have the Condition record number from which i have to get the tax code as i looked inthe KNOP that Condition record number there but no tax code is maintained there.
so is there any other way to find the tax code for particular Condition record number
Regards
sureshhi suresh,
can u tell me the field name for condition record number and in which table it is stored.
because i knew one condition number which is stored in table EKKO and the field name is
KNUMV- Number of the document condition.
from ekko take relevant details and look for ekpo where u find the tax code
filed name of the tax code id MWSKZ- Tax on sales/purchases code -
if(exist chrome.exe $true)
echo internet is ready
else
echo get chrome!!
I want to use the above script to cause the shell to display either "internet is ready" or "get chrome!!" depending on whether or not a user has Chrome but the shell keeps giving the following error message.
Missing statement block after if ( condition ).
At line:2 char:1
What is a statement block, and how do I use it to display the text?This might work okay in .BAT but I don't think so much in Powershell. You are trying to do an IF ( ) statement, but you have no parameters after that.
A pancake of how an IF statement works in Powershell:
If (statement -like "True") { Script info if condition is true } else { script info if condition is false }
In your case, you need to test the path of Chrome to see if it exsists. I don't have Chrome installed, but I do have IE. You just need to change the path to where the Chrome.exe is installed.
ps - the Echo equiv in Powershell is Write-Host
$TestBrowser = Test-Path "C:\Program Files (x86)\Internet Explorer\iexplore.exe"
if ($TestBrowser -like "True")
Write-Host the internets is ready!
else
Write-Host the internets is not ready
Similiarly, you don't need to use $TestBrowser in your If ( ) statement, you can just use the operational param $?, which should return true or false depending on the last error message. -
How to convert the following code into an applet
Please reply for me as soon as you can.
import java.io.*;
import java.awt.Frame;
import java.awt.FlowLayout;
import java.awt.Color;
import java.awt.Insets;
import java.awt.Dimension;
import java.awt.event.WindowListener;
import java.awt.event.WindowEvent;
import java.util.Enumeration;
import javax.comm.CommPort;
import javax.comm.CommPortIdentifier;
import javax.comm.SerialPort;
import javax.comm.NoSuchPortException;
import javax.comm.PortInUseException;
public class BlackBox extends Frame implements WindowListener
static int portNum = 0,
panelNum = 0,
rcvDelay = 0;
static SerialPortDisplay[] portDisp;
static BlackBox win;
static boolean threaded = true,
silentReceive = false,
modemMode = false,
friendly = false;
public BlackBox()
super("Serial Port Black Box Tester");
addNotify();
addWindowListener(this);
public void windowIconified(WindowEvent event)
public void windowDeiconified(WindowEvent event)
public void windowOpened(WindowEvent event)
public void windowClosed(WindowEvent event)
public void windowActivated(WindowEvent event)
public void windowDeactivated(WindowEvent event)
public void windowClosing(WindowEvent event)
cleanup();
dispose();
System.exit(0);
public static void main(String[] args)
Enumeration ports;
CommPortIdentifier portId;
boolean allPorts = true,
lineMonitor = false;
int idx = 0;
win = new BlackBox();
win.setLayout(new FlowLayout());
win.setBackground(Color.gray);
portDisp = new SerialPortDisplay[4];
while (args.length > idx)
if (args[idx].equals("-h"))
printUsage();
else if (args[idx].equals("-f"))
friendly = true;
System.out.println("Friendly mode");
else if (args[idx].equals("-n"))
threaded = false;
System.out.println("No threads");
else if (args[idx].equals("-l"))
lineMonitor = true;
System.out.println("Line Monitor mode");
else if (args[idx].equals("-m"))
modemMode = true;
System.out.println("Modem mode");
else if (args[idx].equals("-s"))
silentReceive = true;
System.out.println("Silent Reciever");
else if (args[idx].equals("-d"))
idx++;
rcvDelay = new Integer(args[idx]).intValue();
System.out.println("Receive delay = "
+ rcvDelay + " msecs");
else if (args[idx].equals("-p"))
idx++;
while (args.length > idx)
* Get the specific port
try
portId =
CommPortIdentifier.getPortIdentifier(args[idx]);
System.out.println("Opening port "
+ portId.getName());
win.addPort(portId);
catch (NoSuchPortException e)
System.out.println("Port "
+ args[idx]
+ " not found!");
idx++;
allPorts = false;
break;
else
System.out.println("Unknown option "
+ args[idx]);
printUsage();
idx++;
if (allPorts)
* Get an enumeration of all of the comm ports
* on the machine
ports = CommPortIdentifier.getPortIdentifiers();
if (ports == null)
System.out.println("No comm ports found!");
return;
while (ports.hasMoreElements())
* Get the specific port
portId = (CommPortIdentifier)
ports.nextElement();
win.addPort(portId);
if (portNum > 0)
if (lineMonitor)
if (portNum >= 2)
portDisp[0].setLineMonitor(portDisp[1],
true);
else
System.out.println("Need 2 ports for line monitor!");
System.exit(0);
else
System.out.println("No serial ports found!");
System.exit(0);
private void addPort(CommPortIdentifier portId)
* Is this a serial port?
if (portId.getPortType()
== CommPortIdentifier.PORT_SERIAL)
// Is the port in use?
if (portId.isCurrentlyOwned())
System.out.println("Detected "
+ portId.getName()
+ " in use by "
+ portId.getCurrentOwner());
* Open the port and add it to our GUI
try
portDisp[portNum] = new
SerialPortDisplay(portId,
threaded,
friendly,
silentReceive,
modemMode,
rcvDelay,
win);
this.portNum++;
catch (PortInUseException e)
System.out.println(portId.getName()
+ " in use by "
+ e.currentOwner);
public void addPanel(SerialPortDisplay panel)
Dimension dim;
Insets ins;
win.add(panel);
win.validate();
dim = panel.getSize();
ins = win.getInsets();
dim.height = ((this.panelNum + 1) * (dim.height + ins.top
+ ins.bottom)) + 10;
dim.width = dim.width + ins.left + ins.right + 20;
win.setSize(dim);
win.show();
panelNum++;
static void printUsage()
System.out.println("Usage: BlackBox [-h] | [-f] [-l] [-m] [-n] [-s] [-d receive_delay] [-p ports]");
System.out.println("Where:");
System.out.println("\t-h this usage message");
System.out.println("\t-f friendly - relinquish port if requested");
System.out.println("\t-l run as a line monitor");
System.out.println("\t-m newline is \\n\\r (modem mode)");
System.out.println("\t-n do not use receiver threads");
System.out.println("\t-s don't display received data");
System.out.println("\t-d sleep for receive_delay msecs after each read");
System.out.println("\t-p list of ports to open (separated by spaces)");
System.exit(0);
private void cleanup()
SerialPort p;
while (portNum > 0)
portNum--;
panelNum--;
* Close the port
p = portDisp[portNum].getPort();
if (p != null)
System.out.println("Closing port "
+ portNum
+ " ("
+ p.getName()
+ ")");
portDisp[portNum].closeBBPort();
}hi welcome to java forum,
please do one thing for me so that i can help you, can you put your code in a code tag [code ][code ] (without spaces) so that your code can be readable easily -
I forgot the passcode on my phone. Can I unlock it remotely, ie. via iCloud?
No, not if you didn't lock it by placing it in lost mode.
-
Convert Data encryption code from VB to Java.
Can anyone help me in converting the following code from VB to Java?
'Purpose: This function decrypts the password of the user in the database so that
' it can be matched accurately with the inputted password of the user in
' the Log-In form (Case-sensitive)
'Function to decrypt password
Public Function Decrypt(ByVal Encrypted As String)
On Error GoTo ErrorRoutine
For intEncryptDecrypt = 1 To Len(Encrypted)
strLetter = Mid(Encrypted, intEncryptDecrypt, 1)
Mid(Encrypted, intEncryptDecrypt, 1) = Chr(Asc(strLetter) - 1)
Next
Decrypt = Encrypted
Exit Function
ErrorRoutine:
Err.Raise Err.Number, , Err.Description
Exit Function
End Functionhi,
try this
public String decrypt(String a){
for(int i=0;i<a.length();i++){
char c=a.charAt(i);
c--;
a=a.substring(0,i)+c+a.substring(i+1);
return a;
}regards -
How do I remove the pass code from my iphone icloud account? I hate having to log in every time my phone goes to sleep.
Welcome to the Apple community.
settings > general > passcode lock > off. -
How do I get the return value from an executable?
I'm running an external executable from dbms_scheduler but how do I get the exit code from the program run or any screen output?
Hi,
In the additional_info column of schedulerjob_run_details there should be something like
job of type EXECUTABLE failed with exit code: Operation not permitted
"Operation not permitted" is the error code (as translated by the errors header file for that platform).
In releases 10.2 and up there may also be a line in the additional_info
STANDARD_ERROR="Error text here"
This gives the standard error messages output by the application. There is no way to get the standard output of the application.
Hope this helps,
Ravi.
Maybe you are looking for
-
How to Approach for full implementation
We have a situation here that we r planning to implement SAP BW. But here R/3 is not fully implemented. In this situation how to approach to prepare a Blueprint. We are planning to implement SD,MM,PP,QM and FICO modules. We dont have any functional
-
A3 Keyword missing feature from A2
Can someone help me please. One of the features I used extensively in A2 was the Keyword lookup feature which gave you a list of words that were in your master keyword list and auto completed when you started typing the word. You got this by selectin
-
Do I need credit on my prepaid iphone to send an imessage
I have a prepaid iphone, if i have no credit but still attached to wifi can i still send an imessage?
-
I'd like to get some basic training in Soundtrack Pro 3 that could get me started as a novice. I've cracked opened Soundtrack a few times and played around with it, but I really didn't know what I was doing. I know some stuff about working with sound
-
AcroPDDoc.InsertPages() is failing
When I am trying to insert pages from another PDF file using AcroPDDoc.InsertPages(), it is returning false. The PDF file used for inserting is created from Microsoft Powerpoint file. The same scenario, we tried with Acrobat X Professional, we got "B