Method Community

 

Inconsistent Results and Errors Generating Report

Last post 07-03-2012 9:51 AM by Method_Ted. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-28-2012 4:36 PM

    • Rolf
    • Top 50 Contributor
    • Joined on 09-18-2011
    • Posts 109

    Inconsistent Results and Errors Generating Report

    I'm creating a report based on the customer table wherein I extract records that fall within a date range defined by two date picker objects on the screen and one other criteria.  If either or both of those fields are empty, I enter default  start and/or end dates as necessary.  I also save these two date values in a separate unrelated global values table; to be used by the report generator to enter the date range on the report.  In the Report Designer this all works fine and as expected.  However, when generating the actual report, I get inconsistent results. 

    If the date range was initially blank,  the  default dates are entered, and then the report is created. It properly displays the date range from the global values table, but the records retrieved are all records matching the second criteria, and the date range is ignored completely.  This also happens if either the start date  or the end date is blank prior to running the report.  If however, both dates are entered first, then the report extracts the proper records matching both the date range and the second criteria, but will not display the global value dates on the report.

    After considerable time and energy trying to  determine what is happening, I think it may be related to how date formats are handled in the report generator.  I say this because during testing I changed the condition from "within the date range"  to" greater than or equal to"  the start date value.  When the start date was initially blank,   the report would generate and select the correct records ( although still not displaying the global date values)  If, however, there was an initial value in the start date field, the report would not generate at all and I got an   "unspecified error loading the report"  error.  Screen messages during testing indicate the blank fields are filled with the date format as  "6/28/2012" while dates from the field are  " Jun-28-2012"

    I know this was a rather long and detailed description of the problem, but I felt that was necessary  for you to have any chance of reproducing it.

    I look forward to your comments on this.  Thanks,

    Rolf

     

     

  • 06-29-2012 12:47 PM In reply to

    Re: Inconsistent Results and Errors Generating Report

    Answer

    @Rolf

    Thanks for the detailed information and I agree that it looks like a date format issue that is causing the error. I would check the format that it passing to the Report Generator and make the report of the same format. I would also check in the date field of the report for the format that is it displaying. 

    I would modify the FormatString Editor to have the same date format. I have enclosed the screenshot of this menu to help illustarte this point.

    Please let me know if I can be of further assistance.

     

    Ted Le
    Customization Solution Specialist
    Method Integration
    Local: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: t.le@methodintegration.com
    Website: http://www.methodintegration.com
  • 06-30-2012 2:18 PM In reply to

    • Rolf
    • Top 50 Contributor
    • Joined on 09-18-2011
    • Posts 109

    Re: Inconsistent Results and Errors Generating Report

    Answer

    Ted,

    Thanks for the quick response.  I had already tried all that, and it doesn't help. Furthermore, date formatting should only affect the way dates are displayed; the underlying value remains the same. So, it should have no impact on any logical value comparisons.

    That's the first thing that should be fixed, if in fact that's what is happening, which was only a guess on my part.

    The second problem  is that the Global value field I mentioned in my original post is also not printing consistently, and it is totally independent of the date range evaluation, so that makes no sense at all.

    If you can duplicate this problem, then you might want to have the designers have a look, because I would think proper date handling is central to many Report Generation activities.

    I have come up with a workaround that mostly does what I want, but would prefer not to have to do that in other reports I need to create.

    I do have a different question though;  how do I do a count of the number of records matching my criteria in a report?

    thanks in advance for your help,

    Rolf

     

     

  • 07-03-2012 9:51 AM In reply to

    Re: Inconsistent Results and Errors Generating Report

    @Rolf

    If you like us to review the issue further and your work-around then I will gladly forward it to our developers. Please email them to me and we will examine it further.

    Rolf:
    how do I do a count of the number of records matching my criteria in a report?

    As far as counting the number of matches, there is a function in the Report Designer in the 'Summary Editor' called 'Count'. I have enclosed the screenshot of this menu. This function is similar to the one in Method with the 'Retrieve value from table' action with the property 'Retrieve Count' where it will return the number of matches within the table.

    Please let me know if I can be of further assistance.

    Ted Le
    Customization Solution Specialist
    Method Integration
    Local: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: t.le@methodintegration.com
    Website: http://www.methodintegration.com
Page 1 of 1 (4 items)