#Utility

##Properties

Datatype Property name Property description Default Value
String MasterReport Gets a web-safe report name that can be used as a URL query parameter for a master report from either the current request or the current report set. String.Empty
DateTime NullDateTime Gets the System.DateTime value representative of a null throughout the AdHoc reporting tool. null
String ReportName Gets the name of the last report that was saved by checking the request parameters. null
Int32 ReportVersion Gets the major component of the version number for the reporting software. 6
Boolean RequestFailed Determines whether there has been a failure to process a web request in the application due to insufficient permissions. False

##Methods

###AddDeltas(System.Data.DataTable,System.Object[],Izenda.AdHoc.FieldCollection) Creates a copy of the input System.Data.DataTable with the change in values between each row inserted between the source data rows.

Parameters:

Returns:

A System.Data.DataTable containing the rates of change between each row of source data provided.


###AllowModifyReport(Izenda.AdHoc.ReportSet) Checks the Izenda.AdHoc.ReportSet to ensure the current user has the ability to modify the report.

Parameters:

Returns:

true when the user has the ability to modify the report, otherwise false.


###AnalyzeForCopyPaste(System.String,System.Boolean)

Parameters:


###BitmapToBase64String(System.Drawing.Bitmap,System.Drawing.Imaging.ImageFormat) Produces a System.String representation of the specified System.Drawing.Bitmap image using base 64 encoding.

Parameters:

Returns:

A System.String containing the base 64 encoded image data.


###BitmapToByteArray(System.Drawing.Bitmap,System.Drawing.Imaging.ImageFormat) Produces the System.Byte array representation of the specified System.Drawing.Bitmap image.

Parameters:

Returns:

A System.Byte array containing the image data.


###ChangeConnectionTimeout(System.String,System.Int32) Changes the connection timeout attribute on the specified connection string.

Parameters:

  • System.String cs - The database connection string to use.
  • System.Int32 newValue - The new connection timeout value in minutes.

Returns:

The new connection string with the modified connection timeout.


###CheckCondition(Izenda.AdHoc.ReportSet) Determines whether the loaded Izenda.AdHoc.ReportSet meets the conditions to be sent out as part of the scheduler procedure.

Parameters:


###CheckLimitations(System.Boolean) Performs various diagnostic checks to ensure the application is in a valid state.

Parameters:

  • System.Boolean asModernBi - Whether the application will check for a valid license key and database connection.

###CheckLimitations() Performs various diagnostic checks to ensure the application is in a valid state.


###CheckUserName() Determines if the current license key is valid and the current user is initialized properly and redirects the user to either the settings page or the login page if the tests fail.


###Clone(System.Object) Creates an exact copy of the input System.Object.

Parameters:

Returns:

The copy of the System.Object.


###ConvertDataTableToCsv(System.Data.DataTable,System.String,System.Boolean) Converts the data in the input System.Data.DataTable into a CSV System.String.

Parameters:

Returns:

The generated System.String representation of the CSV data.


###ConvertDataTableToCsv(System.Data.DataTable,System.Boolean) Converts the data in the input System.Data.DataTable into a CSV System.String.

Parameters:

Returns:

The generated System.String representation of the CSV data.


###ConvertToHtmlColor(System.Drawing.Color) Generates a literal System.String HTML color code using the specified System.Drawing.Color.

Parameters:

Returns:

The System.String representation of the HTML color.


###ConvertToHtmlTable(System.Data.DataTable) Generates an HTML table in a System.Web.UI.LiteralControl from the input System.Data.DataTable that can be inserted into a web page.

Parameters:

Returns:

The System.Web.UI.LiteralControl containing the generated HTML table.


###CorrectPostBackEvent(System.String) Modifies the input script to use escaped characters for postback events.

Parameters:

Returns:

The System.String representation of the script with escaped characters.


###CultureFromName(System.String) Try to get CultureInfo based on the provided name

Parameters:

  • System.String name - Culture name in the format languagecode2-country/regioncode2, or two-letter code for the language, or English language name or native language name

Returns:

CultureInfo


###DiagnosticTest() Performs various diagnostic tests against the reporting tool and creates a set of results.

Returns:

The System.Collections.Specialized.ListDictionary of the results for the diagnostic tests.


###Divide(System.Data.DataTable,System.Int32,Izenda.AdHoc.Report) Separates the input System.Data.DataTable into the specified number of sections for use as field|value pairs.

Parameters:

Returns:

The Izenda.AdHoc.DataTableCollection consisting of the entire set of split System.Data.DataTable parts.


###EncodeJsString(System.String,System.Boolean) Gets the equivalent System.String encoded for javascript output by escaping escape characters and replacing unicode characters with their hex equivalents.

Parameters:

Returns:

The equivalent System.String encoded for javascript output.


###Equals(System.Object) Determines whether the specified System.Object is equal to the current System.Object.

Parameters:

Returns:

true if the specified System.Object is equal to the current System.Object; otherwise, false.


###ExtractHexDigits(System.String) Extracts any characters from the input System.String that can be interpreted as hexadecimal values.

Parameters:

Returns:

A System.String representation of the hexadecimal extracted from the input.


###FindControlByID(System.Web.UI.ControlCollection,System.String) Locates the System.Web.UI.Control object with the specified ID in the control hierarchy provided.

Parameters:

Returns:

The first System.Web.UI.Control with the specified ID found in the collection.


###FindControlByType(System.Web.UI.ControlCollection,System.Type) Locates the first System.Web.UI.Control object of the specified System.Type in the control hierarchy provided.

Parameters:

Returns:

The first System.Web.UI.Control of the specified System.Type found in the collection.


###FindControlsByType(System.Web.UI.ControlCollection,System.Type) Locates all System.Web.UI.Control objects of the specified System.Type in the control hierarchy provided.

Parameters:

Returns:

A System.Collections.ArrayList containing all the controls of the specified System.Type found in the collection.


###FindForm(System.Web.UI.Page,System.String) Locates the System.Web.UI.HtmlControls.HtmlForm with the specified ID in the web page.

Parameters:

Returns:

The System.Web.UI.HtmlControls.HtmlForm that was found.


###FindForm(System.Web.UI.Page) Locates the System.Web.UI.HtmlControls.HtmlForm with no ID in the web page.

Parameters:

Returns:

The System.Web.UI.HtmlControls.HtmlForm that was found.


###FixImgTagUrlsForLocalhost(System.String) Scans the input HTML for images and updates the URLs with the base 64 string representation of the file.

Parameters:

  • System.String html - The HTML with fid or image resources that need to be fixed by representing them as base 64 strings.

Returns:

A System.String with the image links transformed into the image resource's base 64 string equivalents.


###FixImgTagUrlsForLocalhost(System.String,System.Boolean) Scans the input HTML for images and updates the URLs with the base 64 string representation of the file.

Parameters:

  • System.String html - The HTML with fid or image resources that need to be fixed by representing them as base 64 strings.
  • System.Boolean isDirectHtmlRender - Whether or not the images in the HTML are being directly rendered to the screen. This is usually the case when using an Internet Explorer version earlier than nine.

Returns:

A System.String with the image links transformed into the image resource's base 64 string equivalents.


###GenerateChart(System.Data.DataTable,System.String,Izenda.AdHoc.Report,System.Boolean) Creates a Izenda.Controls.ImageContentGenerator containing the serialized chart image data.

Parameters:

Returns:

An Izenda.Controls.ImageContentGenerator containing the serialized information in the chart.


###GenerateChart(System.Data.DataTable,System.String,Izenda.AdHoc.Report) Creates a Izenda.Controls.ImageContentGenerator containing the serialized chart image data.

Parameters:

Returns:

An Izenda.Controls.ImageContentGenerator containing the serialized information in the chart.


###GenerateChartBinary(Izenda.AdHoc.ReportSet) Creates a Izenda.Controls.ImageContentGenerator with the image data for the primary chart on the input Izenda.AdHoc.ReportSet.

