Thursday, December 3, 2009

SQL Server Reporting Services

I had a chart that needed to show negative values. I changed the Y-axis Scale minimum to 'auto' and it worked.

Tuesday, March 31, 2009

Yeah, well....


Wednesday, March 4, 2009

Activate Reporting Services 2000 on Windows 2000

I installed SQL Server Reporting Services on Windows 2000. At the end it said I had to manually activate Reporting Services.

This is what I did:

C:\WINNT\Microsoft.NET\Framework\v1.1.4322>aspnet_regiis.exe –i

Then this….

C:\WINNT\Microsoft.NET\Framework\v1.1.4322>rsactivate -c"C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\RSReportServer.config"

------------

If you had to restore a database that crashed, you'll need to restore the RSReportServer.config and then do a -r like this:

C:\WINNT\Microsoft.NET\Framework\v1.1.4322>rsactivate -c"C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\RSReportServer.config" -r

Found the answer here:
http://sqlforums.windowsitpro.com/web/forum/messageview.aspx?catid=92&threadid=27885&enterthread=y

Thursday, November 13, 2008

C# find last months date range

DateTime firstDay = new DateTime(DateTime.Now.AddMonths(-1).Year, DateTime.Now.AddMonths(-1).Month, 1);

int DaysinMonth = DateTime.DaysInMonth(DateTime.Now.AddMonths(-1).Year, DateTime.Now.AddMonths(-1).Month);

DateTime lastDay = firstDay.AddMonths(1).AddTicks(-1);

used code found here:
http://anuraj.wordpress.com/2007/12/03/last-day-and-first-day-of-the-month-using-c/

Friday, August 8, 2008

Why I'm Unimpressed With Rawness Of Skillz

Why I'm Unimpressed With Rawness Of Skillz

Tuesday, June 10, 2008

SSRS 2005 Report prints blank pages - landscape mode

Re: SSRS 2005 Report prints blank pages - MSDN Forums: "SSRS 2005 Report prints blank pages"

Body + Right marigin + Left margin should be less than page width
Body + Top margin + Bottom margin should be less than page height

If you have header and footer take them also into account
If you have any text box ,please check it is width and also matrix data regions.

Thursday, April 24, 2008

c# read Excel 2007 .xlsx files

In order to read .xlsx files you need the drivers: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7554f536-8c28-4598-9b72-ef94e038c891

If you don't, you may get the error: "Could not find installable ISAM."

dir = new DirectoryInfo(System.Environment.CurrentDirectory);
xlsFiles = dir.GetFiles("*.xls", SearchOption.AllDirectories);

//loop thru all the text files
foreach (FileInfo xlsFile in xlsFiles)
{
DataSet dataSet1 = new DataSet();
OleDbConnection connection = new System.Data.OleDb.OleDbConnection();
OleDbDataAdapter dataAdapter1;

if (System.IO.Path.GetExtension(xlsFile.Name) == ".xlsx")
{

connection.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + xlsFile.FullName + ";Extended Properties='Excel 12.0;'";
}
else
{
connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + xlsFile.FullName + ";Extended Properties='Excel 8.0;'";
}

dataAdapter1 = new OleDbDataAdapter("select * from [Sheet1$]", connection);

dataAdapter1.Fill(dataSet1);
DataTable dt = dataSet1.Tables[0];

}