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
 Development Tools
 Reporting Services Development
 Confused about Parameters and more

Author  Topic 

cardgunner

326 Posts

Posted - 2007-07-25 : 10:40:18
I'm trying to create a parameter. In Microsoft Access it was quite easy. In the criteria I surrounded [a word] and when I ran that query or any report/form made from that query a pop up would come up a say "a word". I then filled in my criteria and it filtered the data by the that word.

I can not get that same ease in SQL using analyser?

More important is I try to do the same in Report Services/Visual Studio .NET 2003 and I don't get it. In the data section if I put a ?. I get a prompt. I fill in my word and it runs correctly :). But when I try to preview it says "server does not support unnamed parameters. So i go into report parameters and try to name it but it doesn't filter after I select it from the dropdown list at the top.

Can anyone tell me a link to an article that explains how to create a parameter from start to finish? What am I supposed to use and such. It shouldn't be this hard. My goal is to get a report on Report Manager that the end users can can run, it asks them to fill in a date and a branch to which they do and it displays a report filtered by that date and that branch that they can print.

I have been all over MSDN Library and ASP.NET forum(which is not as good as this forum) and the web. I don't get it.

The other part which my explain my thick headedness is knowing the players.

SQL Server 2000
Reporting Services
Report Manager
Visual Studio .NET 2003
ASP.NET AJAX

What am I dealing with, what does what, Other then $1500 classes where do I go to learn this.

Card Gunner

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-25 : 13:41:46
If you want to use parameters in Query Analyzer, you must declare the variable. Here's an example:

DECLARE @i int

SET @i = 1

SELECT * FROM YourTable WHERE SomeID = @i

There is no prompt in Query Analyzer. It is not a front-end application like Access is. If you want to prompt, then you need to build an application.

For Reporting Services, did you install the sample reports that MS provides? It shows exactly how parameters are done.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

cardgunner

326 Posts

Posted - 2007-07-25 : 14:06:40
The sample reports?!? I don't think so. Where would I find them? I hate being dumb.

I'm trying to build a front-end apllication. I cannot find instructions good enough to explain to me how it's done. Even If I cvould find an example I could possibly manipulate it to work for me.

Card Gunner
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-25 : 14:08:59
What programming language are you using for your front-end application? SQL Server is not a programming language, so you'll need to pick one such as VB.NET or C#. You'll also need a few books on whichever you choose.

I believe sample reports would be located in the Reporting Services folders wherever you had it installed. Search for the rdl files. You can then pull them up in Visual Studio.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

cardgunner

326 Posts

Posted - 2007-07-25 : 14:31:43
I believe my programming language is SQL. I copy my select statements into Visual Studio.

Books-Yes-I need books- However I have to order them because I'm using Visual Studio .NET 2003 and any book in Barnes and Noble or Borders is 2005. Is there a huge difference? I don't know but I don't want to spend $50 to find out there is.

I will search my Visual Studio file for sample .rdl files.

I guess this is where I'm getting confused because I don't know but is this statement correct?
I take my statements from SQL Server 2000 and add them to Visual Studio .Net 2003 to create a report where as I can publish(make available)to other people thru reporting services.

Card Gunner
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-25 : 14:34:32
SQL is not a programming language that can build front-end applications. You need to choose one that is.

Visual Studio .NET 2003 is the IDE and environment for .NET development. You still need to decide which programming language in .NET to use. I like VB.NET, others like C#.

Well you have to build reports in Visual Studio, then you publish them. You don't just copy a query into Visual Studio, you have to build the report too. It sounds like you definitely need a Reporting Services book to start with.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

cardgunner

326 Posts

Posted - 2007-07-25 : 14:48:23
I think I'm missing the question. Front end application. We have a ERP? system. I can access that system by SQL Server and retrieve the necessary info to make reports. These reports have been the my select satement result lists. Anytime someone wanted a report they have to go to me and I would run the statement and print out the report. It looked like crap. So we go to Visual Studio with the same SQL Statement in hopes that It can get dressed up. We want to put some icing on it. However, the other people at the company still don't have access to it. So we go and try to publish it thru Reporting Services and Report Manager.

To narrow down the results I would like them to answer some questions when they run the report(parameters). They could do in my Access Database I built for them prior.

I'm all for books but without looking thru them I can't tell which are good ones I could understand and which ones are junk.

I really hope I or this thread doesn't make it to the Twit list.
Card Gunner
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-25 : 14:53:03
Ok, so you don't need to build an application since you've got ERP.

You just need to get an RS book now. Go to a book store and see which one you like.

I've got "Microsoft SQL Server 2000 Reporting Services" by Larson.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

cardgunner

326 Posts

Posted - 2007-07-25 : 14:58:14
Do I need one on Visual Studio as well?

I've been to the bookstores and nothing.

Card Gunner
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-07-25 : 15:01:22
You probably just need an RS book.

If you ever plan on doing complex reports, such as ones with embedded .NET code. We have a few complex RS reports. A few of them use embedded VB.NET code and one particular report references a .NET DLL, which is written in C#.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

cardgunner

326 Posts

Posted - 2007-07-25 : 15:33:44
Well I got two books in my cart
Hitchhiker's Guide to SQL Server 2000 Reporting Services (Microsoft Windows Server System Series) - Peter Blackburn
and
Visual Studio .NET Tips and Tricks - Minh T. Nguyen

I hope I made the correct choices. Thanks for the help

Card Gunner
Go to Top of Page
   

- Advertisement -