Parameters:

Returns:

An Izenda.Controls.ImageContentGenerator containing the image data for the chart.


###GenerateLogo(System.String) Creates a System.Web.UI.HtmlControls.HtmlTable that contains the powered by Izenda logo as a control inside the table.

Parameters:

  • System.String heght - The height in pixels that the image should have.

Returns:

A System.Web.UI.HtmlControls.HtmlTable control containing the powered by Izenda logo


###GenerateMap(System.Data.DataTable,Izenda.AdHoc.Report) Generates a System.Web.UI.Control containing the HTML for the map.

Parameters:

Returns:

The System.Web.UI.Control containing the HTML for the map.


###GenerateWebChart(System.Data.DataTable,System.String,Izenda.AdHoc.Report,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.String) Generates a System.Web.UI.Control containing the rendered chart content that can be inserted into a web page.

Parameters:

Returns:

The System.Web.UI.Control containing the HTML that generates the control or the rendered chart image.


###GetAppSetting(System.String) Gets the setting in the application configuration settings with the specified name.

Parameters:

  • System.String settingName - The name of the setting in the application configuration settings collection.

Returns:

The System.String representation of the application setting obtained.


###GetBool(System.Object) Converts a System.Object into a System.Boolean, if the conversion is possible.

Parameters:

Returns:

true if the conversion was successful and evaluates to true, otherwise false.


###GetBool(System.Object,System.Boolean) Converts a System.Object into a System.Boolean, if the conversion is possible.

Parameters:

Returns:

true if the conversion was successful and evaluates to true, otherwise false.


###GetCurrentScriptSuffix() Gets a suffix that is appended onto the end of script files to denote the version and prevent conflicts between versioned files.

Returns:

A System.String suffix using the DLL version that is appended onto the end of script files.


###GetDateTime(System.Object) Converts the specified System.Object into a System.DateTime, or a default value if the conversion is not possible.

Parameters:

Returns:

A System.DateTime object with the converted value.


###GetDomain(System.String) Extracts the domain portion of a web address or email address.

Parameters:

Returns:

A System.String representation of the domain for the web or email address.


###GetDrilDownStyleList() Gets a list of all the different methods of displaying a subreport in a form that can be added to a dropdown list control.

Returns:

The System.Web.UI.WebControls.ListItemCollection of drilldown styles for displaying subreports.


###GetEnum(System.Object)

Parameters:


###GetEnum(System.Object,Izenda.AdHoc.Utility.TEnum)

Parameters:


###GetFlatTableTitle(System.Data.DataTable,System.Boolean) Gets the customized table titles from the input System.Data.DataTable in a comma separated System.String.

Parameters:

  • System.Data.DataTable table - The System.Data.DataTable with customized titles in the extended properties collection to use.
  • System.Boolean showVisualGroupLabels - Whether or not the list being generated will include column names as visual grouping information in the list of titles.

Returns:

A System.String containing a comma separated list of all the titles found in the extended properties list of the System.Data.DataTable.


###GetHashCode() Serves as a hash function for a particular type.

Returns:

A hash code for the current System.Object.


###GetInt(System.Object,System.Int32) Converts a System.Object into a System.Integer, if the conversion is possible.

Parameters:

Returns:

A System.Integer if the conversion was successful, otherwise the default value.


###GetListItems(System.Type) Gets a System.Web.UI.WebControls.ListItem array of all the System.String names of the members of an enumeration.

Parameters:

Returns:

The System.Web.UI.WebControls.ListItem of all the System.String enumeration member names found.


###GetMIMEType(System.String) Gets the MIME type that corresponds to the specified file exxtension.

Parameters:

  • System.String extension - The file extension to get the MIME type for.

Returns:

The System.String representation of the MIME type used in web requests.


###GetNextTime(System.DateTime,Izenda.AdHoc.RepeatType) Calculates the next System.DateTime a scheduled report will be executed with the specified parameters.

Parameters:

