Using Parameter Variables and VB Scripts in Logicity Professional

We have a lot of reports that have relative date ranges, like “the first day of last month” and “the last day of last month” that I can’t utilize with the free version of Logicity. Will the Pro version allows me to create variables for parameters so that if I have a report that includes two parameters like StartDate and EndDate, that I can set Logicity to run the report and automatically enter “6/1/2013” for the StartDate parameter and “6/30/2013” for the EndDate parameter when it’s scheduled to run on July 1, the first day of every month?

Yes, in Logicity 1.7 we have the new feature that allows you to utilize VB Script in your variables within Logicity Solution Builder. For example, if you have some date parameters on your report and you want them to get filled in automatically with something dynamic this will do the job for you. The possibilities are endless as VBScript can do a lot of stuff. Some examples include:

Todays Date:
%{Date}%

The First Day of This Month:
%{DateSerial(DatePart("yyyy",Date),DatePart("m",Date),1)}%

The Last Day of This Month:
%{DateAdd("d", -1, DateAdd("m",1,DateSerial(DatePart("yyyy",Date),DatePart("m",Date),1)))}%

The First Day of Last Month:
%{DateSerial(DatePart("yyyy",DateAdd("m", -1, Date)),DatePart("m",DateAdd("m", -1, Date)),1)}%

The Last Day of Last Month:
%{DateAdd("d", -1, DateSerial(DatePart("yyyy",Date),DatePart("m",Date),1))}%

Simply put those strings of text in your parameter fields within Logicity Solution Builder with Logicity Professional and that should do it.

Click here to follow the list of other parameters suggested on the user forums! http://www.logicitysuite.com/forum/tips-tricks/1135-logicity-pro-vb-script-variables-reference.html

About the Author

Eli J Remington

Eli J Remington

Eli is the web marketing director and a partner at SaberLogic, a professional services firm that provides custom development, programming services, integration consulting and technical support for Infor ERP VISUAL and Epicor ERP. SaberLogic also specializes in Crystal Reports development, custom programming and custom web development. Follow Eli on Google+ and Linkedin.