?
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
Medium Priority
?
760 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 101

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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 17

Accepted Solution

by:
MIKE earned 750 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

770 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