Returns:

A Izenda.AdHoc.DateRef containing the System.DateTime that the report will next execute at.


###GetOperatorName(Izenda.AdHoc.OperatorTypes,System.Boolean) Gets the displayable name for the specified operator type.

Parameters:

Returns:

A System.String describing the operator that serves as a name.


###GetPostBackClientEvent(System.Web.UI.Control,System.String) Returns a System.String that can be used in a client event to cause postback to the server. The reference System.String is defined by the specified control that handles the postback and a string argument of additional event information.

Parameters:

Returns:

A System.String that, when treated as script on the client, initiates the postback.


###GetPostBackEventReference(System.Web.UI.Control,System.String) Returns a System.String that can be used in a client event to cause postback to the server. The reference System.String is defined by the specified control that handles the postback and a string argument of additional event information.

Parameters:

Returns:

A System.String that, when treated as script on the client, initiates the postback.


###GetReports(out System.Collections.Generic.Dictionary<Izenda.AdHoc.ReportInfo,Izenda.AdHoc.ReportSet>,out System.Web.UI.WebControls.ListItemCollection)

Parameters:


###GetResource(System.String) Gets the resource with the specified name from the collection of resources registered with the assembly.

Parameters:

Returns:

The System.String representation of the value obtained from the registered resources.


###GetRootUrl() Gets the base URL for the application.

Returns:

The base URL for the application consisting of the protocol, port, server name, and application path.


###GetScriptsEmbeded(System.Collections.Generic.List) Gets a literal System.String representation of the script resources that are built by rendering the entire body of those scripts.

Parameters:

Returns:

The literal System.String representation of the script resources that were loaded and concatenated.


###GetSqlTypeGroup(Izenda.AdHoc.Database.SqlType) Gets the Izenda.AdHoc.Database.SqlTypeGroup that the input Izenda.AdHoc.Database.SqlType belongs to.

Parameters:

Returns:

The Izenda.AdHoc.Database.SqlTypeGroup that the input Izenda.AdHoc.Database.SqlType belongs to.


###GetSqlTypeGroups()


###GetSqlValueString(System.Object) Gets the System.String representation of the input System.Object that is a database result.

Parameters:

Returns:

The System.String representation of the database object.


###GetSqlValueString(System.Object,Izenda.AdHoc.Database.SqlType) Gets the System.String representation of the input System.Object that is a database result.

Parameters:

Returns:

The System.String representation of the database object.


###GetString(System.Object) Casts the provided System.Object to its System.String equivalent.

Parameters:

Returns:

The System.String representation of the object.


###GetType(Izenda.AdHoc.Database.SqlType) Gets the System.Type that represents the input Izenda.AdHoc.Database.SqlType.

Parameters:

Returns:

The System.Type that corresponds to the Izenda.AdHoc.Database.SqlType.


###GetType() Gets the System.Type of the current instance.

Returns:

The System.Type instance that represents the exact runtime type of the current instance.


###GetTypeFromSqlTypeGroup(System.String)

Parameters:


###GetVisualGroupTableTitle(System.Data.DataTable) Gets a System.Data.DataTable containing the field|value pairs with the customized title data in the value cell and the column name in the field cell.

Parameters:

Returns:

A System.Data.DataTable containing the column name of the visual group and the title value that was applied to the table.


###GetWebReportName(Izenda.AdHoc.ReportSet) Gets the web-safe representation of the report name with the specified parameter.

Parameters:

Returns:

The System.String web-safe name of the report.


###GetWindowsProductID() Gets the serial number of the Windows installation that the server is currently running.

Returns:

The System.String representation of the Windows serial number of the server OS installation.


###HexStringToColor(System.String) Generates a System.Drawing.Color from the System.String hexadecimal color value.

Parameters:

Returns:

The System.Drawing.Color corresponding to the RGB value of the hexadecimal color value.


###Humanize(System.String) Gets a human-readable representation of the input System.String.

Parameters:

Returns:

The System.String with special characters stripped out to be more readable.


