• Page:
  • 1
  • 2

TOPIC: system variables

system variables 02 Mar 2015 15:26 #1852

  • flowersrj
  • flowersrj's Avatar
  • Offline
Hi,

We have Logicity Pro 1.7.6.0 along with Crystal XI. I have used system variables like %CURRENT_YEAR%, %CURRENT_MONTH_LEADING_ZERO% and %CURRENT_DAY_LEADING_ZERO%

However, when I try to use %CURRENT_TIME% or %CURRENT_DATE_TIME% I get the following message.

"This variable can not be inserted due to file naming constraints."

I was going to append ".pdf" to end of name but the message appears immediately after selecting either of the 2 system variables.

Thanks, Rich
Last Edit: 02 Mar 2015 15:26 by flowersrj.
The administrator has disabled public write access.

system variables 03 Mar 2015 17:57 #1854

  • RonMoses
  • RonMoses's Avatar
  • Offline
Those variables would probably include a colon, which is not permitted in file names.
The administrator has disabled public write access.

system variables 03 Mar 2015 18:01 #1855

  • flowersrj
  • flowersrj's Avatar
  • Offline
Thanks Ron,

Also, I notice that If I want to append time to a file name by using %CURRENT_HOUR%%CURRENT_MINUTE%, times like 10am are rebresented as 100 not 1000, 2pm is shown as 200, 2:15p shows as 215. 1115am shows as 1115. Anyway to get these consistent in length? As in military time.

-Rich
The administrator has disabled public write access.

system variables 03 Mar 2015 18:04 #1856

  • RonMoses
  • RonMoses's Avatar
  • Offline
Hmm. I don't see a leading zero option in the time variables, which I agree is a problem. I'm surprised to see 10:00 returning as 100, though; that seems like a bug if that's the case. Either way, someone from Logicity would have to answer this question, unfortunately.
The administrator has disabled public write access.

system variables 03 Mar 2015 18:14 #1857

  • flowersrj
  • flowersrj's Avatar
  • Offline
Ron,

I have seen mention of using VB date/time functions but I am assuming that can NOT be embedded within the RRD file but rather used to create RRD files.

Do you have the experience to comment on that?

-Rich
The administrator has disabled public write access.

system variables 03 Mar 2015 18:16 #1858

  • RonMoses
  • RonMoses's Avatar
  • Offline
I'm not sure I understand the distinction you're drawing between "within the RRD file" and "used to create RRD files." You can use VBScript functions in the file name line of the RRD, if that's what you're asking...?
The administrator has disabled public write access.

system variables 03 Mar 2015 18:32 #1859

  • flowersrj
  • flowersrj's Avatar
  • Offline
Ron,

Oh ...


I have tried these both.
First one prints minute as 2 digits. Second prints "hour(now)"

saveas=c:\temp\%{hour(now)+hour(now)}%.pdf&
saveas=c:\temp\%{hour(now)&hour(now)}%.pdf&

-Rich
The administrator has disabled public write access.

system variables 03 Mar 2015 18:41 #1860

  • RonMoses
  • RonMoses's Avatar
  • Offline
Did you want hour twice? Or are you trying to do hhmm? If so, this is a guess...might work, might not, but it's probably close.

saveas=c:\temp\%{Right("0"+CStr(Hour(Now)),2)+Right("0"+CStr(Minute(Now)),2)}%.pdf&
The administrator has disabled public write access.

system variables 03 Mar 2015 19:31 #1861

  • flowersrj
  • flowersrj's Avatar
  • Offline
Ron,

Using that I can not get Logicity to run the RRD.

So, I just now tried this ...

saveas=c:\temp\%{year(now)}%%{right(100+cstr(month(now)),2)}%%{right(100+cstr(day(now)),2)}%_%{hour(now)}%%{minute(now)}%.pdf&

which gives me this 20150303_1425.pdf which is what I want

I believe I will have to modify the hour and minute portions once I try this before 10am tomorrow--say at 9:05am.

Thanks, Rich
The administrator has disabled public write access.

system variables 03 Mar 2015 19:39 #1862

  • RonMoses
  • RonMoses's Avatar
  • Offline
I guess it makes sense that we shouldn't have tried to concatenate in the script. Not sure why that didn't occur to me. Honestly I haven't worked with this feature very much, but I'm glad you got it worked out.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2