PANTHEON™ Help

 Категории
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]PANTHEON упатства
  [Collapse]Guide for PANTHEON
   [Expand]Settings
   [Collapse]Orders
    [Expand]Mass Print Orders
     Mass printing
     ER Diagram for Order Documents
    [Expand]Purchase orders
    [Expand]Sales Orders
    [Expand]Order Planning
    [Expand]Create purchase orders
    [Expand]Picking List
    [Collapse]Sales Order Report
      Orders Report - by Carrier
      Orders Report - Detalied by dispatch Date
      Order report Detailed by delivery priority
      Orders Report - Material Requirements - with Stock
      Orders report – by Persons Responsible
      Orders report – Summary by Subjects and Items – by Date
      Order Report -Delivery
      Orders report – Summary by Consignees
      Orders Report detailed (Serial Number)
      Examples of Sales Order Reports
      Save Sales Order Report Template
      Deactivating Unused Criteria
      Orders Report - Detailed
      SQLEXP - Customer Address in the Sales Order Report
      Orders Report - Detailed by Delivery Date
      Orders Report - Detailed by Serial Numbers
      Orders Report - Chronologically
      Orders Report - Summary by Items
      Orders Report - Material Requirements
      Orders Report - Summary by Subjects
      Orders Report - Summary by Subjects and items
      Orders Report - Linked Documents
      Orders Report - by Clerks
     [Expand]Difference between Ordered and Dispatched
     Purchase Order Report
     Izpis UPN
    [Expand]Special Payment Orders
    [Expand]Browse Orders
     Creating Orders in a Foreign Currency
   [Expand]Goods
   [Expand]Manufacturing
   [Expand]POS
   [Expand]Service
   [Expand]Financials
   [Expand]Personnel
   [Expand]Analytics
   [Expand]Desktop
   [Expand]Помощ
   [Expand]Старите продукти
   [Expand]Messages and Warnings
   [Expand]Additional programs
  [Expand]Ръководство за PANTHEON Търговия
  [Expand]Ръководство за PANTHEON Vet
  [Expand]Ръководство за PANTHEON Фермерство
 [Collapse]PANTHEON потребителски ръководства
  [Expand]Ръководство за потребителя за PANTHEON
  [Expand]Ръководство за потребителя за PANTHEON Retail
  [Expand]Ръководство за потребителя за PANTHEON Vet
  [Expand]Ръководство за потребителя за PANTHEON Farming
[Collapse]PANTHEON Web
 [Collapse]PANTHEON Web Guides
  [Expand]Ръководство за PANTHEON Web Light
  [Expand]Ръководство за PANTHEON Уеб Терминал
  [Expand]Ръководство за PANTHEON Web Legal
  [Expand]Архив на стари продукти
 [Collapse]PANTHEON Web User Manuals
  [Expand]Започване на PANTHEON Web
  [Expand]User Manual for PANTHEON Web Light
   Ръководство за потребителя за PANTHEON Web Terminal
  [Expand]Ръководство за потребителя за PANTHEON Web Legal
  [Expand]Архив на стари продукти
[Collapse]PANTHEON Гранула
 [Collapse]Ръководство за PANTHEON Гранули
  [Expand]Гранула за служители
  [Expand]Пътни заповеди Гранула
  [Expand]Гранула за документи и задачи
  [Expand]Гранула Табло
  [Expand]Гранула за B2B поръчки
  [Expand]Гранула за обслужване на клиент
  [Expand]Инвентаризация на дълготрайни активи
  [Expand]Гранула за складови наличности
 [Collapse]PANTHEON Granules
   Започване
   Using PANTHEON Granules at Tecta, a fictional company
  [Expand]PANTHEON Granules and activation
  [Expand]PANTHEON Granule Work records
  [Expand]PANTHEON Granule Travel orders
  [Expand]PANTHEON Granule Documents and Tasks
  [Expand]PANTHEON Granule B2B orders
  [Expand]PANTHEON Granule Dashboard
  [Expand]Полеви сервизен гранул
   PANTHEON Granules - FAQ
  [Expand]Инвентаризация на дълготрайни активи
  [Expand]Инвентаризация на склада Гранула
   Архив
[Expand]Потребителски сайт

Load Time: 484,3826 ms
"
  4206 | 4883 | 401601 | Localized
Label

SQLEXP - Customer Address in the Sales Order Report

   
      

Example of the Use on the Report.

WARNING

SQLEXP  is a function used by the program to generate reports which makes it possible to report information not available in the original RecordSet of a report. This way, you can include information from other tables and registers in reports for individual user reports.

Syntax:

SqlExp('<SQL sentence>')

Example of the Use on the Report 103 Order report - detailed

WARNING

Because the names of RecordSets and fields in the RecordSets could differ in each report, you must check the name of the RecordSets and fields for each concrete report.

 

You are collecting sales order and once a week you deliver these orders to consignees. In sales orders report you can create a report of non-dispatched orders with entered Delivery field (delivery method) Delivery - with own truck.

In the RecordSet of sales order report are not provided the customer's address or their contact person. All these data are available in the Subjects register, as for the the Subjects ID, it is already present in the RecordSet of the 103 Order report - detailed report.

All criteria were met to use the SQLEXP sentence in the report. Let's look!

 

1. Create a clone of report 103 Order report - detailed

2.  Add a text object.

3. Open the text editor and enter write the next SQL sentence:

Report of the customer's address from the sales order:

SQLEXP('select acAddress from tHE_SetSubj where acSubject = ' + dlQuotedStr(<qReportIzpis."acConsignee">) + '')

Comment:

qReportIzpis.acConsignee is a field from the recordset qReportIzpis, which is used to generate a report.

After replacing qReportIzpis.acConsignee, the SQL command is:

'select acAddress from tHE-Subj where acSubject = ''Some Customer'''

and thus the query that is executed is:

select acAddress from tHE_Subj where acName = 'Some Customer'.

 

Report of the customer's postal code and place from the subject register

SQLEXP('select P.acPost + '' '' + P.acName from tHE_SetSubj S left join tHE_SetPostCode P on S.acPost = P.acPost 
where S.acSubject = ' + dlQuotedStr(<qReportIzpis."acConsignee">) + '')

 

Report of the customer's contact  from the sales order

SQLExp('select (LTrim(RTrim(C.acName)) + '' '' + LTrim(RTrim(C.acSurname)) + '' '' + Cast(case when (A.acPhone = '''') then null else +  '' Phone: '' + A.acPhone end as Char(30))) as Ko +
from tHE_SetSubjContactAddress A  join tHE_SetSubjContact C on  A.acSubject = C.acSubject and A.anNo = C.anNo where A.acSubject = ' + dlQuotedStr(<qReportIzpis."acConsignee">) + '

 

 Reports:

Because you would like to sort non-dispatched orders by customers and than by order numbers, you have to select the appropriate report criteria in the Report settings:

Example of printout from of so designed report:

 

 

 

Оценете темата
Темата беше ли ви полезна?
Коментар
Вашият коментар ще бъде видим и във форума!