Adding ReportParameter in Microsoft Report Viewer 2010

I Started using Microsoft Report these days, struggled a bit with ReportParameter. This following code shows how to use ReportParameter with Microsoft Report Viewer 2010.



Class1 cl1 = new Class1(); cl1.One = "1"; cl1.Two = "123"; cl1.Three = "123";
list.Add(cl1);

reportViewer1.LocalReport.ReportPath = @"E:\ImageExperiment\ImageExperiment\ImageExperiment\Report2.rdlc";

reportViewer1.LocalReport.EnableExternalImages = true;

List param1 = new List();
param1.Add(new ReportParameter("ReportParameter1", @"C:\a1.jpg"));
param1.Add(new ReportParameter("ReportParameter2", @"C:\a2.jpg"));
param1.Add(new ReportParameter("ReportParameter3", @"C:\a2.jpg"));
reportViewer1.LocalReport.SetParameters(param1);

Class1BindingSource.DataSource = list;

reportViewer1.RefreshReport();

Thanks
A Rahim Khan

Useful Linux Commands for Database Administrations

I am going to put together some useful Linux/AIX Commands for Database Administration.

 
$ echo $ORACLE_SID 
  oracleinstanceid 
# if you don't get any output, use this following one to set ORACLE_SID. 
$ export ORACLE_SID = oracleinstanceid 
# Now, check out ORACLE_HOME, PATH value. 
$ echo $ORACLE_HOME 
  oracle home directory 
$ echo $PATH 
  path value 

Continue reading

Schema Name and Size using SQL

You can use this query to retrieve Schema Name and Size from Oracle Database.


select owner SchemaName, round(sum(bytes)/1024/1024/1024,2) TotalSizeGB
from dba_segments
group by owner
order by 2 desc

Thanks
A Rahim Khan

Change Date in Linux/Unix/Aix

First of all ,you need to login as root user to change datetime in your Linux/Unix/Aix System. Execute this single command and reset system date.

Syntax:
date MMddhhmmccyy Continue reading

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 72,000 times in 2011. If it were an exhibit at the Louvre Museum, it would take about 3 days for that many people to see it.

Click here to see the complete report.

Windows Service Setup Project – Visual Studio 2008

Windows Service Setup Project differs a bit from Windows Application (Desktop) Setup Project. Consider those following steps to create Setup Project for Windows Service Application.

# Right Click on Solution and Add New Project to your Solution.

# Choose Other Project Type and Setup and Deployment and finally Setup Project to create a new Project, give it meaningful Name. For instance, My Windows Service Project name is ReportDownloader and my Setup Project Name is SetupReportDownloader.

# Right Click on SetupReportDownloader=> Add => Project Output, Finally Select the Project you want to create Setup Project for and Select Primary Out and Click OK to continue.

# Up to this, it is same as Windows Application. Now for Windows Service, Right Click on SetupReportDownloader=>View=>Custom Action. Continue reading