Tuesday, August 12, 2008

Problems Installing SQL Reporting Services Express

Installing SQL Reporting services Express on Windows 2003 Server "trick"

I dont know why this works but if you are having
  • Security problems with Reporting Services on Windows Server 2003.
  • Trouble logging into reporting services from .NET Report Viewer
The solution is the following:
  1. Open the windows registry
  2. Locate the key HKEY_LOCAL_MACHINES\SYSTEM\CurrentControlSet\Control\LSA
  3. Add a DWork to Value and named DisableloopbackCheck and set its value to 1
  4. Close the Registry and restart the server.
Unfortunately this does not resolve the problem Cannot create a connection to data source 'myDataset'. but at least now you'll be able to log into your report server and report manager and manage your reports.

Cannot create a connection to data source 'myDataset'

I almost pulled the hair out of my head trying to resolve this stupid error when working with SQL
Reporting Expresses Data source connection limitations;
Cannot create a connection to data source 'myDataset'

The solution to my problem was quite simple yet mystifying, the two connection strings below should be pointing to the same database

Does not work in Reporting Services Express: Server='MyDataBase\SQLEXPRESS';Database=Catalog;
Works in Reporting Services Express: Server=MyDataBase\SQLEXPRESS; Database=Catalog;

In case you miss the difference, I could not get the connection to work if I used inverted comma's around me arribute names.

Hope someone finds this helpfull

Automatically open SQL Reports into PDF,EXCEL,CSV,Etc...

Automatically open SQL Reports into PDF,EXCEL,CSV,Etc...

Converting a Image to Base64 String

<%@ Page Language="C#" %>

<%@ Import Namespace="System.IO" %>

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void LinkButton1_Click(object sender, EventArgs e)

{

using (StreamReader sr = new StreamReader(MapPath("TestPicture.JPG")))

{

BinaryReader br = new BinaryReader(sr.BaseStream);

byte[] data = br.ReadBytes((int)br.BaseStream.Length);

string dataToSave = Convert.ToBase64String(data);

// show it

TextBox1.Text = dataToSave;

}

}

script>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Untitled Pagetitle>

head>

<body>

<form id="form1" runat="server">

<div>

<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">GetPictureAsTextasp:LinkButton>div>

<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Width="100%" Height="24em">asp:TextBox>

form>

body>

html>