Showing posts with label stuck. Show all posts
Showing posts with label stuck. Show all posts

Friday, March 30, 2012

HELP!!!! - Report parameter "Read Only"

I'm stuck with a report not being able to use the URL parameter.

I get the error:

The report parameter is read-only and cannot be modified.

I do have a prompting text for the report, and I've checked the XML and there are <PROMPT></PROMPT> tags!

Most likely, you've modified the parameter definition in Report Manager to make it read-only. If you are using SQL 2005, this can happen when you mark it in the designer as 'Internal'.|||

I just dealt with a similar problem (working in RS2000) and no matter what I tried, I couldn't get the error to go away. I tried removing the parameter and re-adding it manually. I tried removing the procedure that required the parameter, re-deploying, and then adding the procedure (and thus the parameter) back in. That still didn't work. This is what I finally did:

1) Removed the parameter from the procedure (commented out the param and any references to it in the sp)

2) Refresh the dataset (to remove the parameter). Ensured the parameter was removed from the report.

3) Re-deployed the report (without the offending parameter). It worked.

4) Went back to the sp and uncommented out the parameter and all references to it

5) Refreshed the dataset (to add the parameter back into the report).

6) Re-deployed. It worked and now accepted the parameter.

I can only surmise that RS had some former reference to the parameter that indicated it was read only, and any re-deployment that I did didn't overwrite that reference. Only by completely removing the parameter, re-deploying, and adding the parameter back in did this issue go away.

I hope this helps someone out there.

|||I got the same problem with VS2005. One time paremeter was checked as "Not Prompt user". After that I changed, deleted and recreated parameter, redeploys report to report server but recived the same error "Report parameter Read Only". Its helped a manualy chnage property of report parameter direct on report server using Report Manager( check on "Propmpt User" property of required parameter). Redeploy of report from VS don't cause changes of report properties on server.

HELP!!!! - Report parameter "Read Only"

I'm stuck with a report not being able to use the URL parameter.

I get the error:

The report parameter is read-only and cannot be modified.

I do have a prompting text for the report, and I've checked the XML and there are <PROMPT></PROMPT> tags!

Most likely, you've modified the parameter definition in Report Manager to make it read-only. If you are using SQL 2005, this can happen when you mark it in the designer as 'Internal'.|||

I just dealt with a similar problem (working in RS2000) and no matter what I tried, I couldn't get the error to go away. I tried removing the parameter and re-adding it manually. I tried removing the procedure that required the parameter, re-deploying, and then adding the procedure (and thus the parameter) back in. That still didn't work. This is what I finally did:

1) Removed the parameter from the procedure (commented out the param and any references to it in the sp)

2) Refresh the dataset (to remove the parameter). Ensured the parameter was removed from the report.

3) Re-deployed the report (without the offending parameter). It worked.

4) Went back to the sp and uncommented out the parameter and all references to it

5) Refreshed the dataset (to add the parameter back into the report).

6) Re-deployed. It worked and now accepted the parameter.

I can only surmise that RS had some former reference to the parameter that indicated it was read only, and any re-deployment that I did didn't overwrite that reference. Only by completely removing the parameter, re-deploying, and adding the parameter back in did this issue go away.

I hope this helps someone out there.

|||I got the same problem with VS2005. One time paremeter was checked as "Not Prompt user". After that I changed, deleted and recreated parameter, redeploys report to report server but recived the same error "Report parameter Read Only". Its helped a manualy chnage property of report parameter direct on report server using Report Manager( check on "Propmpt User" property of required parameter). Redeploy of report from VS don't cause changes of report properties on server.

HELP!!!! - Report parameter "Read Only"

I'm stuck with a report not being able to use the URL parameter.

I get the error:

The report parameter is read-only and cannot be modified.

I do have a prompting text for the report, and I've checked the XML and there are <PROMPT></PROMPT> tags!

Most likely, you've modified the parameter definition in Report Manager to make it read-only. If you are using SQL 2005, this can happen when you mark it in the designer as 'Internal'.|||

I just dealt with a similar problem (working in RS2000) and no matter what I tried, I couldn't get the error to go away. I tried removing the parameter and re-adding it manually. I tried removing the procedure that required the parameter, re-deploying, and then adding the procedure (and thus the parameter) back in. That still didn't work. This is what I finally did:

1) Removed the parameter from the procedure (commented out the param and any references to it in the sp)

2) Refresh the dataset (to remove the parameter). Ensured the parameter was removed from the report.

3) Re-deployed the report (without the offending parameter). It worked.

4) Went back to the sp and uncommented out the parameter and all references to it

5) Refreshed the dataset (to add the parameter back into the report).

6) Re-deployed. It worked and now accepted the parameter.

I can only surmise that RS had some former reference to the parameter that indicated it was read only, and any re-deployment that I did didn't overwrite that reference. Only by completely removing the parameter, re-deploying, and adding the parameter back in did this issue go away.

