Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Utilisation fonctions SQL dans Reporting services.

Author  Topic 

OL-92
Starting Member

1 Post

Posted - 2010-07-01 : 06:08:10
J'ai réalisé une requête SQL sous reporting services. Celle-ci est "énorme" parce qu'elle reprend plusieurs fois le même code pour des colonnes différentes.

Afin de simplifier la maintenance, je souhaite regrouper le code dans une fonction SQL qui serait appellée plusieurs fois par le SELECT
J'ai tenté d'essayer cette fonctionnalité avec une fonction simple du type :

CREATE FUNCTION [dbo].[essai] (@entree)
RETURNS int AS
BEGIN
return entree
END
GO

Lors de l'execution de la requête, j'ai le message suivant : Impossible de trouver la colonne "dbo" ou la fonction utilisateur ou l'agrégat "dbo.essai".

Il semble donc que reporting services n'identifie pas cette fonction que j'ai placé dans les propriétés du rapport, onglet "Code".

Ou mettre la fonction pour qu'elle soit reconnue ?
Comment utiliser ces fonctions SQL dans reproting services ?
Vous remerciant,

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-07-01 : 06:17:23
I didn't understand anything whatsoever of what you wrote, you might not have noticed (...) but this forum is in english. There is however a syntax error in your function:

CREATE FUNCTION [dbo].[essai] (@entree varchar(50))

- Lumbago

My blog (yes, I have a blog now! just not that much content yet)
-> www.thefirstsql.com
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2010-07-01 : 13:10:56
que veux tu dire par "n'identifie pas cette fonction que j'ai placé dans les propriétés du rapport" es-tu sure que tu as crée cette fonction. Si oui ou?

<><><><><><><><><><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-07-01 : 13:26:19
"I have an SQL query reporting services ."

"This is \"huge \" because it takes several times the same code for different columns."

"To simplify maintenance, I would like to consolidate the code into a SQL function that is called several times"

"Once the SELECT\r\nI attempted to try this feature with a simple function like:"

"CREATE FUNCTION [dbo ]. [ test] (@ input )
RETURNS int AS
BEGIN
return entryEND
GO"


"During the execution of the request, I see the following"

"Can not find column \" dbo \" or the user function or aggregate \" dbo.essai ."


"It seems that reporting services does not identify this feature that I placed in the properties of the report , \"Code\" tab ."


"Or put the function to make it recognized ?

How to use these functions in SQL reproting services ?

Thanking you ,"










Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -