Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : lexical element error when trying to set Budget Overview (PL) report in CR XISearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v8 Forum

 New Topic 
 
 Post Reply 
[1]  
 lexical element error when trying to set Budget Overview (PL) report in CR XI 
 Author   Message 
  jessedolan 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-06-17 
 Profile
 Posted : 2008-06-26 23:16:24

I have created several reports using the data and templates found at http://doc.qodbc.com/qodbc/20/reports/sp_report_detail.html with great results.  However, I am having issues trying to get this to work with Budget reporting.  I have copied the example and pasted the following into the add comand report creation area;

sp_report ProfitAndLossBudgetOverview show Amount_Title, Text, Label, Amount parameters FiscalYear = 2003, BudgetCriterion = 'Accounts', SummarizeBudgetColumnsBy = 'Date', SummarizeBudgetRowsBy = 'Account'

I keep getting this error;

"Failed to retrieve data from the database.

Details: 42000:[QODBC] Expected lexical element not found: FiscalYear [Database Vendor Code: 11015]"

...and dont know how to resolve.  The default in the example is 2003.  I have tried everything I can think of to replace that, but no luck. 

Can someone point me in the right direction?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-06-28 07:39:20

There's nothing wrong with the statement:

sp_report ProfitAndLossBudgetOverview show Amount_Title, Text, Label, Amount parameters FiscalYear = 2003, BudgetCriterion = 'Accounts', SummarizeBudgetColumnsBy = 'Date', SummarizeBudgetRowsBy = 'Account'

other than may be FiscalYear = 2003 should be: FiscalYear = 2007 or 2008

See: How do I run a Profit & Loss Budget Overview Report? and How do I use QODBC with Crystal Reports? 

For sp_reports or manual SQL statements, you must use “Add Command” and type or paste your SQL statement or sp_report command.

 

  Top 
  jessedolan 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-06-17 
 Profile
 Posted : 2008-07-01 00:06:52

Tom,

Thanks for the help.  I agree, I am 100% trusting of the statement.  Any idea why the error though?  I use this product quite a bit with great success, just not on this specific report. 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-01 11:11:44

Repeat, there is nothing wrong with:-

It runs perfectly in Crystal Reports XI and I get the report to display without any errors:

 

  Top 
  jessedolan 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-06-17 
 Profile
 Posted : 2008-07-01 11:57:45

Tom,

I respect your position and agree with you that there is nothing wrong with the code.  That point is not disputed and I attempted to state as such in my last reply.  However, I do have a real life error on my end, and I have posted this question for help.

It gives me the error code posted no matter what I try.  With the assumption by all of us that the code is NOT the problem, what could it be?  Do you have any feedback as to the references in the error code? 

I am not an expert, but if you (or anyone else) are able to point me in a direction it would help a great deal.   

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-01 12:49:41
I'm not talking about the code or SQL command here, what I'm saying is that I did what you said doesn't work using Crystal Reports XI and it worked without a lexicon error, which is simply a syntax error. Try starting a new report and add (paste) the command into the report again using FiscalYear = 2007. 

  Top 
  jessedolan 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-06-17 
 Profile
 Posted : 2008-07-02 00:31:26

Tom,

I tried a new report, same issue.  Further, I did the same with several of the sample sp_report templates and found that any report that references budget gets this error.  I have done this dozens of times, but just wanted to verify for you.  I understand that it does work fine for you, and should for me.  I am sure the problem is not with the driver or the report format, but something else and unique to my situation. 

I did some digging and found that in QuickBooks (2003) our budget is setup as Fiscal Year 200X-0X, not Fiscal Year 200X.  Our fiscal is not a calendar year.  I am not sure how this is referenced on the back side, but in QB that is the format.  Is the root of the error in that?  Here is a quick screenshot of an example (this is 2005-2006). 

 

Again, I understand all of this SHOULD work...but it is not.  Every other thing is working exactly right, and has for quite some time (multiple sp_reports based reports).  This is a bug that has me stumped.  Something is wrong, and there is a solution to be found...just needing some expert advice on where to look. 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-02 08:10:36

Interesting, try:

sp_report ProfitAndLossBudgetOverview show Amount_Title, Text, Label, Amount parameters FiscalYear = 5, BudgetCriterion = 'Accounts', SummarizeBudgetColumnsBy = 'Date', SummarizeBudgetRowsBy = 'Account'

 

  Top 
  jessedolan 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-06-17 
 Profile
 Posted : 2008-07-15 07:53:27

Sorry for the delay...been messing with this on and off...

Tried what you reccomended, same thing still.  Does the error given provide any direction for me to look into on my side?  Otherwise the only other variable is my "non calendar year" fiscal reporting period.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-15 07:57:22
Try using VB Demo instead. See: How do I use the VB Demo for testing?  

  Top 
  jessedolan 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-06-17 
 Profile
 Posted : 2008-07-15 08:06:23

Same thing.  Tried various options for date, including all reccomened previous to this...

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-15 08:15:02
Please advise what version of QuickBooks you are using (Country version and year). 

  Top 
  jessedolan 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-06-17 
 Profile
 Posted : 2008-07-15 22:51:23
QuickBooks Premier: Contractor Edition 2003, USA.  Fully updated. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-16 07:55:17
Effective April 30, 2006, in accordance with Intuit's QuickBooks Sunset Policy, QODBC is no longer actively supported on QuickBooks 2003 (or earlier) and QuickBooks Enterprise Solutions Version 2.0 & 3.0. Please upgrade to a later version of QuickBooks.
 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to