VB.NET, Oracle View and you

Ok..  I'm here..  at work on the Wednesday before Thanksgiving..  so the brain isn't working too well and I don't have access to an Oracle database..  so if someone can help me, I promise to save some turkey tomorrow for them.

I've written a VB.NET program to open a Crystal Report.  I manipulate the RecordSelectionFormula to select the record that I want based on a simple query on a single table.

Next, I wrote a view which selects from 6 or so tables to populate the "real" report..  for example

CREATE OR REPLACE VIEW VIEW_A AS
SELECT
    A.VALUE_A,
    B.VALUE_B,
    B.VALUE_C,
    A.VALUE_D
FROM
   TABLE_A A,
   TABLE_B B
WHERE
   A.KEY = B.KEY

Now I want to use the RecordSelectionFormula to limit the result to a single record (A.KEY = 'value')

1.  Will this filter be done on the Server or the Client?  If on the client, is there a more efficient way to do this selection?
2.  How do I specify the A.KEY value?  Is it view.tablespace.fieldname?  VIEW_A.TABLE_A.KEY??  

Thanks in advance for any help offered!
adb_13Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcdown75Commented:
If you are bringing this back to a Data Adapter why don't you just set DA.filter = Key  I think you can do that.
0
adb_13Author Commented:
Unfortunately, I'm not using a Data Adapter..  maybe I should try that route instead.

I'm using an already existing report in their production environment.  My initial thoughts were I could just pass the key value for the column to filter out the one record..  right now, they get a dialog box up prompting the user to enter the key.  I found that by overriding the RecordSelectionFormula in the Crystal Report RunTime engine and eliminating the parameters within the report, I could select the row I want.  My thought being, at the time, that this select would be done on the server.

Does that make sense?

Are you saying my best alternative is to just use a Data Adapter?  

Thanks.
0
mcdown75Commented:
Nope.  Not telling you that.  It's just one option.  I am not that up on Crystal Reports.  I am wondering if you need to adjust the stored procedure within Oracle to do what you want by passing a second parameter.  That's another option.  Maybe you can do something in crystal reports like that.
0
jacobhooverCommented:
First, in order to filter against the view, you will need to keep all the fields you wish to filter on in the view.

CREATE OR REPLACE VIEW VIEW_A AS
SELECT
    A.KEY, -- <-- HERE
    A.VALUE_A,
    B.VALUE_B,
    B.VALUE_C,
    A.VALUE_D
FROM
   TABLE_A A,
   TABLE_B B
WHERE
   A.KEY = B.KEY

Then if your query in Crystal Reports is "SELECT * FROM VIEW_A WHERE KEY = 'The One I Want'" then the filtering will be done on the server side.

If you have field names that are identical on bot table a and b, then you will have to alias them.

Jake
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.