Page 1 of 1

Retrieve version number

Posted: Thu Apr 28, 2011 9:58 pm
by jay@bplogix.com
I would like to log the version of the report designer and report viewer on startup. How can I query the version or build number of StiWebDesigner or StiWebViewer or StiWebViewerFx?

Thanks!

Retrieve version number

Posted: Fri Apr 29, 2011 6:37 am
by Vladimir
Hello,

You can use this code:

Code: Select all

private string GetVersion()
{
    Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(StiReport));
    Version version = assembly.GetName().Version;

    return string.Format("{0}.{1}.{2} from {3:D}", version.Major.ToString(), version.Minor.ToString(), version.Build.ToString(), StiVersion.CreationDate);
}
Thank you.

Retrieve version number

Posted: Fri Apr 29, 2011 2:00 pm
by jay@bplogix.com
Actually StiVersion.Version is perfect! thanks!

Retrieve version number

Posted: Fri Apr 29, 2011 2:17 pm
by Andrew
Ok!

Thank you.