I hope this helps someone out there.

|||I got the same problem with VS2005. One time paremeter was checked as "Not Prompt user". After that I changed, deleted and recreated parameter, redeploys report to report server but recived the same error "Report parameter Read Only". Its helped a manualy chnage property of report parameter direct on report server using Report Manager( check on "Propmpt User" property of required parameter). Redeploy of report from VS don't cause changes of report properties on server.

HELP!!!! - Report parameter "Read Only"

I'm stuck with a report not being able to use the URL parameter.

I get the error:

The report parameter is read-only and cannot be modified.

I do have a prompting text for the report, and I've checked the XML and there are <PROMPT></PROMPT> tags!

Most likely, you've modified the parameter definition in Report Manager to make it read-only. If you are using SQL 2005, this can happen when you mark it in the designer as 'Internal'.|||

I just dealt with a similar problem (working in RS2000) and no matter what I tried, I couldn't get the error to go away. I tried removing the parameter and re-adding it manually. I tried removing the procedure that required the parameter, re-deploying, and then adding the procedure (and thus the parameter) back in. That still didn't work. This is what I finally did:

1) Removed the parameter from the procedure (commented out the param and any references to it in the sp)

2) Refresh the dataset (to remove the parameter). Ensured the parameter was removed from the report.

3) Re-deployed the report (without the offending parameter). It worked.

4) Went back to the sp and uncommented out the parameter and all references to it

5) Refreshed the dataset (to add the parameter back into the report).

6) Re-deployed. It worked and now accepted the parameter.

I can only surmise that RS had some former reference to the parameter that indicated it was read only, and any re-deployment that I did didn't overwrite that reference. Only by completely removing the parameter, re-deploying, and adding the parameter back in did this issue go away.

I hope this helps someone out there.

|||I got the same problem with VS2005. One time paremeter was checked as "Not Prompt user". After that I changed, deleted and recreated parameter, redeploys report to report server but recived the same error "Report parameter Read Only". Its helped a manualy chnage property of report parameter direct on report server using Report Manager( check on "Propmpt User" property of required parameter). Redeploy of report from VS don't cause changes of report properties on server.

HELP!! - TSQL Cursor problem

Hi,

I have a work project due very soon and am stuck with something.

I am using a cursor in a stored procedure to return the required data for output in an ASP/VBScript page. The problem is that (as run in MS Query Analyser) the stored procedure returns the data in individual data sets - 1 for each iteration of the cursor. It is returned in multiple frames in QA, the same as when you run multiple queries at the same time in the QA window.

I have never used cursors before so maybe this is to be expected - but what I want is for all the data to be returned in one data set. At present I can only access part of the data in my webpage - when I run the stored procedure and loop thru the data in the webpage, there is only the data from the first iteration of the cursor.

Below is a representation of a chunk of rows from the table, the stored procedure and a representation of the returned results. Can you please help me to return all the data in a single data set, or else tell me how I can access each of the data sets in my webpage.

Many thanks in advance for your help

Simon

simon.barnettnospam@.elexon.co.uk

Table

ID_col, Category_col, KeyAccountability_col, PerformanceMeasure_col, StaffID_col
1, Delivery, KeyAcc1, PerfMeas1, 3
3, Delivery, KeyAcc2, PerfMeas2, 3
7, Delivery, KeyAcc3, PerfMeas3, 3
8, Department, KeyAcc4, PerfMeas4, 3
11, Department, KeyAcc5, PerfMeas5, 3
12, Department, KeyAcc6, PerfMeas6, 3
13, Communications, KeyAcc7, PerfMeas7, 3
16, Communications, KeyAcc8, PerfMeas8, 3

Stored Procedure

declare @.var0 nchar(56)
declare @.var1 nchar(56)
declare keyaccscursor cursor for
(SELECT distinct category from
[CareerFramework].[dbo].[KeyAccountability] where jobprofileid = @.jobprofileID)
OPEN keyaccscursor
FETCH NEXT FROM keyaccscursor
INTO @.var1
WHILE @.@.FETCH_STATUS = 0
BEGIN
select distinct KeyAccountability as col1, 'keyacc' as rowtype from KeyAccountability where (category = @.var1) and (jobprofileid = @.jobprofileID)
union
select distinct category as col1, 'cat' as rowtype from KeyAccountability where (category = @.var1) and (jobprofileid = @.jobprofileID)
FETCH NEXT FROM keyaccscursor
INTO @.var1
END
CLOSE keyaccscursor
DEALLOCATE keyaccscursor

Results (when run in MSSQL Query Analyser )

-

KeyAccountability PerformanceMeasure (column headings)

Delivery

KeyAcc1 PerfMeas1

KeyAcc2 PerfMeas2

