Cannot open Evaluate Expression

Common questions about 1C:Query language, Query builder tool and Data composition schema

#1
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jan 11, 2021
Company: Robot cho mọi người

Hi everyone
I'm following this video: Link
And I'm stucking at 3:16.
When I'm trying to open Evaluate Expression. It is freezed.

Download 1Cv8.cf (146.29 KB)
 
#2
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jan 11, 2021
Company: Robot cho mọi người

Erro message when press Print

 
#3
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jan 11, 2021
Company: Robot cho mọi người

Error message when press Print

 
#4
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jan 11, 2021
Company: Robot cho mọi người

Evaluate Expression is freezed

 
#5
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jan 11, 2021
Company: Robot cho mọi người

Configuration file

Download 1Cv8.cf (146.29 KB)
 
#6
People who like this:0Yes/0No
Administrator
Rating: 23
Joined: Oct 3, 2019
Company:

Hello Phan Hoàng Anh,

this is a common mistake. You have made the same description for the document and for the tabular section of this document (please see screenshot 1). Because of this, when building a query to the data, the system "doesn't understand" where to get the data from.

By the way, it's very easy to check the correctness of the query if you try to open the "Query Wizard". If the query contains a syntax error, the Wizard will not open, but an error will appear (screenshots 2 and 3).

In your case, it's enough to change the name of the virtual table "Expense" to "ExpenseRef" in the query, for example. (Screen 4 and 5)

And the query text will look like this:

Code
   Query.Text = "SELECT
                |   ExpenseRef.Account AS Account,
                |   ExpenseRef.Date AS Date,
                |   ExpenseRef.Shop AS Shop,
                |   ExpenseRef.Expense.(
                |      Amount AS Amount
                |   ) AS Expense
                |FROM
                |   Document.Expense AS ExpenseRef
                |WHERE
                |   ExpenseRef.Ref IN(&Ref)";


But in general, it is better to avoid a situation when the document itself and its tabular section have the same description.

Download 1.png (11.71 KB)
Download 2.png (17.47 KB)
Download 3.png (7.49 KB)
Download 4.png (30.39 KB)
Download 5.png (25.4 KB)
 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.