Retrieve version number

Stimulsoft Reports.WEB discussion
Post Reply
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Retrieve version number

Post 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!
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Retrieve version number

Post 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.
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Retrieve version number

Post by jay@bplogix.com »

Actually StiVersion.Version is perfect! thanks!
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Retrieve version number

Post by Andrew »

Ok!

Thank you.
Post Reply