KeyAcc3 PerfMeas3

-

KeyAccountability PerformanceMeasure (column headings)

Department

KeyAcc4 PerfMeas3

KeyAcc5 PerfMeas4

KeyAcc6 PerfMeas5

-

KeyAccountability PerformanceMeasure (column headings)

Communications

KeyAcc7 PerfMeas6

KeyAcc7 PerfMeas7

I understand you have to present the following data

3, Delivery, KeyAcc2, PerfMeas2, 3
7, Delivery, KeyAcc3, PerfMeas3, 3
8, Department, KeyAcc4, PerfMeas4, 3
11, Department, KeyAcc5, PerfMeas5, 3
12, Department, KeyAcc6, PerfMeas6, 3
13, Communications, KeyAcc7, PerfMeas7, 3
16, Communications, KeyAcc8, PerfMeas8, 3

As

Delivery

KeyAcc2, PerfMeas2
KeyAcc3, PerfMeas3

And

Department

KeyAcc4, PerfMeas4, 3
KeyAcc5, PerfMeas5, 3

KeyAcc6, PerfMeas6, 3

And so on.

I should use a DropDownList cotrol with sqlsource ?SELECT distinct category from
[CareerFramework].[dbo].[KeyAccountability] where jobprofileid = @.jobprofileID”

And a GridView control with

Select KeyAccountability, PerformanceMeasure from KeyAccountability where Category=@.Categ

And @.categ is linked with DropDownList value.

Hope this help

|||

To fix your query for your requirement,

Code Snippet

declare @.var0 nchar(56)

declare @.var1 nchar(56)

declare @.jobprofileID as int

Set @.jobprofileID = 1

declare @.result table

(

col1 varchar(1000),

rowtype varchar(10)

)

declare keyaccscursor cursor for

(select distinct [category] from [keyaccountability] where jobprofileid = @.jobprofileid)

open keyaccscursor

fetch next from keyaccscursor

into @.var1

while @.@.fetch_status = 0

begin

Insert Into @.result

select keyaccountability as col1, 'keyacc' as rowtype from keyaccountability where (category = @.var1) and (jobprofileid = @.jobprofileid)

union

select category as col1, 'cat' as rowtype from keyaccountability where (category = @.var1) and (jobprofileid = @.jobprofileid)

fetch next from keyaccscursor

into @.var1

end

close keyaccscursor

deallocate keyaccscursor

Select * from @.result

|||

You can achieve the result without cursor also, (Highly recommended)

Code Snippet

declare @.jobprofileID as int

set @.jobprofileID = 1

select keyaccountability as col1, 'keyacc' as rowtype from keyaccountability where

(jobprofileid = @.jobprofileid)

union

select category as col1, 'cat' as rowtype from keyaccountability where

(jobprofileid = @.jobprofileid)

|||

Thanks very much for this - inserting into a table during the loop gives me the single data set - exactly as required.

There are 2 problems though, which may be related.

1.

The first is that I cannot declare a table in memory.

declare @.result table

(

col1 varchar(1000),

rowtype varchar(10)

)

gives me the following error:

Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'table'.

(When I change to creating a permanent table using CREATE table, and run it in QA, the correct data populates the table.)

2.

When adding this into my stored procedure and running my webpage, the page breaks with the message that the recordset cannot be looped thru because it is closed.

When I comment out the insert statement but leave in the CREATE statement, the page works as it did before.

If you can help with this I would be very grateful.

Many thanks

Simon

|||

Hi,

I tried this also but although all the required results are returned as a single data set, KeyAccountabilities are not associated with the Categories as required.

All the Categories are listed in the top rows and then the KeyAccountabilities are listed in random order below. Looking at the SQL I can't see a way to group them as required using this method.

Would it be possible?

Many thanks

Simon

declare @.jobprofileID as int

set @.jobprofileID = 1

select keyaccountability as col1, 'keyacc' as rowtype from keyaccountability where

(jobprofileid = @.jobprofileid)

union

select category as col1, 'cat' as rowtype from keyaccountability where

(jobprofileid = @.jobprofileid)

|||

I am really wondering how its happen. What is the version of SQL Server you are using.

To find,

Select @.@.VERSION

Even on your ASP page you can change the RecordSet behaviour as UseClient istead of UseServer. It will fix the issue.

|||

The following query may fix your group/order issue,

Code Snippet

declare @.jobprofileID as int

set @.jobprofileID = 1

Select col1,rowtype from

(

select category,keyaccountability as col1, 'keyacc' as rowtype from keyaccountability where

(jobprofileid = @.jobprofileid)

Union

select category,category as col1, 'cat' as rowtype from keyaccountability where

(jobprofileid = @.jobprofileid)

) as Data

Order By

category, Case When rowtype='cat' Then 1 Else 2 End, Col1

|||Thank you

sql