Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question VBA coding to change the CMS time Zone

  • Payroll
  • Topic Author
  • Visitor
  • Visitor
7 years 10 months ago #606 by Payroll
Hello,

My reports are working great except when the time change happens and the work location does not change time zones. Is there a way to code to change the default time zone in CMS through VBA?

Thanks

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #607 by roller
Not that I am aware of. There is a report property named TimZone but to me it seems to be a label only and has no effect when set via VBA. It appeared in the latest versions of CMS but never seen a use for it. Maybe this is something set at server side! I never had admin privilege to CMS so I can't tell you much about it. You know how IT guys like to hog everything to themselves and don't allow access to anything.

For example setting the below will show the Time Zone as Sydney on the output but that's about it - the times in the report remain the default.

Dim Rep As cvsReport
Set Rep = New cvsReport
Rep.TimeZone = "Sydney"

Please Log in or Create an account to join the conversation.

  • Payroll
  • Topic Author
  • Visitor
  • Visitor
7 years 10 months ago #608 by Payroll
Replied by Payroll on topic VBA coding to change the CMS time Zone
Thank you very much. Wwhen I manually pull the reports I can pick the time zone.

Surprised that is not something that they made as able to code.

Thanks

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #609 by roller
This is news to me, I never been able to set a time zone but if you can on your report then try setting this in your code Rep.TimeZone = "Sydney" or what ever time zone you use. The time zone should be a string like Rep.TimeZone ="yourTimeZone". Do this somewhere in the code either before or after the lines where you set the Rep properties.

try it, it might work. Let me know how you go.

Please Log in or Create an account to join the conversation.

  • Payroll
  • Topic Author
  • Visitor
  • Visitor
7 years 10 months ago #610 by Payroll
Replied by Payroll on topic VBA coding to change the CMS time Zone
I tried the code and still used the default. However I can pull the reports that I need manually by time zone. See screen shoot.


Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #611 by roller
Yeah I don't have that drop box on my version. What I usually do to get a hint of what code to use is generate the report, then click from the report menu bar 'Report' and select Script. Save the script on the Desktop (should be a file with extension .acsauto) and use Notepad to open as a text file. You should see the VB code which is very similar to our VBA code. Select different time zones and repeat and see what changes in the text file. Try to duplicate the code you see in the text file in your VBA code. This may or may not work.

Please Log in or Create an account to join the conversation.

Time to create page: 0.790 seconds
Powered by Kunena Forum