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
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
750 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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 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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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