Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Friday, March 30, 2012

Jump to URL Error

I'm trying to put a hyperlink in a field on a report. I've found the action property and set the "Jump To" box with the following:

="http://dveowb01.wbhq.com/UnitsStatusLog/StatusEntry.aspx?Unit=" & Fields!Unit.Value

I'm getting this error message:

The Hyperlink expression for the textbox ‘textbox24’ refers to the field ‘Unit’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.

Please help.

Thanks,

Jennifer

1. Click View -> Datasets from within your report server project.
2. Expand the dataset that is associated with the table or matrix in your report that this field references.

3. If the Unit field is not in the list for that dataset, right click the dataset and then click refresh. The field should now appear in the list.

4. Rebuild and deploy the report.

|||

If the text box that you have set the property on is not in a data region (list, table, or matrix) you will need to use an aggregator to access values from a dataset. Either add the text box to a list and let the list provide you with one copy of the text box for each item in the data set or change your formula to:

Code Snippet

="http://dveowb01.wbhq.com/UnitsStatusLog/StatusEntry.aspx?Unit="&First(Fields!Unit.Value)

and the first value will be used. A real easy way to get the expression, including scoping string, is to drag the field onto your report from the Datasets tab to your report. This will create a text box with an aggregator expression (first or sum) as the value.

To create a list and bind it to your data set, add the list and then on the properties tab (hit F4 if you don't see it) set the DataSetName property to be the data set with the field 'Unit'. Add your current text box to the list by dragging it over the list and dropping it once the pointer changes to the arrow with the attached small box.

Good luck!

Larry

Wednesday, March 28, 2012

Jump to report length error

I have a detailed report that needs a lot of inputs, and when I use a
first report and use "jump to report" to pass in parameters, the URL is
too long and IE does not open it.
Any ideas?Hi,
URL should not be more than 2048 bytes. So just use MS word to
measure no of characters. If characters are less than 2K then I am sure
that you are not passing all the parameters that details report is
expecting.
Cheers,
Mahesh

Jump to Report Error after SP1

I have a textbox on a report that has the advanced navigation jump to report
property set to another report three properties are passed to the "jump to
report". There is one dataset on the original report that is using a report
datasource with a specific username and password that allows the saving of
the password.
This works correctly when executing the report in visual studio design time.
It doesn't work correctly after it is deployed and it gets executed from the
report server/manager web site. When the user clicks the text box that
executes the "jump to" report the following error comes up:
The current action cannot be completed because the user data source
credentials that are required to execute this report are not stored in the
report server database. (rsInvalidDataSourceCredentialSetting)
This worked fine before SP1 was installed.
Any assistance would be appreciated.
Tim
tfogel@.idmi.comOne of the changes in SP1 was require the unattended execution account to be
specified on the server when running reports with datasources with
CredentialsOptions = None.
If you are using a data source that requires no credentials, for ex. Access
or XML files, set the unattended account using rsconfig -u ...
If you are using a data source that requires credentials, for ex: SQL,
Oracle, DB/2, etc. store credentials in the report server.
--
Tudor Trufinescu
Dev Lead
Sql Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tim Fogel" <tfogel@.idmi.com> wrote in message
news:OCEdA9dXEHA.1144@.TK2MSFTNGP12.phx.gbl...
> I have a textbox on a report that has the advanced navigation jump to
report
> property set to another report three properties are passed to the "jump to
> report". There is one dataset on the original report that is using a
report
> datasource with a specific username and password that allows the saving of
> the password.
> This works correctly when executing the report in visual studio design
time.
> It doesn't work correctly after it is deployed and it gets executed from
the
> report server/manager web site. When the user clicks the text box that
> executes the "jump to" report the following error comes up:
> The current action cannot be completed because the user data source
> credentials that are required to execute this report are not stored in the
> report server database. (rsInvalidDataSourceCredentialSetting)
> This worked fine before SP1 was installed.
> Any assistance would be appreciated.
> Tim
> tfogel@.idmi.com
>

Monday, March 26, 2012

jtds blob size

When I try to insert more then 200Mb data into blob field (varbinary) using jtds jdbc-driver I've got an error. Connection is going closed. In fact I cant insert so much data with other tools too (TOAD for MSSQL).Could you try Microsoft JDBC driver for SQLServer 2005? This may work better. In fact we are planning a v 1.1 release this August. This release can handle larger datatypes better.

JScript Error when printing / exporting

I have one user who can't print or export a report. For over 100 other users, they are not having this issue.

This one user gets:

MicrosoftVisual Studio Debugger

Microsoft JScriptruntime error: Object doesn't support this property or method

...then another IE modal error of:

IE cannot download Format=EXCEL from "domain name"

IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

The user is on IE 6, sp2 which is a standard browser for all users.

Okay..finally found out the issue:

User had to install the ActiveX control when first viewing the reports!!!!!!!!!

Friday, March 23, 2012

JOINING TWO TABLES ERROR

How can i Join these 2 table ? I am getting an error my LEFT OUTER JOIN
DOESNT WORK thanks
SELECT EmployeeNo, Datehired, SectionCode,
Department,Lastname,Firstname
FROM (dbo.Employees H1
GROUP By EmployeeNo, Datehired, SectionCode,
Department,Lastname,Firstname)
dbo.Employees LEFT OUTER JOIN ON dbo.empBenefits.EmployeeNo =
dbo.Employees.EmployeeNo
SELECT EmployeeNo, StartDate,Amount AS OLDBENEFITS,
EndDate,BenefitCode,
(SELECT MAX([amount])
FROM EMPBENEFITS T2
WHERE T2.employeeno = T.employeeno AND
startdate >= '2000-01-01' AND startdate <= '2007-03-30')
AS NEWBENEFITS
FROM dbo.empBenefits T
WHERE(StartDate =(SELECT TOP 1 ([startdate])
FROM EMPBENEFITS T1
WHERE T1.employeeno = T.employeeno AND
Benefitcode = 'HON' AND startdate >= '2000-01-01' AND startdate <=
'2007-03-30'))
GROUP BY EmployeeNo, Amount, BenefitCode, StartDate, EndDate, Amountheri wrote:
> How can i Join these 2 table ? I am getting an error my LEFT OUTER JOIN
> DOESNT WORK thanks
> SELECT EmployeeNo, Datehired, SectionCode,
> Department,Lastname,Firstname
> FROM (dbo.Employees H1
> GROUP By EmployeeNo, Datehired, SectionCode,
> Department,Lastname,Firstname)
> dbo.Employees LEFT OUTER JOIN ON dbo.empBenefits.EmployeeNo =
> dbo.Employees.EmployeeNo
> SELECT EmployeeNo, StartDate,Amount AS OLDBENEFITS,
> EndDate,BenefitCode,
> (SELECT MAX([amount])
> FROM EMPBENEFITS T2
> WHERE T2.employeeno = T.employeeno AND
> startdate >= '2000-01-01' AND startdate <= '2007-03-30')
> AS NEWBENEFITS
> FROM dbo.empBenefits T
> WHERE(StartDate =(SELECT TOP 1 ([startdate])
> FROM EMPBENEFITS T1
> WHERE T1.employeeno = T.employeeno AND
> Benefitcode = 'HON' AND startdate >= '2000-01-01' AND startdate <=
> '2007-03-30'))
> GROUP BY EmployeeNo, Amount, BenefitCode, StartDate, EndDate, Amount
It seems like you have two queries here. I can't quess how you intended
to combine them. It would help if you post CREATE TABLE statements for
the tables, some sample data and explain what result you want. Always
tell us the content of any error messages and always say what version
of SQL Server you are using. "Getting an error" is not a helpful
description of your problem!
SELECT E.employeeno, datehired, sectioncode, department, lastname,
firstname
FROM dbo.Employees AS E
LEFT JOIN dbo.empBenefits AS B
ON B.employeeno = E.employeeno ;
SELECT employeeno, startdate, amount AS oldbenefits, enddate,
benefitcode,
(SELECT MAX([amount])
FROM empbenefits AS T2
WHERE T2.employeeno = T.employeeno
AND startdate >= '2000-01-01'
AND startdate <= '2007-03-30') AS newbenefits
FROM dbo.empBenefits T
WHERE startdate =
(SELECT TOP 1 ([startdate])
FROM empbenefits AS T1
WHERE T1.employeeno = T.employeeno
AND benefitcode = 'HON'
AND startdate >= '2000-01-01'
AND startdate <= '2007-03-30')
GROUP BY employeeno, amount, benefitcode, startdate, enddate, amount ;
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hi David,
Thank you so much for the reply. Im sorry for that I did not mention
the Version .. I am using SQL2005.
The output I need to see is all employees In one row of data
Ex.
EmployeeNo, Lastname, Firstname, SectionCode, DepartmentCode,
Oldbenefits, NewBenefits, StartDate (Columns are displayed in a Single
Row as shown)
(EmployeeNo Lastname, Firstname, SectionCode, DepartmentCode) comes
from Employees Table
(Oldbenefits, NewBenefits,Startdate ) Comes from empBenefits Table
The second query gets the MIN and MAX Benefits from a row of data with
a specified data range.
I tried this query but it doesnt JOIN in my second Select Statement
seems like LEFT OUTER JOIN DOES NOT WORK
SELECT E.employeeno, datehired, sectioncode, department, lastname,
firstname
FROM dbo.Employees E LEFT OUTER JOIN
dbo.empBenefits T ON E.employeeno = T .employeeno
SELECT employeeno, startdate, amount AS
oldbenefits, enddate, benefitcode,
(SELECT
MAX([amount])
FROM
empbenefits AS T2
WHERE
T2.employeeno = T .employeeno AND startdate >= '2000-01-01' AND
startdate <= '2007-03-30') AS newbenefits
FROM dbo.empBenefits T
WHERE startdate =
(SELECT TOP 1
([startdate])
FROM
empbenefits AS T1
WHERE
T1.employeeno = T .employeeno AND benefitcode <> 'HON' AND startdate >=
'2000-01-01' AND startdate <= '2007-03-30')
GROUP BY employeeno, amount, benefitcode,
startdate, enddate, amount
Thanks,
Heri|||Hi David,
Here are the scripts for employees and empbenefits table hope this
could help thanks again
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[empBenefits]') and OBJECTPROPERTY(id,
N'IsUserTable') = 1)
drop table [dbo].[empBenefits]
GO
CREATE TABLE [dbo].[empBenefits] (
[EmployeeNo] [int] NOT NULL ,
[BenefitCode] [varchar] (25) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[StartDate] [smalldatetime] NOT NULL ,
[EndDate] [smalldatetime] NULL ,
[Amount] [decimal](10, 2) NULL ,
[Status] [tinyint] NOT NULL ,
[Remarks] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT
NULL
) ON [PRIMARY]
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Employees]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1)
drop table [dbo].[Employees]
GO
CREATE TABLE [dbo].[Employees] (
[EmployeeNo] [int] NOT NULL ,
[LastName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[FirstName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[MiddleName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
,
[Department] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[SectionCode] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL,
) ON [PRIMARY]
GO

Monday, March 19, 2012

Joining on and Grouping by CASE function column alias (URGENT)

I REALLY need to perform a JOIN and a GROUP BY on a CASE function column alias, but I'm receiving an "Invalid column name" error when attempting to run the query. Here's a snippet:

SELECT NewColumn=
CASE
WHEN Table1.Name LIKE '%FOO%' THEN 'FOO TOO'
END,
Table2.SelectCol2
FROM Table1
JOIN Table2 ON NewColumn = Table2.ColumnName
GROUP BY NewColumn, Table2.SelectCol2
ORDER BY Table2.SelectCol2

I really appreciate any help anyone can provide.

Thanks,
DC RossYou could do it as a sub query

Select NewColumn from (Select case....) MySub group by MySub.NewColumn...etc, etc|||Not tested, but you should be able to do it like this:


SELECT NewColumn=
CASE WHEN Table1.Name LIKE '%FOO%' THEN 'FOO TOO' END,
Table2.SelectCol2
FROM Table1
JOIN Table2 ON CASE WHEN Table1.Name LIKE '%FOO%' THEN 'FOO TOO' END = Table2.ColumnName
GROUP BY NewColumn, Table2.SelectCol2
ORDER BY Table2.SelectCol2

I'm sure there's some rule, but I've never figured out when SQL lets you use an alias and when it doesn't. But, in this case, it apparently doesn't, so just use the CASE statement and you should be all set.|||I didn't know you could use a CASE in the JOIN syntax? Does it work?|||Works for me|||Cool I'll have to remember that one, top tip.

Monday, March 12, 2012

Joings between two table variables

Is it possible to create a join between two table variables?
I tried doing something like this .. and it is throwing an error.
Declare @.tstTableOne table ( Sno int, FirstName varchar(100) )
Declare @.tstTableTwo table ( Sno int, LastName varchar(100) )
Insert @.tstTableOne Values(1, 'Dummy1')
Insert @.tstTableOne Values(2, 'Dummy2')
Insert @.tstTableTwo Values(1, 'Test1')
Insert @.tstTableTwo Values(2, 'Test2')
Update @.tstTableOne Set @.tstTable.FirstName = t.FirstName from @.tstTableTwo
t where t.Sno = @.tstTableOne.Sno
Regards
PradeepTry:
UPDATE t1
SET t1.FirstName = t2.LastName
FROM @.tstTableOne t1
INNER JOIN @.tstTableTwo t2 ON t1.Sno = t2.Sno
Let me know how you get on.
Damien
"SqlBeginner" wrote:

> Is it possible to create a join between two table variables?
> I tried doing something like this .. and it is throwing an error.
> Declare @.tstTableOne table ( Sno int, FirstName varchar(100) )
> Declare @.tstTableTwo table ( Sno int, LastName varchar(100) )
> Insert @.tstTableOne Values(1, 'Dummy1')
> Insert @.tstTableOne Values(2, 'Dummy2')
> Insert @.tstTableTwo Values(1, 'Test1')
> Insert @.tstTableTwo Values(2, 'Test2')
> Update @.tstTableOne Set @.tstTable.FirstName = t.FirstName from @.tstTableTw
o
> t where t.Sno = @.tstTableOne.Sno
> Regards
> Pradeep|||See if this helps
Declare @.tstTableOne table ( Sno int, FirstName varchar(100) )
Declare @.tstTableTwo table ( Sno int, LastName varchar(100) )
Insert @.tstTableOne Values(1, 'Dummy1')
Insert @.tstTableOne Values(2, 'Dummy2')
Insert @.tstTableTwo Values(1, 'Test1')
Insert @.tstTableTwo Values(2, 'Test2')
Update @.tstTableOne Set FirstName =LastName FROM
@.tstTableTwo t JOIN @.tstTableOne T1 ON t1.Sno =T.Sno
"SqlBeginner" <SqlBeginner@.discussions.microsoft.com> wrote in message
news:3ACD2367-C9D7-46F9-9938-88C278D6C9C0@.microsoft.com...
> Is it possible to create a join between two table variables?
> I tried doing something like this .. and it is throwing an error.
> Declare @.tstTableOne table ( Sno int, FirstName varchar(100) )
> Declare @.tstTableTwo table ( Sno int, LastName varchar(100) )
> Insert @.tstTableOne Values(1, 'Dummy1')
> Insert @.tstTableOne Values(2, 'Dummy2')
> Insert @.tstTableTwo Values(1, 'Test1')
> Insert @.tstTableTwo Values(2, 'Test2')
> Update @.tstTableOne Set @.tstTable.FirstName = t.FirstName from
> @.tstTableTwo
> t where t.Sno = @.tstTableOne.Sno
> Regards
> Pradeep|||Thanks it works. But any idea what is the bug in my Update statement?
Regards
Pradeep
"Damien" wrote:
> Try:
> UPDATE t1
> SET t1.FirstName = t2.LastName
> FROM @.tstTableOne t1
> INNER JOIN @.tstTableTwo t2 ON t1.Sno = t2.Sno
> Let me know how you get on.
> Damien
> "SqlBeginner" wrote:
>|||From BOL (UPDATE described):
"A table alias specified in a FROM clause cannot be used as a qualifier in
SET column_name"
You're mixing ANSI syntax with the T-SQL extension for UPDATEs and DELETEs
which allows you to specify multiple tables in a FROM clause. When using th
e
T-SQL syntax I _always_ specify the alias in the UPDATE clause and do not mi
x
aliased tables and non-aliased tables.
So,
UPDATE t
NOT UPDATE your_table
unless you are only updating one table, in which case "UPDATE your_table" is
correct.
Hope that helps!
Damien
"SqlBeginner" wrote:
> Thanks it works. But any idea what is the bug in my Update statement?
> Regards
> Pradeep
> "Damien" wrote:
>|||IMHO while using Joins in Table variables by definition or by rule we need t
o
use Alias names only. Since pradeep wasn't using that it throwed an error.
If at all he had tried this with Temp tables his logic would have worked as
it is without any hassles. Bcoz Temp tables doesn't have that rule.
Hope this helps!
Best Regards
Vadivel
http://vadivel.blogspot.com
"Damien" wrote:
> From BOL (UPDATE described):
> "A table alias specified in a FROM clause cannot be used as a qualifier in
> SET column_name"
> You're mixing ANSI syntax with the T-SQL extension for UPDATEs and DELETEs
> which allows you to specify multiple tables in a FROM clause. When using
the
> T-SQL syntax I _always_ specify the alias in the UPDATE clause and do not
mix
> aliased tables and non-aliased tables.
> So,
> UPDATE t
> NOT UPDATE your_table
> unless you are only updating one table, in which case "UPDATE your_table"
is
> correct.
> Hope that helps!
>
> Damien
> "SqlBeginner" wrote:
>|||This is what I meant,
Create table #tstTableOne table ( Sno int, FirstName varchar(100) )
Create table #tstTableTwo table ( Sno int, FirstName varchar(100) )
Insert #tstTableOne Values(1, 'Dummy1')
Insert #tstTableOne Values(2, 'Dummy2')
Insert #tstTableTwo Values(1, 'Test1')
Insert #tstTableTwo Values(2, 'Test2')
Update #tstTableOne Set #tstTableOne.FirstName = t.FirstName from
#tstTableTwo t where t.Sno = #tstTableOne.Sno
Select * from #tstTableOne
Select * from #tstTableTwo
Drop table #tstTableOne
Drop table #tstTableTwo
Best Regards
Vadivel
http://vadivel.blogspot.com
"Damien" wrote:
> From BOL (UPDATE described):
> "A table alias specified in a FROM clause cannot be used as a qualifier in
> SET column_name"
> You're mixing ANSI syntax with the T-SQL extension for UPDATEs and DELETEs
> which allows you to specify multiple tables in a FROM clause. When using
the
> T-SQL syntax I _always_ specify the alias in the UPDATE clause and do not
mix
> aliased tables and non-aliased tables.
> So,
> UPDATE t
> NOT UPDATE your_table
> unless you are only updating one table, in which case "UPDATE your_table"
is
> correct.
> Hope that helps!
>
> Damien
> "SqlBeginner" wrote:
>

Monday, February 20, 2012

Join Issue

I am getting this error message:

The column prefix 'TrainingData' does not match with a table name or alias name used in the query.

From this code (asp/ado/sql server):

sql = "SELECT FirstName, LastName, Grade, DayDate, Effort, UnitMeas,
Partners, Comments"
sql = sql & "FROM PartData, TrainingData WHERE TrainingData.PartID =
PartData.PartID AND TeamID = " & Session("teamid") & ""

Set rs=conn.Execute(sql)

Anyone see anything wrong with it? The tables are named correctly.

Thanks!no space between Comments and FROM

rudy
http://r937.com/|||...the sound you hear is me hitting my head on the table.

Thanks!@.!!!