The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Hello!

I am trying to configure something similar to DateOnChange() in a report with MainDataCompositionSchema. The problem is that if a user selects EndOfPeriod, the programm takes a date with the time 00:00:00. Therefore the user has to change ist manually to 23:59:59, otherwise the data are wrong (it does not consider documents created e.g. at 12:15:13).

Query is

Code
WHERE SalesTabak.Period >= &BeginOfPeriod
   AND SalesTabak.Period <= &EndOfPeriod


In another report with the code in modul it works fine:

Code
&AtClient
Procedure EndDateOnChange(Item)
   EndDate = EndOfDay(EndDate);
EndProcedure


but I could not manage to configure the report with MainDataCompositionSchema in order to get the same result.

Where can I change these settings?

Thank you in advance for your reply!

Edited: Lioudmila Nemtseva - Aug 26, 2015 03:27 PM
 
#2
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Jan 22, 2015
Company:

You can use EndOfPeriod function in you query:

Code
EndOfPeriod(&EndDate,"Day")

You can also use this method for parameter on the Parameters tab in Data Composition Schema.
If you need more information you can look example in 1C:Enterprise 8.3 Practical developer guide about Parameters tab (pages 315-319).

Edited: Valeriy Dyachenko - Aug 26, 2015 10:50 PM
 
#3
People who like this: 0 Yes / 0 No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Thank you very much, Valeriy! It works fine now!

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