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
 Pass Parameters

Author  Topic 

liorlankri
Starting Member

17 Posts

Posted - 2005-10-12 : 18:19:20
I have a web site which contain a link to a SQL Report. Is it any way to pass parameter (in the address "Http://Sqlservername/repotrts/..." to the Report???

I defined in my report a parameter caled testP (No prompt) with default value "aaa".
The report contain a TextBox which it's value is the testP parameter value.
When I open the report on the SQL report:

http://SQLreportserver/Reports/Pages/Report.aspx?ItemPath=%2fTestReports%2fMy_Test

It's print to me "aaa" on that textbox. When I send value on the link:

http://SQLreportserver/Reports/Pages/Report.aspx?ItemPath=%2fTestReports%2fMy_Test&testP=bbb

It's still print to me "aaa" and not "bbb"

What's wrong????

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-10-12 : 18:38:51
Rather than pointing to /Reports/Pages... point to /ReportServer?/reportname...

---------------------------
EmeraldCityDomains.com
Go to Top of Page

liorlankri
Starting Member

17 Posts

Posted - 2005-10-13 : 02:00:57
That's not the ptoblem. The link here is only example that i gave. the real link is fine... exept to the passed paremeters
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-10-13 : 09:40:28
It's really not that hard to run the report directly from the report server, then to select office web components and export that...

That will open the page in its own window with the URL including all parameters.

Look at that URL and you will be able to tell how to pass parameters into a url..it's not that hard really.




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

liorlankri
Starting Member

17 Posts

Posted - 2005-10-13 : 16:35:58
It's seem that no understand my problem. I havew the link to the report which in the sql report server. I just want to know what should i do for sending parameters to the report by the link????
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-10-13 : 16:54:26
Did you try Jon's suggestion? It should show that on the URL, you need to include things like rc:Parameters=true&myParm1=ParmValue&myParm2=OtherParmValue.

And you pretty quickly blew off my answer, but just in case you didn't really understand it, let me say that I went through the hassle of having all the parameters specified correctly on a URL, but it was mistakenly directing to the Report Manager (/Reports/Pages...) instead of the Report Server (/ReportServer?/) and would not recognize the parameters in the link. As soon as I fixed it to point to the Report Server it worked just fine.

Now, if this still doesn't solve your problems, might I suggest that you post for us here the EXACT link that you are attempting to use and we can help you troubleshoot it better.

---------------------------
EmeraldCityDomains.com
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-10-13 : 17:00:54
quote:
Originally posted by liorlankri

It's seem that no understand my problem. I havew the link to the report which in the sql report server. I just want to know what should i do for sending parameters to the report by the link????



I guess what I posted you tried and that didnt work? Which certainly seems odd to me. When I wanted to learn how to pass parameters to a report from another application rather than the report server those were the exact steps.




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

liorlankri
Starting Member

17 Posts

Posted - 2005-10-14 : 02:13:17
O.K AjarnMark!
Let's do order in your answer.
My link to the report (which in the SQL report server) is:
http://dev/Reports/Pages/Report.aspx?ItemPath=%2fDeskReports%2fDesk_Test
(the original link that send me directly to the report)
Now, In the report Is defined a parameter called TestPar. It's default value is "aaa".
I try to open the report (from the link) AND to change the value of this parameter. So I try this
http://dev/Reports/Pages/Report.aspx?ItemPath=%2fDeskReports%2fDesk_Test&TestPar=bbb
(you can see that I add &TestPar=bbb to the link.

This link open me the report but there is now change on the value of TestPar (still aaa and not bbb)
Now, can you tell how to fix it?
Should I change the link? (can you rewrite it for me?)
Should I change defenision in the report?

Thank you

Go to Top of Page

liorlankri
Starting Member

17 Posts

Posted - 2005-10-14 : 02:54:41
It's Work
I change the link to be
http://dev/ReportServer?/Pages/Report.aspx?ItemPath=%2fDeskReports%2fDesk_Test&TestPar=bbb
(/ReportServer?/ instead of /Reprots/)
Now. I define Prompt User to be true and promp string to be blank!!!!
and it's work!!!!!!
Go to Top of Page
   

- Advertisement -