About Elastic Report Month Period

Forum Home Forums Runtime Bugs About Elastic Report Month Period

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8201
    Avatarkcks66
    Participant

    Hi Mikhail,

    I am trying Elastic Report plugin to generate monthly report. I modified to become monthly period from the ElasticRepExample.xml. However, I got error.

    Screenshot-2021-01-30-140058

    Screenshot-2021-01-30-140122

    My modified xml code as below:

    <?xml version=”1.0″ encoding=”utf-8″?>
    <ElasticReportConfig>
    <!– Report may contain only one sheet to support different output formats –>
    <Sheet>
    <SheetOptions>
    <!– Heading of the report –>
    <Heading>Monthly Report Example</Heading>
    <!– Defines how the period is specified. Possible values: None, Day, Month –>
    <PeriodUnit>Month</PeriodUnit>
    <!– Hour of daily meter readings –>
    <ReadingHour>24</ReadingHour>
    <!– Day of monthly meter readings –>
    <ReadingDay>190</ReadingDay>
    <!– Allow to use readings at the next or the previous hour if the readings at ReadingHour are undefined –>
    <AllowNextHour>true</AllowNextHour>
    <!– Prepend additional day before the report begin date –>
    <PrependDay>true</PrependDay>
    <!– Append additional day after the report end date –>
    <AppendDay>false</AppendDay>
    </SheetOptions>

    <!– Output options work for PDF format only –>
    <OutputOptions>
    <!– Page format: A0, A1, A2, A3, A4, A5, A6, B5, Letter, Legal, Ledger or P11x17 –>
    <PageFormat>A4</PageFormat>
    <!– Page orientation: Portrait or Landscape –>
    <Orientation>Landscape</Orientation>
    </OutputOptions>

    <!–
    Section of TimeData type example.
    Supported calculation types: Val, Diff, DiffNext, Const, Formula.
    –>
    <Section>
    <SectionOptions>
    <!– The unique section ID. Use Latin characters without spaces –>
    <ID>Section1</ID>
    <!– Type defines the form of the section. Possible values: TimeData, TimeTime, DataData, Fields –>
    <SectionType>TimeData</SectionType>
    <!– Subheading of the section –>
    <Subheading>Monthly Energy Consumption</Subheading>
    <!– Show or hide subheading –>
    <SubheadingVisible>false</SubheadingVisible>
    <!– Detailing of the time. Possible values: Hour, Day, Month, BeginEnd –>
    <TimeDetailing>Month</TimeDetailing>
    <!– Skip the first time point of the working period –>
    <SkipFirstRow>false</SkipFirstRow>
    </SectionOptions>

    <!– Specification of the columns and data binding is below –>
    <Table>
    <ColumnGroup name=”Monthly Energy Consumption (kWh)”>
    <Column name=”Test Room 1″ cnlNum=”117″ calcType=”Val” />
    <Column name=”Test Room 2″ cnlNum=”217″ calcType=”Val” />
    <Column name=”Test Room 3″ cnlNum=”417″ calcType=”Val” />
    <Column name=”Test Room 4″ cnlNum=”517″ calcType=”Val” />
    <Column name=”Test Room 5″ cnlNum=”617″ calcType=”Val” />
    </ColumnGroup>
    </Table>
    </Section>
    </Sheet>
    </ElasticReportConfig>

    Pls advice and thank you.
    Pls take note that I do not have full month everyday files in ArchiveDAT.

    • This topic was modified 1 month ago by MikhailMikhail.
    #8209
    MikhailMikhail
    Moderator

    Hi,

    Please send the detailed error information that is written in C:\SCADA\ScadaWeb\log\ScadaWeb.log

    #8210
    MikhailMikhail
    Moderator

    If you select Excel or PDF, is the error the same?

    #8212
    Avatarkcks66
    Participant

    Hi Mikhail,

    The error was the same if I selected Excel or PDF. The error information from the log:

    2021-01-31 21:11:45 <MAC-WIN10><DefaultAppPool><ACT> Generate “Elastic report” report by the user admin
    2021-01-31 21:11:45 <MAC-WIN10><DefaultAppPool><EXC> Application error:
    System.ArgumentOutOfRangeException: Hour, Minute, and Second parameters describe an un-representable DateTime.
    at System.DateTime.TimeToTicks(Int32 hour, Int32 minute, Int32 second)
    at Scada.Web.Plugins.ElasticReport.Model.Builder.DocContext.InitWorkPeriod(DateTime startDate, DateTime endDate, Boolean prependDay, Boolean appendDay)
    at Scada.Web.Plugins.ElasticReport.Model.Builder.DocBuilder.GenerateDocument(ElasticRepConfig config, DateTime startDate, DateTime endDate, BuildOptions buildOptions)
    at Scada.Web.Plugins.ElasticReport.ElasticRepHtmlBuilder.GenerateHtml(ElasticRepConfig config, DateTime startDate, DateTime endDate, String& title)
    at Scada.Web.Plugins.ElasticReport.WFrmElasticRepHtmlOut.Page_Load(Object sender, EventArgs e)
    at System.Web.UI.Control.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Page: http://localhost/Scada/plugins/ElasticReport/ElasticRepHtmlOut.aspx?reportID=50&startDate=2021-01-01&endDate=2021-01-01
    User: admin

    #8226
    MikhailMikhail
    Moderator
    <!– Day of monthly meter readings –>
    <ReadingDay>190</ReadingDay>

    This parameter is a day of month. Set it to 1, for example.

    #8231
    Avatarkcks66
    Participant

    Hi Mikhail,

    I set it to 1, but I still having the same error.

    #8239
    MikhailMikhail
    Moderator

    Hi,
    <ReadingHour>24</ReadingHour> also can’t be 24. It’ in 0…23

    #8241
    Avatarkcks66
    Participant

    Hi Mikhail,

    I changed to 12 and it worked.
    Thank you.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.