Showing posts with label control. Show all posts
Showing posts with label control. Show all posts

Friday, March 30, 2012

Remove Help icon from the Toolbar

Hi,
I am trying to hide the help icon from the Toolbar, and i used a stylesheet to control it.
.ToolbarHelp
{
display: none;
}
The strange thing is that when i call the report in my asp.net page directly in the server machine, the help icon is removed, but when i view it in another machine, it doesn;t seem to work.
Any idea what went wrong?


Did you verify the path to the style sheet?

Wednesday, March 28, 2012

remove control codes from database

I have control codes in the description field as shown below. I need to
create a report of only code and description without the \rtf... etc
Is there any way I can remove these from my final output using SQL?
Any help is greatly appreciated.
modcode longdescription
lastupdate
updateid
--
----
----
----
--
-
--- --
1 {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcha
rset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang1033\f0\fs17 A normal healthy patient
\par }Could you post a sample of what you want your data to look like?
"mcp111" wrote:

> I have control codes in the description field as shown below. I need to
> create a report of only code and description without the \rtf... etc
> Is there any way I can remove these from my final output using SQL?
> Any help is greatly appreciated.
> modcode longdescription
>
> lastupdate
> updateid
> --
> ----
----
----
--
--
> --- --
> 1 {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcha
rset0 MS Sans Serif;}}
> \viewkind4\uc1\pard\lang1033\f0\fs17 A normal healthy patient
> \par }
>|||mcp111
I used a UDF to strip out the rtf tags.
The UDF is shown below..
BE WARNED ! this is a rough and ready fix for a problem I had and will NOT
cope with all posible rft tags but it may be useful as start for you.
Cheers
David.
---
CREATE FUNCTION Strip_RTF_Tags ( @.LineIn Varchar(4000)
)
RETURNS Varchar(4000)
AS
BEGIN
DECLARE @.BraceCount Int
DECLARE @.StartCount Int
DECLARE @.EndCount Int
DECLARE @.LoopCount Int
declare @.InText Int
DECLARE @.S varchar(4000)
DECLARE @.P1 Int
SET @.BraceCount = 0
SET @.StartCount = 0
SET @.EndCount = 0
SET @.LoopCount = 1
SET @.S = ''
SET @.InText = 0
WHILE @.LoopCount <= Len(@.LineIn)
BEGIN
If SUBSTRING(@.LineIn, @.LoopCount, 1) = '{'
BEGIN
SET @.BraceCount = @.BraceCount + 1
END
If SUBSTRING(@.LineIn, @.LoopCount, 1) = '}'
BEGIN
SET @.BraceCount = @.BraceCount - 1
END
If (SUBSTRING(@.LineIn, @.LoopCount, 1) = ' ')
AND (@.BraceCount = 1)
AND (@.InText = 0)
BEGIN
SET @.StartCount = @.LoopCount +1
SET @.InText = 1
END
If (SUBSTRING(@.LineIn, @.LoopCount, 1) = '')
AND (@.BraceCount = 1)
AND (@.InText = 1)
BEGIN
SET @.EndCount = @.LoopCount
SET @.S = @.S + SUBSTRING(@.LineIn, @.StartCount, @.EndCount -
@.StartCount)
SET @.InText = 0
END
SET @.LoopCount = @.LoopCount + 1
END
-- SET @.S = Cast(@.Startcount as varchar) + ' '+ Cast(@.EndCount as
varchar)
Return @.S
END
---
"mcp111" <mcp111@.discussions.microsoft.com> wrote in message
news:960CBFF0-80B1-4E25-9010-9F14C8CE8C6D@.microsoft.com...
>I have control codes in the description field as shown below. I need to
> create a report of only code and description without the \rtf... etc
> Is there any way I can remove these from my final output using SQL?
> Any help is greatly appreciated.
> modcode longdescription
>
> lastupdate
> updateid
> --
> ----
----
----
--
--
> --- --
> 1 {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcha
rset0 MS Sans Serif;}}
> \viewkind4\uc1\pard\lang1033\f0\fs17 A normal healthy patient
> \par }
>|||Your best bet is an application dedicated to stripping RTF codes from RTF
data. SQL Server doesn't know anything about RTF, and in order to have SQL
Server do this, you'd have to re-invent the wheel...
"mcp111" <mcp111@.discussions.microsoft.com> wrote in message
news:960CBFF0-80B1-4E25-9010-9F14C8CE8C6D@.microsoft.com...
>I have control codes in the description field as shown below. I need to
> create a report of only code and description without the \rtf... etc
> Is there any way I can remove these from my final output using SQL?
> Any help is greatly appreciated.
> modcode longdescription
>
> lastupdate
> updateid
> --
> ----
----
----
--
--
> --- --
> 1 {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcha
rset0 MS Sans Serif;}}
> \viewkind4\uc1\pard\lang1033\f0\fs17 A normal healthy patient
> \par }
>sql

Monday, March 12, 2012

Remote Report Server 2005 using the reportviewer control - parameter problem

I am using an asp.net web page (C#) to access a remote Report Server via the reportviewer contol. After solving the credentials issues, all of my test reports seem to run very nicely if there is no parameter input. When a parameter report is executed, the text box for parameter input is displayed. When the parameter is entered and the View Report button is pressed, the report is NOT Returned. If I go directly to the remote Report Manager and run the report (IE no code behind), it runs as it is supposed to. I've also run the report (web page) on my local report server and it displays the report after the parameter has been input. Why is the remote report server not returning the report after the parameter is input?

Thanks,

John

This problem has been resolved. The page will not work if the "ReportViewer1.ServerReport.ReportServerCredentials = new MyReportServerCredentials();" statement is placed in the Page_Load event.

Here are the steps taken to eliminate the problem:

1. Remove the credentials statement from the Page_Load event.

2. Place this code in the Page_Load event

if (!Page.IsPostBack)
{
ReportViewer1.Visible = false;
}

3. Place a button on the page to display the report.

4. Move all report statements to the push button event. Make sure to include "ReportViewer1.Visible = true"

It now works like a champ and I am happy!

Thanks,

John