Solved

Using crystalreport.SelectionFormula (in VB6) on CR based on an Oracle view, but getting error:"The field name is not known".

Posted on 2006-07-14
6
744 Views
Last Modified: 2012-06-27
I'm able to filter reports from by VB6 app, calling prepared crystal reports that are built from Oracle tables, but when I try to fitler on a view, I get the error "The field name is not known." Thank you for your help.
0
Comment
Question by:briankam
  • 3
  • 2
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 17113068
What do you mean filter on a view?

mlmcc
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17116438
When you say FILTER on a VIEW...does that mean you are trying to use the SELECT CRITERIA....or a PARAMETER FIELD...in order to filter?

It appears that the VIEW is setup with different filed names than what the prepared report is setup with. The VIEW may not even be the same data as in the prepared crystal reports.

MikeV
0
 

Author Comment

by:briankam
ID: 17121772
When creating the report in Crystal, when selecting the Database, I selected More Data Sources/Active Data/Active Data (ADO) and write "Select * from rept_18" (which is the name of my view in Oracle) in the SQL window, and used the fields to create the report. In my vb6 code I'm trying to use: Form1.CrystalReport1.SelectionFormula = "{select_code} = '" & sel_code_filter & "'" to filter on the 'select_code' field. I've tried many prefixes inside the {}s, such as {rept_18.select_code}, {databasename.rept_18.select_code}, etc., but still getting the error when trying to run report from vb. The field name in the view is the same as in the data table. Thank you.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 17

Accepted Solution

by:
MIKE earned 250 total points
ID: 17122702
BrianKam:

Try typing out the entire data table location:

ie.  
SELECT *
FROM servername.dbo.rept_18

0
 

Author Comment

by:briankam
ID: 17124378
I was only able to enter SELECT * FROM rept_18 in Crystal, but since I defined it as an ADO database, I added the prefix 'ado.' in the VB6 statement: CrystalReport1.SelectionFormula = "{ado.select_code} = '" & sel_code_filter & "'" and it worked. Thanks for the help, it led me to the final answer.
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17124390
BrianKam:

I'm glad to be able to help out.

MikeV
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now