torsdag 30 juni 2011

Backup of Wiki files.

I have created a Wiki, think it is in SharePoint :)
This is the way I found to backup the contents of this wiki.

Create a new view with only the Name and Wiki Content columns:

Display this View.

Select Actions -> Export to SpreadSheet:

Open the file.

Save it as an ordinary excel file.

onsdag 29 juni 2011

Tnsping problem on my PC

This is a truly personal problem, I cannot run tnsping to locate a OracleDatabase on my PC the ordinary way.
But if I change direcrory to c:\Oracle\Ora11\Bin and run tnsping, it works.

It us because of some mixup with Oracke clients installation (version 9, 10 and 11) on my PC.

torsdag 23 juni 2011

Supress message of exceeded profile quota

To supress message of exeeded profile quota (Windows XP).
Goto file proquota.exe (C:\Windows\system32), open properties, select Security tab.
And uncheck Allow for all groups or users, for all permissions:


fredag 17 juni 2011

Compress file in .Net

To create a compressed file in .Net


using
....
System.IO.Compression;

FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);Byte[] buffer = new byte[fs.Length];int) fs.Length);FileStream compFile = File.Create(fileName + ".Z");GZipStream zip = new GZipStream(compFile, CompressionMode.Compress);

fs.Read(buffer, 0, (


zip.Write(buffer, 0, buffer.Length);
zip.Flush();
zip.Close();
fs.Close();

The compressed file must be uncompressed with WinZip.

torsdag 16 juni 2011

Create WSDL file & Create XML Schema

To create a WSDL file for a WebService:
Add "?wsdl" at end of url to the WebService, eg:
http://localhost/SavingsTool/WebServiceHandler.asmx?wsdl
Save it from IE, File -> Save As...
 
To create a XML scema (xsd-file), from a xml-file:
Open the XML-file in visual studion.
Select menu XML - > Create Schema

Get rdl-file from Report Server

1. Go to report.
2. Select Properties tab.
3. On general page, click on link Edit.
4. A file download window is opened,
    Save the file.

TypeGuessRows

If problem with data format when loading an Excel file to Excel, it might help to change the value of TypeGuessRows in the registry: 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
The value of this key is how many rows in the Excel file that is read to determine what data type each column has.
If you set it to 0 (zero) all rows is read.
The default value is 8 or 25 (hex 19), not sure which.

To avoid Ajax time out while debugging

if (Debugger.IsAttached)
{
    ScriptManager1.AsyncPostBackTimeout = 500;
}

Missing right border on table in RS-report

In some RS reports I have had problems that the right border on a table is not visible on a RS-server.
(It looks ok in development environment, VS2005,  it also is ok when the report is exported to a PDF file from the RS-server).
 
The only workaround I got to work is to add one more column to the right of this table, and merge it with the previous one, and make it very thin.

Unwanted extra pages when exporting RS report to PDF

If there is unwanted extra pages when a RS report is exported to a PDF file, the problem might be solved by making sure that the width of the body, header and footer is smaller than the width of the report itself.

Format date in Reporting Services as YYYY-MM-DD HH24:MM

=Format(Fields!LOGINDATE.Value,"yyyy-MM-dd HH:mm")

RS Date/Time parameter format vs Oracle Date format

In Reporting Services I have had big problems to compare RS parameters defined as Date/Time with columns in an Oracle Database defined as Date.
The problem is when searching with:
"oracle column" <= "date entered in Date/Time parameter".
The workaround I use is:
AND LMS_LOGINLOG.LOGINDATE      >= :param_FromDate
AND LMS_LOGINLOG.LOGINDATE -1 <= :param_ToDate

Prompt for Checkout file in TFS

1.Tools -> Options.
2. Select Source Control - > Environment.
3. Under Check-in items, for both Saving and Editing drop downs,
    select Prompt for check out.

To only have Integer (and no decimals) values on Axis is RS

Select Axis Properties.
On Interval set Expression to somting like:
 
=IIF(Count(Fields!FNAME.Value,"ReportData")/CountDistinct(Fields!GroupByValue.Value,"ReportData") <5,1,"Auto")

SSRS, User Sort desc first

To make a User Sort be done first descending, multiply with -1, like this example:
 
=(Sum(Fields!ARP_0.Value)/Sum(Fields!TOT.Value))* -1

.Net reference to Owc11

To add reference to Microsoft.Office.Interop.Owc11, browse to:
 
C:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Owc11.dll