Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Query language and DCS > Cannot open Evaluate Expression

Forum

Search UsersRules
Cannot open Evaluate Expression
#1
Active user
Points:: 0
Joined:: Jan 11, 2021

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.

Profile
#2
Active user
Points:: 0
Joined:: Jan 11, 2021

Erro message when press Print

Profile
#3
Active user
Points:: 0
Joined:: Jan 11, 2021

Error message when press Print

Profile
#4
Active user
Points:: 0
Joined:: Jan 11, 2021

Evaluate Expression is freezed

Profile
#5
Active user
Points:: 0
Joined:: Jan 11, 2021

Configuration file

Profile
#6
Administrator
Points:: 0
Joined:: Oct 3, 2019

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.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.