+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
MIS Systems Thread, CommandReporter param files and parameter IDs in Technical; Right I have a result!!! Thank you for trying that report, I'm glad it's not just me that it fails ...
  1. #16

    Join Date
    Sep 2011
    Location
    Southampton
    Posts
    13
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Right I have a result!!!

    Thank you for trying that report, I'm glad it's not just me that it fails for.

    What I wanted was a record of all the group memberships that were active during the given date range. This will be further enhanced by filtering on pupil name or similar to limit the result set. What I have done to achieve this is split the filter into 2 and asked for (pseudo query clause):
    Code:
    (all memberships started before the later date) AND (all memberships ended after the earlier date)
    That basically gives me all the group memberships that are active during the date window. This is what the Active filter does within SIMS but fails on through the command line. Given the mess it outputs for the filter using /PARAMDEF on the command line and the fact it won't read back I'm going to go out on a limb and say this is a bug in CommandReporter for that filter at least.

    Thank you so much for help LosOjos. Also very glad I have discovered EduGeek.

  2. #17

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,452
    Thank Post
    1,439
    Thanked 1,170 Times in 798 Posts
    Rep Power
    707
    Always happy to [attempt to] help!

    And welcome to EduGeek, I hope it's not the last time you find the place useful!

  3. #18

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,968
    Thank Post
    672
    Thanked 1,383 Times in 1,145 Posts
    Rep Power
    350
    Quote Originally Posted by DoctorPolski View Post
    Right I have a result!!!

    Thank you for trying that report, I'm glad it's not just me that it fails for.

    What I wanted was a record of all the group memberships that were active during the given date range. This will be further enhanced by filtering on pupil name or similar to limit the result set. What I have done to achieve this is split the filter into 2 and asked for (pseudo query clause):
    Code:
    (all memberships started before the later date) AND (all memberships ended after the earlier date)
    That basically gives me all the group memberships that are active during the date window. This is what the Active filter does within SIMS but fails on through the command line. Given the mess it outputs for the filter using /PARAMDEF on the command line and the fact it won't read back I'm going to go out on a limb and say this is a bug in CommandReporter for that filter at least.

    Thank you so much for help LosOjos. Also very glad I have discovered EduGeek.
    Glad you got it sorted it in the end. You'll be hooked now @DoctorPolski

    Is your new report identical apart from the type of comparison your are doing with the filter? I.e. are you just changing 'Active during' to 'Active before date' or some such?

    I'm just wondering if it's the same filter but just a different condition. If so, it's a strange one. At any rate, it's worth logging a case with Capita, as if it's a bug, it can be looked at and rectified. Or you may just have to log a change request to that functionality added!

  4. #19

    Join Date
    Sep 2011
    Location
    Southampton
    Posts
    13
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi vikpaw, yeah I'm hooked already.

    I'm using a different filter now. Rather than the bugged "Active" filter I'm now using a combo of "Start date"/"End date" to achieve the same goal. It makes the pseudo query much more complicated but achieve the same result.

    How and where would I report such a thing to Capita? If it is part of the usual laborious escalation process I shan't bother. Code bugs ought to be referred from web devs like me straight to the coders at CCS.

  5. #20

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,968
    Thank Post
    672
    Thanked 1,383 Times in 1,145 Posts
    Rep Power
    350

    I thought maybe that if no conditions on that filter worked it would be easy to replicate, if it's only the 'between dates' part, it should still be reported.
    You'd have to go through the usual channels of starting a support incident. The fact that it's been replicated by @LosOjos gives you some backup.
    I would create a case on SupportNet and so bypass any inane troubleshooting over the phone. If you put the case clear enough, they may just escalate straight away...
    Then three weeks later tell you that is how it was designed and you need to log a change request , but if you're lucky and they agree it's a bug then they may just fix it overnight.

  6. #21

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,452
    Thank Post
    1,439
    Thanked 1,170 Times in 798 Posts
    Rep Power
    707
    Sorry to re-raise this thread, but I've had sort of a break through with this I think...

    Still not sure it will work for the original query, but I've discovered that to pass parameters on the command line, you should use an apostrophe (') in the place of quotes ("), and that the format for date ranges should be "YYYY-MM-DDTHH:MM:SS" everywhere except the effective date, which has the format "DD/MM/YYYY HH:MM:SS" for some reason...

    Been banging my head all morning trying to get date filters to work!

  7. #22

    Join Date
    Mar 2007
    Posts
    39
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    16
    LosOjos,

    I have managed successfully to pass xml parameters directly to CR to do roughly what you are trying to do.
    I did it via a batch file first to get it working but in the finished app I build up the parameter string and send the whole command line to CR via by creating a new process on the fly.
    The relevant bit of code is below (in Pascal). The variables StrDateBefore and StrDateAfter are strings of the form 2011-05-12
    Code:
    params := '';
    params := params + ' /PARAMS:"';
    params := params + '<ReportParameters>';
    params := params + '<Parameter id=''DDNzGLsaAUi8eGtd+3PIGw=='' subreportfilter=''True''>';
    params := params + '<Name>Mark date</Name>';
    params := params + '<Type>Date</Type>';
    params := params + '<PromptText>MarkDateBefore</PromptText>';
    params := params + '<Values>';
    params := params + '<Date>' + StrDateBefore + 'T00:01:00</Date>';
    params := params + '</Values>';
    params := params + '</Parameter>';
    params := params + '<Parameter id=''eNvt6kqoTcUAoHB2VMyWRg=='' subreportfilter=''True''>';
    params := params + '<Name>Mark date</Name>';
    params := params + '<Type>Date</Type>';
    params := params + '<PromptText>MarkDateAfter</PromptText>';
    params := params + '<Values>';
    params := params + '<Date>' + StrDateAfter + 'T23:59:00</Date>';
    params := params + '</Values>';
    params := params + '</Parameter>';
    params := params + '</ReportParameters>"';
    The trick I found I needed was to add a time part to the date as well.

    so the whole string as generated would be something like
    /PARAMS:"<ReportParameters><Parameter id=''DDNzGLsaAUi8eGtd+3PIGw=='' subreportfilter=''True''><Name>Mark date</Name><Type>Date</Type><PromptText>MarkDateBefore</PromptText><Values><Date>2011-05-12T00:01:00</Date></Values></Parameter><Parameter id=''eNvt6kqoTcUAoHB2VMyWRg=='' subreportfilter=''True''><Name>Mark date</Name><Type>Date</Type><PromptText>MarkDateAfter</PromptText><Values><Date>2011-01-10T23:59:00</Date></Values></Parameter></ReportParameters>"
    then I put that string after all the other parameters that get sent to CR (sims username, report name etc)

    It not much different to putting it in a file and passing the name of the file but doing it this way saves one more step and fully automates the process.

  8. Thanks to iceman from:

    LosOjos (20th October 2011)

  9. #23

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,452
    Thank Post
    1,439
    Thanked 1,170 Times in 798 Posts
    Rep Power
    707
    Quote Originally Posted by iceman View Post
    LosOjos,

    I have managed successfully to pass xml parameters directly to CR to do roughly what you are trying to do.
    I did it via a batch file first to get it working but in the finished app I build up the parameter string and send the whole command line to CR via by creating a new process on the fly.
    The relevant bit of code is below (in Pascal). The variables StrDateBefore and StrDateAfter are strings of the form 2011-05-12
    Code:
    params := '';
    params := params + ' /PARAMS:"';
    params := params + '<ReportParameters>';
    params := params + '<Parameter id=''DDNzGLsaAUi8eGtd+3PIGw=='' subreportfilter=''True''>';
    params := params + '<Name>Mark date</Name>';
    params := params + '<Type>Date</Type>';
    params := params + '<PromptText>MarkDateBefore</PromptText>';
    params := params + '<Values>';
    params := params + '<Date>' + StrDateBefore + 'T00:01:00</Date>';
    params := params + '</Values>';
    params := params + '</Parameter>';
    params := params + '<Parameter id=''eNvt6kqoTcUAoHB2VMyWRg=='' subreportfilter=''True''>';
    params := params + '<Name>Mark date</Name>';
    params := params + '<Type>Date</Type>';
    params := params + '<PromptText>MarkDateAfter</PromptText>';
    params := params + '<Values>';
    params := params + '<Date>' + StrDateAfter + 'T23:59:00</Date>';
    params := params + '</Values>';
    params := params + '</Parameter>';
    params := params + '</ReportParameters>"';
    The trick I found I needed was to add a time part to the date as well.

    so the whole string as generated would be something like


    then I put that string after all the other parameters that get sent to CR (sims username, report name etc)

    It not much different to putting it in a file and passing the name of the file but doing it this way saves one more step and fully automates the process.
    Thanks for clarifying @iceman - between the lot of us we should crack this!

    After playing with this a lot, I'm now convinced that the "date between" type parameter simply does not work from CLR - I'm going to report it as a bug.

    No matter how I format dates, they get ignored by SIMS in any "date between" field, but if I pass them separately as "date after" and "date before", it works.

    EDIT: every time I think I have it working it doesn't still just returning the dates I set in SIMS and ignoring my parameters.
    Last edited by LosOjos; 20th October 2011 at 01:17 PM.

  10. #24

    Join Date
    Mar 2007
    Posts
    39
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    16
    @LosOjos
    I found that as well. That's why I did it in a rather more verbose way, but at least I had more control.
    PS you have a PM from me

  11. #25

    Join Date
    Sep 2011
    Location
    Southampton
    Posts
    13
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I tried it with the "T" in the format of the datetime as per the xml and all other variations of ' and " and it simply does not work.

    The file generated by /paramdef doesn't even show the format like it does for every other filter I have used.

    In short I agree that the "date between" field is broken for CLR.

    Quote Originally Posted by LosOjos View Post
    Thanks for clarifying @iceman - between the lot of us we should crack this!

    After playing with this a lot, I'm now convinced that the "date between" type parameter simply does not work from CLR - I'm going to report it as a bug.

    No matter how I format dates, they get ignored by SIMS in any "date between" field, but if I pass them separately as "date after" and "date before", it works.

  12. #26

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,452
    Thank Post
    1,439
    Thanked 1,170 Times in 798 Posts
    Rep Power
    707
    @iceman - do you tend to use attendance mark date "from" and "to" for your extraction? I'm trying to do that but am getting nowhere; SIMS ignores my parameters and just returns the ones I "hard coded" in to the report so I could et the paramdef...

  13. #27

    Join Date
    Mar 2007
    Posts
    39
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    16
    Quote Originally Posted by LosOjos View Post
    @iceman - do you tend to use attendance mark date "from" and "to" for your extraction? I'm trying to do that but am getting nowhere; SIMS ignores my parameters and just returns the ones I "hard coded" in to the report so I could et the paramdef...
    The fields I use are the adno and upn and then a sub report of the various bits of attendance marks that I want, filtered to where 'Mark Date is after ...' AND 'Mark Date is Before...' with a user defined prompt string for both (with no spaces in them! - Sims is rather notorious for producing field names and parameters containing characters not easily used by other database systems).

    The report is designed with sensible, but arbitrary, dates hard coded in it for the before and after dates (If I remember correctly the dates I use are after 15th August 2009 and before 29th July 2010.) On its own, if it were to be run prior to july 2010 that would produce loads of attendance marks of '-' meaning they were missing because they were in the future.

    But as the report also has 'prompt at runtime' checked, if you run it directly from sims that's exactly what it will do and it will ask for the two parameters of before and after dates (so you can test it).
    However if you run it via CR it will expect the parameters to come from a params file or else directly via an XML string, which is what I give it.

    When my attendance system refreshes its data it first generates the two dates it wants ie for 'after' it uses the day before the first day of the current academic year and for 'before' is uses the date of the Saturday of the last week to contain a teaching day before the current date, taking into account holidays. It then passes those dates to command reporter as the parameters. That way I only get attendance marks in the range I need.

  14. Thanks to iceman from:

    LosOjos (21st October 2011)

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Mass Copy of Files and Folders
    By originofsymmetry in forum Scripts
    Replies: 6
    Last Post: 2nd October 2007, 12:16 PM
  2. Restrict "Search files and folders"
    By sandfie in forum Windows
    Replies: 4
    Last Post: 26th March 2007, 10:45 PM
  3. Replies: 4
    Last Post: 15th November 2006, 03:19 PM
  4. files and settings transfer wizard
    By beeswax in forum Windows
    Replies: 2
    Last Post: 17th May 2006, 08:25 AM
  5. Monitoring of Staff and Student files and emails
    By mark in forum School ICT Policies
    Replies: 12
    Last Post: 12th July 2005, 12:01 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •