Crystal Reports Error In Compiling Sql

Contents

A few crafty individuals, like Kurt, have figured out that you can in fact inset a full SELECT query into a SQL Expression and it will be inserted into the CR One alternative is to use a subreport to get the counts. Edited by BrianBischof - 30 Aug 2007 at 6:16pm Please support the forum! Well, at least it makes more sense now.... Check This Out

Cust_id Name Address City State Zip Age Date of Purchase. It is more like this in SQL (select distinct count(x.evid_id) from reptext x INNER JOIN evidence e ON e.evid_id=x.evid_id INNER JOIN dnaProfile d ON x.result_id=d.Result_id where x.req_id = "REPTEXT"."REQ_ID") AS EvidIdCount, In regarding this report, I don't think my system is keeping track of how an item gets to station 650 - it's just concerned about if an item resides there or But i got a error which says Error in compiling SQL Expression Database Connector Error:'42000:[Microsoft][ODBC SQL Server Driver][SQL Server][Incorrect sybtax near the keyword 'select'.[Database Vendor Code:156]' Note :I am establishing connection

Crystal Sql Expression Multi-part Identifier Could Not Be Bound

Thanks May 18 '07 #10 reply Expert 2.5K+ P: 3,235 Motoma Creating an SQL based report in CR does not require any manipulation inside the SQL Expression Field. I know I can create a Parameter List, but this will come up as a prompt every time the report is run which does not work well with my ERP application Now i want a report that conatins only Name,Address and Age.

Access project and SQL server 2000. Join Us! *Tek-Tips's functionality depends on members receiving e-mail. But there are different combinations and paths an item can take, depending on what the item is and how many are being made at a particular instance. Want to Advertise Here?

May 15 '07 #5 reply Expert 100+ P: 1,208 iam_clint SELECT name, address, age FROM t1 where age > 20 May 15 '07 #6 reply P: 16 sandyboy Thanks for your Crystal Reports Sql Expression Syntax dbo . And Kurt is correct when he says that it may only return a single row of info. I may be missing something, but I can't see a way to tie the SQL expression to a specific value in the main query.

Comment Submit Your Comment By clicking you are agreeing to Experts Exchange's Terms of Use. I see. You'll also learn how to use your custo… MS Excel Fonts-Typography MS Office Advertise Here 737 members asked questions and received personalized solutions in the past 7 days. There is a Show SQL Query also under the Database menu.

I was hoping that it can "return a single, distinct value per each record in the main recordset" per Kurt's thread.( select x.doc_ref1 from glf_ldg_acc_trans x where x.ldg_name = 'APLED09' and

I inserted my subquery into the main crystal query and ran it in Query Analyzer.

The way we solved the problem was to change the connection to go directly to oracle instead of using an ODBC connection.

Crystal Reports Sql Expression Syntax

odbc vs. Post your question and get tips & solutions from a community of 418,472 IT Pros & Developers. Crystal Sql Expression Multi-part Identifier Could Not Be Bound SELECT `Customer`.`Last Year's Sales`, `Customer`.`Customer Name`,(SELECT Sum(`B1`.`Last Year's Sales`) FROM `Customer` `B1` WHERE `B1`.`Customer ID` <= `Customer`.`Customer ID`) AS RunningTotalSales FROM `Customer` `Customer`the above uses the alias B1 in the subselect I want to do this in CR.

My home PC has been infected by a virus! his comment is here Tell others by linking to it on your blog or website:Crystal Reports Forum IP Logged Printable version Forum Jump -- Select Forum -- Announcements Talk with the Author Self-Publishing Job Do you really need a subquery to get that count? The validation only happens when the expression is being modified and saved, which is why the report will run when first opened.

Clearly the comment doesn't make a difference to the database engine, but it must have some effect on the CR validation. Help! This expression works in all CR versions: ( SELECT Min ( ONDATE ) FROM GM6.dbo.CAL WHERE ACCOUNTNO = Contact1.AccountNo ) It is curious that the alias of the CAL

I don't think I want to make an IF/THEN to ignore say the 99 UPTO_QTY values.

Subscribe to our monthly newsletter for tech news and trends Membership How it Works Gigs Live Careers Plans and Pricing For Business Become an Expert Resource Center About Us Who We Sorry for the confusion... Generally each SPEC_NO will only have a connection to no more than 4 MACH_NO. When you are in the Formula editor expand the Function list and you will not see a SELECT function.

If you need to do more with the counts, the subreport can save the count in a shared variable and you can then use that variable in the main report. However, this is the error I keep getting when I check the formula: Error in compiling SQL Expression : Database Connector Error: '42000:[Microsoft][ODBC SQL Server Driver][SQL Server]The multi-part identifier "REPTEXT.req_id" could The bug only affects SQL Expressions that contain a correlated sub-query. navigate here So i connected to the database and inside SQL expressions Field i wrote the following query, SELECT name,address,age FROM t1 Is this correct.

The following example comes from the Xtreme Sample Database: (SELECT Max ( Orders.`Order ID`) FROM `Orders` Orders) Normally a CR SQL Expression would error on the SELECT, but if you put Consult your database documentation for additional information. not entirely sure if this helps or even answer your comment... This last behavior was discovered by Bob Antaki, a developer with the Bay Area News Group in California.

So is the problem with the connection or with the query i wrote. What field in the query is this going to link to? Click Here to join Tek-Tips and talk with other members! Very simple! 2.