Prevent Duplicate records in Report
I have the following 2 records...
PART_EIPN -------|NOMEN--|FMC | PDT | PDT_DESC---------------|LOG_NO
70107-28400-043 | BIFILAR | 16 ++| A23 | BIFILAR ASSEMBLY |+ 18
70107-28400-043 | BIFILAR | 16 ++| A23 | BIFILAR ASSEMBLY |+ 23
How can I have report only print one record and have under log_no print 18,23
Is there anyway I can prevent the 2nd record from print but still display the 2 log_no (18,23) (+) are not part of record... just for formatting purposes for this forum
Sorry I missed something.
Please confirm that this data:
PART_EIPN -------|NOMEN--|FMC | PDT | PDT_DESC---------------|LOG_NO
70107-28400-043 | BIFILAR | 16 ++| A23 | BIFILAR ASSEMBLY |+ 18
70107-28400-043 | BIFILAR | 16 ++| A23 | BIFILAR ASSEMBLY |+ 23
is produced by this query?
Select f.model,f.part_eipn,f.nomen,e.FMC,s.PDT,p.PDT_DESC,e.log_no
from GENFRAC_r_part_EIpn f, event_log e,event_status s,r_pdt p
where s.pdt = :pdt
and s.pdt(+) = p.PDT_CODE
and p.model = 'PBLH60'
and f.PART_EIPN = e.EIPN
and e.log_no = s.log_no
and f.model = 'PBLH60'
and e.model = 'PBLH60'
and s.model = 'PBLH60'
order by fmc
e.log_no last colum
If this is not true then what I need to help you is one query(maybe you could create a view), that produces the data that is currently in your report, then getting the log_no's on one line is not a problem.
Similar Messages
-
How to prevent duplicate records
Hello all,
This is just a general query. How do we prevent duplicate records at data target level(ODS/InfoCube).
Thanks
S NHi,
for ODS you can either specify in settings option "unique records" (only first combination of keys is saved, second one throws error message) or you can define "overwrite" for update rules to ODS (last occurrence of record is saved).
For InfoCubes I think there isn't such setting and there is no possibility of overwriting existing records. So you have to load first to an ODS object to ensure unique records and update from ODS to InfoCube.
Best regards,
Björn -
hello guys,
he was asking,i have duplicate ecords in the report how do we rectify them?
why and how the duplicate records come in reporting?how is it possible??
pls explain me how can this is possible?
thanks & regardsHi,
It may be possible that your data target may be reading data from DSO (for eg).
If this DSO have a keyfield as account but not center then in this case , the accounts with different centers but with same amount can acculmualte to duplicate data.
This case may occur with a flat file load and the records need to be corrected in that case. Also the flat file can work directly in the case when we have both account & center as Keyfield for that particular DSO.
This is scenario which can happen other than the above.
Best Regards,
Arpit -
Is there any way to prevent creating duplicate records instead of searching if it already exists?
There are cetain fields for object which can fom uniqueness. Account Name and Location together form the uniqueness for Account object.
But difficult in case of all the objects such as Contact , SR. -
Prevent Duplicate Record with Validation
Hello,
Can someone suggest to me how I can check a form such that it does not have a duplicate record, when a user either saves or creates the record?
In particular, I am looking at 2 fields in a record as the criterai for determine duplicity:
select PEOPLE_ID, DEPT_ID
from AN_PEOPLEDEPT
where PEOPLE_ID = :P12_PEOPLE_ID and
DEPT_ID = :P12_DEPT_ID
It would be nice to know how to make this work with only one validation in a page definition.
Thank you for your comments.
Regards,
Colin.1. Create a validation.
2. Choose "Page Level"
3. Choose "SQL"
4. Choose "Exists"
5. Give it a name and choose "Inline in notification"
6. Enter your query, simaler to the one I posted before but using your table name and your items
That's it. Essentially, you can create validations that display the error next to the item (won't work for you as it's just one item), display the error on an error page forcing the user to go back a page to edit the form (not ideal), or in the Notification area at the top of the page (as determined by your page template). The latter is the one your want. The validation will query your table based on the values of your two items. If there is a row that matches the values of the 2 items, then it will show the form again with an error message at the top. Just try following the steps I detailed above. After you create a validation or two, this should make sense.
Please listen to my advice about adding a unique index on the table as well. An ORA-XXXX error is ugly which is why I'm glad you're doing it with an HTML DB validation too, but the unique index will insure that you NEVER have dupes in your table. I can't stress this enough. Think about the check engine light on a modern car. It gives you a "pretty" reminder that something is wrong (low oil, too hot), but will typically shut the engine down before any real damage is done. We want the friendly reminder so we can get it to a mechanic, but the real safe-guard is under the covers and prevents any real damage from occuring, even if people ignore the warning light (no "wife ignoring the low oil light" jokes here please).
Tyler -
Prevent duplicate records?
hi
can any one tell me
how can i prevent the user from typing duplicate records into a tabular form? which trigger should i use?and how to do that?
and also how to restrict inserting duplicate records into my table throw a code which will be in my form.Kevin in his post said
>>
Although you cannot normally read other records in a multi row block without navigating to them, I have found a cunning method to do this validation using the power of calculation properties. You need three extra hidden fields, two of which have calculation properties, and a little function. (If you want to see how it works, try making the hidden fields visible).
Form program unit:
function COMPARISON (in1 number, in2 number) is
if in1 = in2 then
return(1);
else
return(0);
end if;
end;
3 new hidden fields:
CONTROL.PK_COPY
DATABLOCK.MATCH_FOUND
calculation mode: formula
formula: COMPARISON(:control.PK_COPY, :datablock.PK)
CONTROL.NUMBER_OF_MATCHES
calculation_mode: summary
summary_function: Sum
summarised_block: DATABLOCK
summarised_item: MATCH_FOUND
WHEN_VALIDATE_ITEM on DATABLOCK.PK
:control.pk_copy := :datablock.pk;
if :control.number_of_matches > 1 then
message('matching key found');
end if;
(DATABLOCK must have query_all_records = TRUE)
<<
what do i have to name my fields and what to do in each field?
becuase i got lost in what Kevin said.
please answer me! -
Duplicate records in report but not in Database
I am new to Crystal Reports and took an online training course for it this week. I am pulling the data from and Access Database and there is no duplication of records in the tables.
I can create and run the same report from a different workstation and it works fine, but when I create it on my laptop it creates duplicate entries.
I am pulling information from 3 seperate tables within the same database. It will pull the correct "order id" from an order table but it won't pull the correct "unit price" or "quanity" from the order details table.
The instructor was able to look at report and he even tried to recreate it with the same results. He stated that there was something wrong with Crystal Report and then something about the SQL, but he talked quickly and then moved out and I wasn't able to ask questions.
I'm not sure what kind of information you need from me. Any assistance that you provide would be appricated. I tried to search on the threads, but couldn't find any similar problems.
Thanks!Hi Angela
Please check following things:
1. The databse that is used while creating report on the workstation and laptop are same.
2. The vesion of crystal reports on both the machines is same(HELP>>About Crystal Reports).
3.Could you compare this situation for some other database.
Pleas keep the thread updated so that we can discuss further.
Thanks -
Avoiding duplicate records in report
Hi All,
I have a scenario where
Delivery document gets created in R/3 say on 7/1 with Act GI date "#" and KFs are all "0". This gets loaded into BI.
On "7/5" this is PGId and the status in R/3 changesto ACT GI date "7/5" and Qty of "100" . This when loaded into BI is getting published as dupicate records i.e.
Del doc Created date Act GI Del. Ind Qty
12345 1-Jul # # 0
12345 1-Jul 5-Jul # 100
Please note that the data is getting loaded from DSO into Infocube and DSO is in overwrite mode.
Any suggestions to overcome this problem.Is ACT GI date a keyfield in the DSO ?
If yes, data will not be overwritten and two records will be loaded into the Cube.
Make ACT GI date a datafield which will result in only one record 12345 1-Jul 5-Jul # 100 as the keyfield values are same.
Firstly make sure if this is right for all business scenarios. -
Duplicate Records & CFTRANSACTION
Maybe I'm missing the obvious on this, as I've never had a
problem with this before, but recently I developed a custom tag
that logs and blocks the IP addresses of all these recent DECLARE
SQL injection attempts.
The issue is however that my blocked IP address seems to be
getting duplicates here and there. My "datetime" field in the
database show the duplicates are all added to the database the
exact same second. What gives?
Shouldn't CFTRANSACTION be preventing such a thing, even if
multiple injection attempts come at the same time?I've always coded my applications where my primary key is my
database's autonumber field, and instead insure my coding is solid
enough to prevent duplicate records from appearing. Oddly enough
it's worked flawlessly until now.
Would not ColdFusion throw errors if I made the "ip_address"
field my primary key, and my code allowed for a duplicate record to
be entered? Am I interpretting the CFTRANSACTION code to do
something it doesn't do?
Also, the duplicates aren't causing problems, so a DISTINCT
select isn't necessary. The IP address is blocked whether one
record or fifty exist in my blocked_ip_addresses table. My goal is
just not to waste database space.
Any further help you can provide is MUCH appreciated!
Thanks! -
Duplicate record should not allow to enter
hi
i have three columns
sno Number;
in time date;
out time date;
this is the multiple taulat layout :
User enter at run time values like this :
1 01:15 03:00
1 01:15 03:00 Here second record User should not allow to enter same Sno for Same In time and End time
Before entering the data the total no of records : 0
can u give me any suggestion.
how to validate the columns.If you have a Unique Constraint on the table for these there columns it will prevent duplicate records.
1 01:15 03:00 Here second record User should not allow to enter same Sno for Same In time and End timeBy "Second User" do you mean a user in a seperate Forms Session? If so, there is no way to check if the user in session 2 is entering a duplicate of a record entered by a user is session 1 accept through the use of a unique constraint on the table.
There are methods available for checking for duplicates in the same Forms Session. Check out: Avoid duplicates in the same block and Forms: Record Group Processing (Duplicate Value Checking) for more information.
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Prevent duplicate on put() using DPL
Given it is not possible to have composite index keys, what is the best way of preventing duplicate record creation on a put() using DPL. For example, for the following:
@Entity
public class Category {
@PrimaryKey
private Long recordID;
private String description;
private Integer type;
private Long customerID;
So how to avoid a duplicate put() on ( description + type + customerID ) ...... without a performance compromise.
Can I extend the class with Comparator and then use set DatabaseConfig.setDuplicateComparator(Class<? extends Comparator<byte[]>> duplicateComparatorClass) or am I completely on the wrong track?
Thanks, LenDoes your GenericLookup constructor fill in the fields of the secondary key (the fields of the GenericLookupConstraint class)? You didn't include the constructor in your post.
In your source code you've duplicated the fields, which makes me wonder whether you think that the key fields are not part of the entity. The secondary key is part of the entity, so there is no reason for the duplication.
If you're still having trouble, please create a complete test program with a main() so we can try it and see what you're doing wrong.
--mark -
Prevent Duplicate Insertion of Record
I am trying to acheive some thing like this but i beleive
Insert Statement is not allowed in Case or Select is expecting some
thing in return that is why it keeps on giving me Missing
Expression . Is there any other way to prevent duplicate insertion
. i know we can do it by running another Query and then based on
recoundcount or count of that seperate query inserting records but
that i dont want to do .
SELECT CASE
WHEN ( SELECT COUNT(*) FROM THACARA WHERE ORG_CNY_CD = 'US'
AND ORG_REG_NR = '02' AND ORG_DIS_NR = '51') > 0
THEN (' DUPLICATE EXSIST')
ELSE (INSERT INTO THACARA ( USR_NR, ORG_FAC_LOC_NR, )
values ( 'Yousaf', 'FLIMI'))
END AS TEST FROM DUAL;
any ideas ??It would be a lot better for everyone if you actually put a
unique constraint on your table rather than all this programming
(remember Oracle can have constraints). and preferably handle it in
a proper procedure and not injection - note that the "Answer" in
this thread does not actually return any information about whether
the record was inserted or not, just the actual record (nor does it
update the non-duplicate columns).
BEGIN
insert stuff
return 'inserted'
when DUP_VAL_ON_INDEX
update other stuff not making up the unique columns
return 'duplicate'
END -
How to delete duplicate record in Query report
Hi Experts,
I had created an infoset and query in my sap, but I want to delete some duplicate records before the list out put.Please can we add some further codes in the Extras code to delete duplicates? And how do it? Would you please give me a simple brief.
JoeHi,
You can try to restrict in the filter area in query designer with the values for characteristic which gives correct
result.
But still i would suggest that in the cube you keep not the duplicate records as this is not your requirement and giving
you wrong result.
So you can reload the correct records in the cube inorder to avoid such problems even in future.
Regards,
Amit -
Preventing duplicate asset creation
I'm trying to work out how to prevent my users from entering duplicate assets into the system. The situation is that we will have people manually creating new assets from an account or contact, but we will also likely have people bulk loading assets via import. Preventing duplicates from a bulk import is not really a problem, however preventing it when a record is manually seems to be a significant challenge!
Would appreciate any suggestions from the community.
Cheers,
CameronCameron, the report with a prompt would allow you to see a duplicate asset. The report could be a report in a custom web tab which would allow a user to easily access it. However, report is not going to work because of the ability of not being able to report on assets under a contact! , On Demand does allow you to enter a duplicate contact thru the UI. All I am saying is that a web service program could check for duplicates.
-
USE of PREVIOUS command to eliminate duplicate records in counter formula
i'm trying to create a counter formula to count the number of documents paid over 30 days. to do this i have to subtract the InvDate from the PayDate. and then create a counter based on this value. if {days to pay} is greater than 30 then 1 else 0.
then sum the {days to pay} field to each group. groups are company, month, and supplier.
becuase invoices can have multiple payments and payments can have multiple invoices. there is no way around having duplicate records for the field.
so my counter is distorted by by the duplicate records and my percentage of payments over 30 days formula will not be accurate do to these duplicates.
I've tried Distinct Count based on this formula if {days to pay} is greater than 30 then . and it works except that is counts 0.00 has a distinct records so my total is off 1 for summaries with a record that (days to pay} is less than or equal to 30.
if i subract 1 from the formula then it will be inaccurate for summaries with no records over 30 days.
so i'm come to this.
if Previous() do not equal
then
if {day to days} greater than 30
then 1
else 0.00
else 0.00
but it doesn't work. i've sorted the detail section by
does anyone have any knowledge or success using the PREVIOUS command in a report?
Edited by: Fred Ebbett on Feb 11, 2010 5:41 PMSo, you have to include all data and not just use the selection criteria 'PayDate-InvDate>30'?
You will need to create a running total on the RPDOC ID, one for each section you need to show a count for, evaluating for your >30 day formula.
I don't understand why you're telling the formula to return 0.00 in your if statement.
In order to get percentages you'll need to use the distinct count (possibly running totals again but this time no formula). Then in each section you'd need a formula that divides the two running totals.
I may not have my head around the concept since you stated "invoices can have multiple payments and payments can have multiple invoices". So, invoice A can have payments 1, 2 and 3. And Payment 4 can be associated with invoice B and C? Ugh. Still though, you're evaluating every row of data. If you're focus is the invoices that took longer than 30 days to be paid...I'd group on the invoice number, put the "if 'PayDate-InvDate>30' then 1 else 0" formula in the detail, do a sum on it in the group footer and base my running total on the sum being >0 to do a distinct count of invoices.
Hope this points you in the right direction.
Eric
Maybe you are looking for
-
my ipod touch (generation 4) is not recognized by itunes. I've each time to reinstall itunes, it works few days and suddenly not without reason-only was is reinstallation-reset of ipod doesn't change something.does someone can help me please?
-
System Preferences pane - security icon no longer works on all tabs
System Preferences pane has several tabs where there there is a security option, i.e.: a padlock icon with 'click lock to prevent further changes". the icon is not working on all the tabs - it works on some tabs, but on others it just flashes and sta
-
I am trying to access my Ipad2 but have input the wrong passcode and it has now been disabled. I have followed the information to reset to factory settings but the ipad switches off before the reset has been completed. how can I reset my Ipad so I ca
-
Passing PL/SQL Procedure call to custom explain plan script
Hi, Oracle have sent me a custom explain plan script and have asked me to pass in my problematic code through it. They use the GET command in their script to retrieve the command which is passed in as a parameter e.g: @custom_explain_plan <my sql scr
-
Illustrator (CS4) fails to launch in OSX 10.8
How do i get Illustrator (CS4) to launch in OSX 10.8?