Friday, December 2, 2011

Postgre SQL Set OF

I recently had a task which included creating a report and had a to create  a temporary table in postgre

Friday, April 23, 2010

Creating Reports with Visual Express Editions

I haven't seen many write ups on how to create reports using Microsoft's Visual Express Versions. I myself had a rough time trying to figure it out but it's kind of simple, Hopefully this helps someone.

Requirements
 - Visual Web Developer Express
 - Visual VB.Net Express or Visual C#

To begin, if you don't already have Visual Web Developer please download it and install it on your computer. Once installed Create  a new Project after which click on Website->Add New Item

From the Visual Studio INstalled Templated choose Report

This will create a new report in the website, Go ahead and add a datasource to the report by going to Report->Data Sources

Set everything up to the datasource, once the datasource is created you can start dragging fields on to your report, please note you can not place datasource fields on the header or footer

Once you have your report formatted and laid out,  go to your c# or vb.net program and add a report viewer control to your form, This control is not by default on your toolbox, and you must add it through Choose Tools->Choose ToolBox Items, From the .Net Framework Components, Choose the control ReportViewer Make sure you choose the WinForms reports vs the Web

Once you check it off click ok and you should see it appear on your toolbox, now just drag the control to your form, and your half way there, 


When you add the datasource to the report via the above steps  make sure you remember the name you used, To get the report going on the code side of things is really easy, You can either drag a datasource to your form or you can create one with code, it's up to you, 


Before you start coding the report you need to make sure you import , or use the following library


using Microsoft.Reporting.WinForms;


When the report loads it needs to look for the report you created in Web Developer to point to the report on web developer simply add the following code on the load subroutine of the form


this.reportViewer1.LocalReport.ReportPath = "point to the path of the report"


then make sure you load the datasource which ever you choose to do it before you refresh the report


ReportDataSource RDS = new ReportDataSource("dataSet1", this.dataSet1.Tables[0]);
RDS.Name = "name of report source";
this.reportViewer1.LocalReport.DataSources.Add(RDS);


Make sure above the RDS.Name has the name you have on the visual web developer, otherwise it wont load the report correctly,  after the above code you can call the

this.reportViewer1.RefreshReport();


THis will load the report with the same data you had on the visual Web Developer.

And thats all, when you run the form it will load the report based on the dataset you have,


Monday, June 15, 2009

Best Day

I think the best day to start a diet is Monday.. for so many reasons,, and also the best day to end a diet is Friday.. right before the weekend. Lets give this thing a try and see how much i can loose in one month and how much i can loose before aug 2 which is my wifes b-day.. Lets start today....No more excuses.. Power 90 here i come

Thursday, June 4, 2009

Google Chrome

I have to say that using Google chrome with applications that use Web 2.0 extensively, It's one of if not the fastest browser out there. I have however discovered some inconsistencies with my web use.. sometimes it crashes for no reason specifically in ajax heavy websites. But those are minor things. It's simple and it does what you want to do. I hope they keep improving this browser and also start adding modules to make it more user specific something like firefox. Where the appearance can be customzied. Well thats itt for now If you can download it go ahead and download google chrome

Tuesday, October 14, 2008

Instant Messanger - C# with MS Access

I've always wanted to create a chat client since I could remember. Where I work i thought I would be a good idea to roll something like this out, but i had challenges. I tried looking for solutions around the net and all I could find was solutions that made use of sockets. In many circumstances this would be perfect. However where I work all of our computers are blocked from seeing each other and the network is pretty secure. The only way we can share information is through a file cluster/server. The only way I was able to do this was using MS Access as the communication tool between computers and so far it has worked well. User interface is done with C# and MS Access handles the transactions.  It's a really simple database. I will pass more informaiton on later posts as how i got this done. Very minimal maintenance is required. If anyone is interested let  me know 

Friday, April 18, 2008

Introduction

Hello everyone out there, I am currently a Data Processing Mgr at my company. On the side I like to program. I have learned everything I know by myself. It has been hard but perhaps it's worth it. I currently use the following programming languages at my work place. 

  • Visual Basic.Net
  • C#
  • Ruby
I have also used some databases here are a few I have used
  • MySql - I used this for a few months but due to some problems in my work I had to stop using it
  • PostgreSql  - I used this one as well but again due to some problems in my work I had to stop using it.
  • Filemake Pro 5, 6, 8 - I've used all of these 
  • MS Access - This one is actually the one that got me interested in using MySql and Postgre SQL you could say this one was my gateway
  • SQLite - This is the one I am currently using for all my apps after trying to use PostgreSql and MySql in my work environment I felt this one was the one that worked best for me.

Welcome to my new blog

Hello everyone please feel free to post anything you want on this blog