###Humanize(System.String,System.String) Gets a human-readable representation of the input System.String.

Parameters:

Returns:

The System.String with special characters stripped out to be more readable.


###InitFakeHttpContext() Initializes a dummy web server that can function as a headless instance of Izenda without a web browser.


###IntToOrdinal(System.Int32) Converts the input System.Integer into an ordinal System.String equivalent.

Parameters:

  • System.Int32 number - The number to convert into its equivalnet ordinal.

Returns:

The System.String ordinal representation of the number.


###Invert(System.Data.DataTable,System.Boolean) Creates a copy of the input System.Data.DataTable with the columns and rows transposed with each other.

Parameters:

Returns:

The inverted System.Data.DataTable.


###IsClientScriptBlockRegistered(System.Web.UI.Control,System.String) Determines whether a script block with the specified key is registered to the System.Web.UI.Page of the provided control.

Parameters:

Returns:

true if the script with the specified key is registered on the page, otherwise false.


###IsDateTimeSqlTypeGroup(Izenda.AdHoc.Database.SqlTypeGroup) Determines whether the Izenda.AdHoc.Database.SqlTypeGroup is part of the date or time type groups.

Parameters:

Returns:

true when the SQL type group is a date or time type, otherwise false.


###IsNull(System.String) Determines whether the input System.String evaluates to null.

Parameters:

Returns:

true when the input string evaluates to null, otherwise false.


###IsNull(System.Object) Determines whether the input value evaluates logically to null for various datatypes.

Parameters:

Returns:

true if the object evaluates to null


###IsNumeric(System.Type) Determines whether the input System.Type can be represented as a number.

Parameters:

Returns:

true when the type can be represented as a number, otherwise false


###IsNumericSqlTypeGroup(Izenda.AdHoc.Database.SqlTypeGroup) Determines whether the Izenda.AdHoc.Database.SqlTypeGroup is part of the numeric type group.

Parameters:

Returns:

true when the SQL type group is numeric, otherwise false.


###IsValidHexColor(System.String) Determines whether the input System.String represents a valid RGB hexadecimal color.

Parameters:

Returns:

true if the input can be represented as a hexadecimal color.


###IsValuesRequedOperator(Izenda.AdHoc.OperatorTypes) Determines whether the specified operator type returns a range of values to choose from when used as a filter.

Parameters:

Returns:

true when the values the user can choose from consists of a list of values, otherwise false.


###KeyIsExpired() Determines whether the current license key has expired or not.

Returns:

true when the current license key has passed its expiration date.


###LimitColumns(System.Data.DataTable,System.Int32) Constructs a Izenda.AdHoc.DataTableCollection with the number of columns limited to the specified number.

Parameters:

Returns:

The Izenda.AdHoc.DataTableCollection with the columns limited.


###LoadReport(System.Web.UI.Page) Loads the CurrentReportSet into the System.Web.UI.Page.

Parameters:

Returns:

True if the load was successful, otherwise false.


###MakeHtmlSnapshot(System.String,Izenda.AdHoc.ReportInfo,Izenda.AdHoc.ReportSet,System.Int32,System.Int32,System.Boolean) Creates a thumbnail image by taking a snapshot of a web page using the specified parameters.

Parameters:


###MessageBox(System.String) Inserts a modal dialog box into the current response object with the specified message.

Parameters:


###PageIsPostBack(System.Web.UI.Page) Determines whether a postback operation is occurring in the page.

Parameters:

Returns:

true when a postback is occurring, otherwise false.


###RegexReplace(System.String,System.String,System.String,System.Boolean) Evaluates a System.String with the regular expression and parameters.

Parameters:

Returns:

A System.String with all instances of the matches replaced with the appropriate value.


###RegexReplace(System.String,System.String,System.String) Evaluates a System.String with the regular expression and parameters.

Parameters:

Returns:

A System.String with all instances of the matches replaced with the appropriate value.


###RegexReplace(System.String,System.String,System.String,System.Text.RegularExpressions.RegexOptions) Evaluates a System.String with the regular expression and parameters.

