Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > EndOfDay() in Reports

Forum

Search UsersRules
EndOfDay() in Reports
#1
Interested
Points:: 0
Joined:: Nov 10, 2011

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!

Profile
#2
Just came
Points:: 0
Joined:: Jan 22, 2015

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).

Profile
#3
Interested
Points:: 0
Joined:: Nov 10, 2011

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

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.