Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deletion of Row

Status
Not open for further replies.

daniribs7

Technical User
Aug 13, 2003
17
0
0
ZA
My new problem:

I have records returned from my DB into a BO report, however, I want to delete certain records. e.g All records that have an Product Code of 999, can I do this?

If so, how?

Thanks
 
BO is a read-only tool, which means that actually deleting data is not an option (like in a spreadsheet)

However there are alternatives:

1. Modify the data-provider so that productcode 999 is not fetched from the database (add a condition in query panel)

2. Use a filter to suppress the productcodes 999.
To apply such a negative filter go to format --> filters
and add a filter (global or on a table/crosstab) on productcode.
Select define and enter a formula like:

=<productcode> <> '999'

This is all basic BO stuff covered in every basic training and also covered in the pdf manual, so I suggest investing some time there....

Whether you use option 1 or 2 depends on a number of things,
if the field productcode is not indexed applying a filter at report level may be more efficient

T. Blom
Information analyst
tbl@shimano-eu.com
 
okay cool.
Forgive me, I'm kinda new to this whole BO thing, how would I go about deleting a record with multiple conditions,

eg.
= <productcode> <> '999' && <amount> > 0

thanks
 
As long as:

1. variables are coming from DP and
2. No aggregates are involved

you can do the following:

create checking variable 'check code':

= If (<productcode <> '999' and <amount> > 0) Then 1 else 0

Set this as a detail to the productcode

Add the checking variable to the table and apply a simple filter on it. Hide the checking variable

If you try to enforce the complex filter directly you will observe a different effect. try it



T. Blom
Information analyst
tbl@shimano-eu.com
 
I got it to work, not exactly like this, cause my data is coming directly from the database on a SQL statement.

But using what you have given me, I got it to work.

Thanks Again.
 
A word of caution: using straight SQL dataproviders is okay for testing, but do not make the mistake to go into production that way. You will notice that BO makes it's own judgement on objecttypes with raw SQL, whereas proper universe deployment will give you benefit of creating objects(types), setting up security and loads of other niceties.

See a recent discussion on this topic:

thread393-670150

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top