Parameters:

Returns:

A System.String with all instances of the matches replaced with the appropriate value.


###RegisterClientScriptBlock(System.Web.UI.Control,System.String,System.String) Registers the client script with the System.Web.UI.Page with the key and script literal.

Parameters:


###RegisterCommonScripts(System.Web.UI.Control) Registers a script block for the specified System.Web.UI.Control containing the scripts used throughout the application.

Parameters:


###RegisterHiddenField(System.Web.UI.Control,System.String,System.String) Registers a hidden value with the System.Web.UI.Page with the name and initial value.

Parameters:


###RegisterStartupScript(System.Web.UI.Control,System.String,System.String) Registers the startup script with the System.Web.UI.Page with the key and script literal.

Parameters:


###ReportExistsToOtherUser(System.String) Determines whether the report with the specified name can be loaded by the currently logged in user if the user is not the owner of the report.

Parameters:

Returns:

true when the user can load the report, otherwise false.


###ReportNameToInternalJavascriptName(System.String) Gets the report name converted to a format that is safe for use in a javascript function by replacing the %27 entity with a single quote.

Parameters:

Returns:

The System.String report name that is safe for javascript functions.


###ReportNameToInternalJavascriptNameWithoutID(System.String) Gets the equivalent System.String for the report name with all single quotes, backslashes

Parameters:


###ReportNameToWebName(Izenda.AdHoc.AdHocConfig,System.Boolean,System.String) Gets the web-safe representation of the report name with the specified parameters.

Parameters:

Returns:

The System.String web-safe name of the report.


###ReportNameToWebName(System.String) Gets the web-safe representation of the report name with the specified parameter.

Parameters:

Returns:

The System.String web-safe name of the report.


###ReportWebNameToNormal(System.String) Gets the real report name from the a web-safe representation of the report name.

Parameters:

  • System.String webName - The web-safe representation of the report name.

Returns:

The real report name.


###ScrubSql(System.String) Performs a basic search and replace on a SQL string to ensure arbitrary SQL is not executed.

Parameters:

Returns:

The System.String representation of the SQL that has been checked with a basic level of injection attack checking.


###SendEmail(System.String,System.String,System.String,System.String) Constructs a mail message using the specified parameters and sends it using SMTP messaging.

Parameters:


###SendEmail(System.String,System.String,System.String,System.String,System.String,System.String) Constructs a mail message using the specified parameters and sends it using SMTP messaging.

Parameters:

  • System.String from - The System.String representation of the mail address of the sender.
  • System.String to - The System.String representation of the mail address(es) of the recipients.
  • System.String subject - The text that will be used as the subject line of the mail message.
  • System.String body - The text that will be used as the content body of the mail message.
  • System.String attachmentUrl - The web address where a downloadable attachment can be accessed that will be attached to the message.
  • System.String attachmentName - The System.String name of the attachment that will be used in the message.

###SendEmailEx(System.String,System.String,System.String,System.String,Izenda.Controls.IContentGenerator,System.String) Constructs a mail message using the specified parameters and sends it using SMTP messaging.

Parameters:


###SendEmailEx(System.Net.Mail.SmtpClient,System.String,System.Net.Mail.MailMessage) Sends an email message using the specified parameters.

Parameters:


###SendEmailEx(System.Net.Mail.SmtpClient,System.String,System.Net.Mail.MailMessage,System.Boolean,System.Int32) Sends an email message using the specified parameters.

Parameters:


###SendEmailEx(System.String,System.Net.Mail.MailMessage) Sends an email message using a default client and the specified parameters.

Parameters:


###SplitToLines(System.Data.DataTable,System.Int32) Constructs a System.Data.DataTable from the source data by splitting each row into the specified number of rows.

Parameters:

Returns:

The transformed System.Data.DataTable with the rows split into the specified number of lines per item.


###ToString() Returns a System.String that represents the current System.Object.

Returns:

A System.String that represents the current System.Object.