Jump to content

benrwb

Members
  • Posts

    7
  • Joined

  • Last visited

Reputation

0 Neutral

About benrwb

Personal Information

  • Location
    Wolverhampton
  1. Excel doesn't have a built-in Box and Whisker chart type, but it's possible to make something similar-looking using a Stock chart. I have created a PDF detailing how to do this: Creating a box and whisker plot in Excel 2007.pdf
  2. Just leaving this here in case anybody comes up against the same problem in future.... I wanted to give a member of staff read-only access to Staff Contracts in SIMS.net. (Autumn 2012 release, 7.148) None of the built-in groups in System Manager seemed to offer the level of access I wanted, so I created my own. I granted the group read-only access to staff details (by selecting "Staff" from the permissions list and clicking "Set View"). However, when the user logged on and opened the staff details page, the "Contract" and "Service Agreement" panels (under section 8. Employment Details) were completely missing. Eventually, after experimenting with Permissions, I found the answer was to enable the "P7 Field Trial" permission, under Personnel. This solved the problem and the Contract and Service Agreement panels then appeared, allowing read-only access.
  3. I have recently modified the simsperm.bat file so that it could be deployed as a startup script via group policy on our network. vikpaw suggested I share it here in case it's useful. I don't currently have access to any Windows 7 computers, so it might not work on Win 7 due to the increased security. But it does work perfectly (or at least seems to!) on Windows XP. @echo off if not exist "%ProgramFiles%\SIMS" goto end if exist "%ProgramFiles%\SIMS\doneperm.txt" goto end path \\[color="red"]server[/color]\netlogon SubInAcl /FILE %WINDIR%\SIMS.INI /GRANT=[color="red"]domain\group[/color]=F SubInAcl /SUBDIRECTORIES "%ProgramFiles%\SIMS\*.*" /GRANT=[color="red"]domain\group[/color]=F SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes /GRANT=[color="red"]domain\group[/color] SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID /GRANT=[color="red"]domain\group[/color] SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface /GRANT=[color="red"]domain\group[/color] SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib /GRANT=[color="red"]domain\group[/color] echo y >"%ProgramFiles%\SIMS\doneperm.txt" :end Notes: SubInAcl.exe must be copied to the netlogon folder. Obviously replace the bits in red with values specific to your network. To deploy via group policy... (Instructions for Windows Server 2003) 1. Open Active Directory Users and Computers 2. Right-click the domain and choose Properties 3. Group Policy 4. Edit the "Domain Computers" Policy 5. Go to Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) 6. Startup scripts 7. Save the above batch file into the correct folder (which can be found by clicking 'Show files') then Add it.
  4. benrwb

    SIMSPERM!

    @vikpaw I'm trying to get hold of a Windows 7 system to test it on. If I can get it working I will report back with the results. @kevin_lane In my school simsperm is still required, as we haven't switched to SOLUS yet.
  5. benrwb

    SIMSPERM!

    I have adapted the SIMSPERM batch file so that it can be applied as a Startup Script via Group Policy. @echo off if not exist "%ProgramFiles%\SIMS" goto end if exist "%ProgramFiles%\SIMS\doneperm.txt" goto end path \\[color="red"]server[/color]\netlogon SubInAcl /FILE %WINDIR%\SIMS.INI /GRANT=[color="red"]domain\group[/color]=F SubInAcl /SUBDIRECTORIES "%ProgramFiles%\SIMS\*.*" /GRANT=[color="red"]domain\group[/color]=F SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes /GRANT=[color="red"]domain\group[/color] SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID /GRANT=[color="red"]domain\group[/color] SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface /GRANT=[color="red"]domain\group[/color] SubInAcl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib /GRANT=[color="red"]domain\group[/color] echo y >"%ProgramFiles%\SIMS\doneperm.txt" :end Notes: SubInAcl.exe must be copied to the netlogon folder. This has been tested with Windows XP only. Not sure if it will work on Vista/7.
  6. I've been playing around with the WinForms WebBrowser control this morning, and after lots of experimentation have finally figured out how to use some of the printing functionality. First of all, Add a Reference to SHDocVw. (Project > Add Reference > Browse > C:\Windows\System32\shdocvw.dll) Secondly load a document into the browser using webBrowser1.Navigate(url). Then, to do "Print Preview"... [color="#teal"]IWebBrowser2 [/color]browser = ([color="teal"]IWebBrowser2[/color])webBrowser1.ActiveXInstance; [color="blue"]object [/color]pvaIn = [color="teal"]Missing[/color].Value; [color="blue"]object [/color]pvaOut = [color="teal"]Missing[/color].Value; browser.ExecWB([color="teal"]OLECMDID[/color].OLECMDID_PRINTPREVIEW, [color="teal"]OLECMDEXECOPT[/color].OLECMDEXECOPT_DODEFAULT, [color="blue"]ref [/color]pvaIn, [color="blue"]ref [/color]pvaOut); To show the "Page Setup" dialog... [color="#teal"]IWebBrowser2 [/color]browser = ([color="teal"]IWebBrowser2[/color])webBrowser1.ActiveXInstance; [color="blue"]object [/color]pvaIn = [color="teal"]Missing[/color].Value; [color="blue"]object [/color]pvaOut = [color="teal"]Missing[/color].Value; browser.ExecWB([color="teal"]OLECMDID[/color].OLECMDID_PAGESETUP, [color="teal"]OLECMDEXECOPT[/color].OLECMDEXECOPT_DODEFAULT, [color="blue"]ref [/color]pvaIn, [color="blue"]ref [/color]pvaOut); To Print straight away, without prompting the user: [color="#teal"]IWebBrowser2 [/color]browser = ([color="teal"]IWebBrowser2[/color])webBrowser1.ActiveXInstance; [color="blue"]object [/color]pvaIn = [color="teal"]Missing[/color].Value; [color="blue"]object [/color]pvaOut = [color="teal"]Missing[/color].Value; browser.ExecWB([color="teal"]OLECMDID[/color].OLECMDID_PRINT, [color="teal"]OLECMDEXECOPT[/color].OLECMDEXECOPT_DONTPROMPTUSER, [color="blue"]ref [/color]pvaIn, [color="blue"]ref [/color]pvaOut); (The first three lines are same every time, it's only the last line that's different).
  7. Posting this code so that I can remember it/ and in case anyone else finds it useful. First open the database [color="blue"]string [/color]constr = [color="#8b0000"]@"Provider=Microsoft.Jet.OLEDB.4.0;Data source=database.mdb"[/color]; [color="teal"]OleDbConnection [/color]con = [color="blue"]new [/color][color="teal"]OleDbConnection[/color](constr); con.Open(); con.GetSchema() will return a list of collections in the database. CollectionName NumberOfRestrictions NumberOfIdentifierParts --------------------- -------------------- ----------------------- MetaDataCollections 0 0 DataSourceInformation 0 0 DataTypes 0 0 Restrictions 0 0 ReservedWords 0 0 Columns 4 4 Indexes 5 4 Procedures 4 3 Tables 4 3 Views 3 3 The Tables collection contains the information we want, so call con.GetSchema("Tables"). TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE TABLE_GUID DESCRIPTION TABLE_PROPID DATE_CREATED DATE_MODIFIED -------------- ------------- --------------------------- ----------- ---------- ----------- ------------ ---------------- --------------- clschk TABLE 29/12/2010 09:20 29/12/2010 09:20 coursedesc TABLE 29/12/2010 09:20 10/01/2011 09:00 MSysAccessStorage ACCESS TABLE 29/12/2010 09:30 29/12/2010 09:30 MSysACEs SYSTEM TABLE 29/12/2010 09:20 29/12/2010 09:20 MSysNavPaneGroupCategories ACCESS TABLE 29/12/2010 09:30 29/12/2010 09:30 MSysNavPaneGroups ACCESS TABLE 29/12/2010 09:30 29/12/2010 09:30 MSysNavPaneGroupToObjects ACCESS TABLE 29/12/2010 09:30 29/12/2010 09:30 MSysNavPaneObjectIDs ACCESS TABLE 29/12/2010 09:30 29/12/2010 09:30 MSysObjects SYSTEM TABLE 29/12/2010 09:20 29/12/2010 09:20 MSysQueries SYSTEM TABLE 29/12/2010 09:20 29/12/2010 09:20 MSysRelationships SYSTEM TABLE 29/12/2010 09:20 29/12/2010 09:20 sessioninfo TABLE 29/12/2010 09:20 29/12/2010 09:20 y11_subjectpred TABLE 29/12/2010 09:20 29/12/2010 11:50 y11_tutorltnopro TABLE 29/12/2010 09:20 29/12/2010 09:20 All of the user-created tables have a TABLE_TYPE of "TABLE". The following code puts them into a list: [color="teal"]List[/color]<[color="blue"]string[/color]> tables = [color="blue"]new [/color][color="teal"]List[/color]<[color="blue"]string[/color]>(); [color="blue"]foreach [/color]([color="teal"]DataRow [/color]r in con.GetSchema([color="#8b0000"]"Tables"[/color]).Select([color="#8b0000"]"TABLE_TYPE = 'TABLE'"[/color])) tables.Add(r[[color="#8b0000"]"TABLE_NAME"[/color]].ToString());
×
×
  • Create New...