Posts


My-FyiReporting 4.5.2 has been released.

The main new features and bug fixes are:

  • RdlReader opens maximized and if only one report opened it opened it opens maximized
  • RdlReader can open files with command line arguments, allows dragging report onto reader icon to open report
  • RdlReader switched to toolstripmenuitem
  • RdlReader now has a toolstrip with open, print, and save as button
  • Icons upgraded to newer tango icons where possible
  • Some new copy right info added
  • Fix missing references
  • Several bug fixes in reader and asp project

Download: https://github.com/majorsilence/My-FyiReporting/downloads


I have decided to fork WarSetup. This is because it has not been updated in several years and was lacking some features that I needed.

I could switch to other software but I like warsetup and would prefer to continue using it. So until the main project starts releasing updates again I will be keeping my fork at https://github.com/majorsilence/WarSetup-Fork.

I have renamed the executable to WarPackager so there is no confusion between the main WarSetup and my fork.

Current added features WarPackager has over the main WarSetup are:

  • Wix 3.6 support
  • Wix 3.5 support
  • OS requirements detection XP SP3, Vista SP1 and SP2, Windows 7 and SP1, Windows 8
  • Option to require minimum .NET version (2.0, 3.0, 3.5, 4.0 full or client)
  • Command line arguments
    • -i "warsetup file to use.warsetup"
    • -c - compile msi automatically
    • -v "new product version number in format 1.1.1"
    • -a - auto increment version number before build and save
    • -e - auto exit after build

Download page: https://github.com/majorsilence/WarSetup-Fork/downloads


There has been a little progress since the last update on My-FyiReporting.

A fix for Issue #15, start the reader program maximized has been committed.

A fix for issue #14 has been committed. if the reader is passed a report file as its first start up parameter will automatically open that report has also been committed.

In addition to these issues I noticed that rdlreader.exe would crash on start up if there were any files in list from the previous session. This has been fixed. I have also added a missing reference to rdlcri.dll t the rdlreader project.

Everyone that is interested in adding features or fixing bugs are encouraged to go to https://github.com/majorsilence/My-FyiReporting and create a fork and start sending in pull requests with your features and fixes.


I have ported the c# xwt samples to vb.net. They are currently hosted at https://github.com/majorsilence/xwt in the SamplesVB folder. I have no idea if they will be accepted into the main code. If they are not I will create a branch in my fork and move the vb.net samples there for anyone that is interested.

The main .net xwt project is https://github.com/mono/xwt.

“Xwt is a new .NET framework for creating desktop applications that run on multiple platforms from the same codebase. Xwt works by exposing one unified API across all environments that is mapped to a set of native controls on each platform.”


Update (Feb 21, 2015) New blog post covering Get, Put, Post to service stack.

Connecting to a servicestack (see servicestack.net) service from php is very easy. If you go to https://github.com/majorsilence/WebServiceDotNetTesting there is a c# project that has one service called Hello. This service will listen on http://localhost:9200.

In the php folder there is a script servicestack-php.php that will connect to the c# servicestack web service.

The main function that can be used is get_data_curl. This function can be used with both HTTP, HTTPS, and can connect to open services and services protected with basic authentication.


/**
* Generic curl function to POST to a servicestack.net service.  This function
* will work with both HTTP and HTTPS but does not validate an HTTPS connection.
*
* @param string $base_url the base url of the service.  It must not end with a / character.
* @param string $service_name the name of the service.  This is case sensitive.
* @param json $post_data the data to post.  Should already be encoded json using the json_encode function.
* @param string $credentials the username and password to login to the webservice. A string in Format "Username:Password"
* @ return json
*/
function get_data_curl($base_url, $service_name, $post_data, $credentials)
{

	
	// Will create a string like "http://localhost:9200/servicestack/json/syncreply/Hello";
	$url = $base_url . '/json/syncreply/' . $service_name;
	$contentLength = strlen($post_data);
	
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	
	// Override the default headers
	curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 
		'Accept: application/json', "Expect: 100-continue"));
    // 0 do not include header in output, 1 include header in output
	curl_setopt($ch, CURLOPT_HEADER, 0);   
	
	// Set username and password
	if ($credentials != "")
	{
		curl_setopt($ch,CURLOPT_USERPWD, $credentials); 
	}
	
	curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
	
	// if you are not running with SSL or if you don't have valid SSL
	$verify_peer = false;
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_peer);
	
	// Disable HOST (the site you are sending request to) SSL Verification,
	// if Host can have certificate which is invalid / expired / not signed by authorized CA.
	$verify_host = false;
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $verify_host);
	
	// Set the post variables
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
	
	// Set so curl_exec returns the result instead of outputting it.
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

	
	// Get the response and close the channel.
	$response = curl_exec($ch);
	curl_close($ch);
	
	$json_obj = json_decode($response);
	return $json_obj;
}


You can use the get_data_curl function like this:


	/*
	$username = "user";
	$password = "password";
	$cred = "{$username}:{$password}";
	*/
	// If you are connecting to a service that uses basic authentication 
	// you can use the code above to set the credentials.
	$cred = "";

	$json = get_data_curl("http://localhost:9200", "Hello", $json_str, $cred);
	echo 'Result: ' . $json->{'Result'} . "<br />";