Showing posts with label figure. Show all posts
Showing posts with label figure. Show all posts

Friday, March 23, 2012

Passing DML to From .NET SQLClient?

Hi All,
I am trying to figure out why the following fails and how to fix it:
I have a .NET Client application that passes parameters to stored procedures
and uses dynamic SQL that is passed to the Server. Everything is great. My
problem is if I want to send over to the server several DML in one string.
e.g.
----
USE Master
GO
IF EXISTS(SELECT 1 FROM sysobjects WHERE name = 'sp_XXXXX' AND type = 'P')
DROP PROC sp_XXXXX'
GO
Create Procedure sp_XXXXX
..
..
..
etc...
GO
----
Passing this type of string to SQL fails. Get error regarding the "GO" key
words, "Create Procedure Must be the first statement, etc...
Is it not possible to pass Multiple DML statements to SQL Server in one
string? If I send each DML statement alone, without the "GO" key word it
does work; but not all together.
Thanks for any insight,
John.GO is not a Transact-SQL statement. It's a batch delimiter used by tools
like OSQL and Query Analyzer. One method to execute scripts containing GOs
in your client app is to parse the script and execute batches individually
when a GO is encountered. See the link below for an example. Another
method is to use SQL-DMO to execute scripts.
[url]http://groups.google.com/group/comp.databases.ms-sqlserver/msg/3e7809e7eeb4cc95[/u
rl]
Hope this helps.
Dan Guzman
SQL Server MVP
"John" <jrugo@.patmedia.net> wrote in message
news:ujWlCQZzFHA.3124@.TK2MSFTNGP12.phx.gbl...
> Hi All,
> I am trying to figure out why the following fails and how to fix it:
> I have a .NET Client application that passes parameters to stored
> procedures and uses dynamic SQL that is passed to the Server. Everything
> is great. My problem is if I want to send over to the server several DML
> in one string.
> e.g.
> ----
> USE Master
> GO
> IF EXISTS(SELECT 1 FROM sysobjects WHERE name = 'sp_XXXXX' AND type = 'P')
> DROP PROC sp_XXXXX'
> GO
> Create Procedure sp_XXXXX
> ..
> ..
> ..
> etc...
> GO
> ----
> Passing this type of string to SQL fails. Get error regarding the "GO"
> key words, "Create Procedure Must be the first statement, etc...
> Is it not possible to pass Multiple DML statements to SQL Server in one
> string? If I send each DML statement alone, without the "GO" key word it
> does work; but not all together.
> Thanks for any insight,
> John.
>sql

Passing dataset to ssrs

I'm still seeking my holy grail to figure out a way to pass a dataset, full
of data to SSRS at run time.
The work to build the dataset has to be done in my ASPX program. I figure I
could easily create a physical table containing the data at runtime with a
name made up of MyTable + Session number.
My SSRS report would have this exact table format defined but would not know
the table name.
Now I would like to find a way to dynamically pass the table name to SSRS
when I execute the report and find a way to modify the SQL in my SSRS report
when the parameter is received.
Is this feasible?
Thanks,
TTina,
Binding to datasets is not supported in version 1.0 so you need to write a
custom data extension to report off ADO.NET datasets or you can use mine
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
In addition, you can use my AwReportViewer web control (extended version of
the HTML Viewer control) which makes generating reports on the server side
of a web app plus dataset binding easier (I hope). You can download it from
here
http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
Please note that version 2005 of RS will include WinForm and ASP.NET
controls which will support binding to ADO.NET datasets.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.prologika.com
"Tina" <tinamseaburn@.removespamexcite.com> wrote in message
news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> I'm still seeking my holy grail to figure out a way to pass a dataset,
full
> of data to SSRS at run time.
> The work to build the dataset has to be done in my ASPX program. I figure
I
> could easily create a physical table containing the data at runtime with a
> name made up of MyTable + Session number.
> My SSRS report would have this exact table format defined but would not
know
> the table name.
> Now I would like to find a way to dynamically pass the table name to SSRS
> when I execute the report and find a way to modify the SQL in my SSRS
report
> when the parameter is received.
> Is this feasible?
> Thanks,
> T
>|||I've just posted a DPE this evening to
http://workspaces.gotdotnet.com/appworld that may help you or at least point
you in the right direction.
Regards
Toby
"Teo Lachev" <teo@.nospam.prologika.com> wrote in message
news:e2Sr6bWgEHA.1276@.TK2MSFTNGP09.phx.gbl...
> Tina,
> Binding to datasets is not supported in version 1.0 so you need to write a
> custom data extension to report off ADO.NET datasets or you can use mine
>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
> In addition, you can use my AwReportViewer web control (extended version
of
> the HTML Viewer control) which makes generating reports on the server side
> of a web app plus dataset binding easier (I hope). You can download it
from
> here
> http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
> Please note that version 2005 of RS will include WinForm and ASP.NET
> controls which will support binding to ADO.NET datasets.
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.prologika.com
>
> "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> > I'm still seeking my holy grail to figure out a way to pass a dataset,
> full
> > of data to SSRS at run time.
> >
> > The work to build the dataset has to be done in my ASPX program. I
figure
> I
> > could easily create a physical table containing the data at runtime with
a
> > name made up of MyTable + Session number.
> >
> > My SSRS report would have this exact table format defined but would not
> know
> > the table name.
> >
> > Now I would like to find a way to dynamically pass the table name to
SSRS
> > when I execute the report and find a way to modify the SQL in my SSRS
> report
> > when the parameter is received.
> >
> > Is this feasible?
> > Thanks,
> > T
> >
> >
>|||Teo,
Thanks for the quick help. I'll ramp up on data extentions and then look at
these links. Do you have any idea of how far off version 2005 of RS is?
thanks,
T
"Teo Lachev" <teo@.nospam.prologika.com> wrote in message
news:e2Sr6bWgEHA.1276@.TK2MSFTNGP09.phx.gbl...
> Tina,
> Binding to datasets is not supported in version 1.0 so you need to write a
> custom data extension to report off ADO.NET datasets or you can use mine
>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
> In addition, you can use my AwReportViewer web control (extended version
of
> the HTML Viewer control) which makes generating reports on the server side
> of a web app plus dataset binding easier (I hope). You can download it
from
> here
> http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
> Please note that version 2005 of RS will include WinForm and ASP.NET
> controls which will support binding to ADO.NET datasets.
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.prologika.com
>
> "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> > I'm still seeking my holy grail to figure out a way to pass a dataset,
> full
> > of data to SSRS at run time.
> >
> > The work to build the dataset has to be done in my ASPX program. I
figure
> I
> > could easily create a physical table containing the data at runtime with
a
> > name made up of MyTable + Session number.
> >
> > My SSRS report would have this exact table format defined but would not
> know
> > the table name.
> >
> > Now I would like to find a way to dynamically pass the table name to
SSRS
> > when I execute the report and find a way to modify the SQL in my SSRS
> report
> > when the parameter is received.
> >
> > Is this feasible?
> > Thanks,
> > T
> >
> >
>|||Tina,
I am sorry, but Microsoft will be in a better position to answer this
question.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.prologika.com
"Tina" <tinamseaburn@.removespamexcite.com> wrote in message
news:OnLF7JXgEHA.3632@.TK2MSFTNGP09.phx.gbl...
> Teo,
> Thanks for the quick help. I'll ramp up on data extentions and then look
at
> these links. Do you have any idea of how far off version 2005 of RS is?
> thanks,
> T
> "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
> news:e2Sr6bWgEHA.1276@.TK2MSFTNGP09.phx.gbl...
> > Tina,
> >
> > Binding to datasets is not supported in version 1.0 so you need to write
a
> > custom data extension to report off ADO.NET datasets or you can use mine
> >
>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
> > In addition, you can use my AwReportViewer web control (extended version
> of
> > the HTML Viewer control) which makes generating reports on the server
side
> > of a web app plus dataset binding easier (I hope). You can download it
> from
> > here
> > http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
> >
> > Please note that version 2005 of RS will include WinForm and ASP.NET
> > controls which will support binding to ADO.NET datasets.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > http://www.prologika.com
> >
> >
> > "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> > news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> > > I'm still seeking my holy grail to figure out a way to pass a dataset,
> > full
> > > of data to SSRS at run time.
> > >
> > > The work to build the dataset has to be done in my ASPX program. I
> figure
> > I
> > > could easily create a physical table containing the data at runtime
with
> a
> > > name made up of MyTable + Session number.
> > >
> > > My SSRS report would have this exact table format defined but would
not
> > know
> > > the table name.
> > >
> > > Now I would like to find a way to dynamically pass the table name to
> SSRS
> > > when I execute the report and find a way to modify the SQL in my SSRS
> > report
> > > when the parameter is received.
> > >
> > > Is this feasible?
> > > Thanks,
> > > T
> > >
> > >
> >
> >
>|||Teo,
I'm going thru your documentation. I'm at "Setting the Report DataSource"
and am having some trouble.
I Deployed, and registered the dataset extension and adjusted the code
access security policy as per your instructions.
Upon running the query I was prompted for the parameter value of @.DataSource
where I entered the path to my dsResults.xsd. It displayed the button
columns but no fields on the left. Because there are no fields on the left,
I can't design the report.
What do you think might be wrong?
Thanks,
T
"Teo Lachev" <teo@.nospam.prologika.com> wrote in message
news:e2Sr6bWgEHA.1276@.TK2MSFTNGP09.phx.gbl...
> Tina,
> Binding to datasets is not supported in version 1.0 so you need to write a
> custom data extension to report off ADO.NET datasets or you can use mine
>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
> In addition, you can use my AwReportViewer web control (extended version
of
> the HTML Viewer control) which makes generating reports on the server side
> of a web app plus dataset binding easier (I hope). You can download it
from
> here
> http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
> Please note that version 2005 of RS will include WinForm and ASP.NET
> controls which will support binding to ADO.NET datasets.
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.prologika.com
>
> "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> > I'm still seeking my holy grail to figure out a way to pass a dataset,
> full
> > of data to SSRS at run time.
> >
> > The work to build the dataset has to be done in my ASPX program. I
figure
> I
> > could easily create a physical table containing the data at runtime with
a
> > name made up of MyTable + Session number.
> >
> > My SSRS report would have this exact table format defined but would not
> know
> > the table name.
> >
> > Now I would like to find a way to dynamically pass the table name to
SSRS
> > when I execute the report and find a way to modify the SQL in my SSRS
> report
> > when the parameter is received.
> >
> > Is this feasible?
> > Thanks,
> > T
> >
> >
>|||Tina,
Good job. Just hit the Refresh Fields toolbar button found on the Data tab.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.prologika.com
"Tina" <tinamseaburn@.removespamexcite.com> wrote in message
news:OLZsW1kgEHA.3016@.tk2msftngp13.phx.gbl...
> Teo,
> I'm going thru your documentation. I'm at "Setting the Report DataSource"
> and am having some trouble.
> I Deployed, and registered the dataset extension and adjusted the code
> access security policy as per your instructions.
> Upon running the query I was prompted for the parameter value of
@.DataSource
> where I entered the path to my dsResults.xsd. It displayed the button
> columns but no fields on the left. Because there are no fields on the
left,
> I can't design the report.
> What do you think might be wrong?
> Thanks,
> T
>
> "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
> news:e2Sr6bWgEHA.1276@.TK2MSFTNGP09.phx.gbl...
> > Tina,
> >
> > Binding to datasets is not supported in version 1.0 so you need to write
a
> > custom data extension to report off ADO.NET datasets or you can use mine
> >
>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
> > In addition, you can use my AwReportViewer web control (extended version
> of
> > the HTML Viewer control) which makes generating reports on the server
side
> > of a web app plus dataset binding easier (I hope). You can download it
> from
> > here
> > http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
> >
> > Please note that version 2005 of RS will include WinForm and ASP.NET
> > controls which will support binding to ADO.NET datasets.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > http://www.prologika.com
> >
> >
> > "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> > news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> > > I'm still seeking my holy grail to figure out a way to pass a dataset,
> > full
> > > of data to SSRS at run time.
> > >
> > > The work to build the dataset has to be done in my ASPX program. I
> figure
> > I
> > > could easily create a physical table containing the data at runtime
with
> a
> > > name made up of MyTable + Session number.
> > >
> > > My SSRS report would have this exact table format defined but would
not
> > know
> > > the table name.
> > >
> > > Now I would like to find a way to dynamically pass the table name to
> SSRS
> > > when I execute the report and find a way to modify the SQL in my SSRS
> > report
> > > when the parameter is received.
> > >
> > > Is this feasible?
> > > Thanks,
> > > T
> > >
> > >
> >
> >
>|||Toby,
Thanks for the effort and credit :-) Your version wil be very useful in
cases when the data source needs to be configured during runtime.
"Toby" <toby.maillist@.exmlsystems.com> wrote in message
news:OIoYcmWgEHA.904@.TK2MSFTNGP09.phx.gbl...
> I've just posted a DPE this evening to
> http://workspaces.gotdotnet.com/appworld that may help you or at least
point
> you in the right direction.
> Regards
> Toby
> "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
> news:e2Sr6bWgEHA.1276@.TK2MSFTNGP09.phx.gbl...
> > Tina,
> >
> > Binding to datasets is not supported in version 1.0 so you need to write
a
> > custom data extension to report off ADO.NET datasets or you can use mine
> >
>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
> > In addition, you can use my AwReportViewer web control (extended version
> of
> > the HTML Viewer control) which makes generating reports on the server
side
> > of a web app plus dataset binding easier (I hope). You can download it
> from
> > here
> > http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
> >
> > Please note that version 2005 of RS will include WinForm and ASP.NET
> > controls which will support binding to ADO.NET datasets.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > http://www.prologika.com
> >
> >
> > "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> > news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> > > I'm still seeking my holy grail to figure out a way to pass a dataset,
> > full
> > > of data to SSRS at run time.
> > >
> > > The work to build the dataset has to be done in my ASPX program. I
> figure
> > I
> > > could easily create a physical table containing the data at runtime
with
> a
> > > name made up of MyTable + Session number.
> > >
> > > My SSRS report would have this exact table format defined but would
not
> > know
> > > the table name.
> > >
> > > Now I would like to find a way to dynamically pass the table name to
> SSRS
> > > when I execute the report and find a way to modify the SQL in my SSRS
> > report
> > > when the parameter is received.
> > >
> > > Is this feasible?
> > > Thanks,
> > > T
> > >
> > >
> >
> >
>|||Theo,
After originally applying your changes I got security exceptions when ever I
tried to print any report. I then noticed that you had a strange double
quote character in your <codegroup changes where it says
...RS.Extensions.dll"/>. So, I changed it to a normal double quote. Now
whenever I try to print any report I get the exception clipped below. Can
you help?
Thanks,
T
Server Error in '/ReportServer' Application.
----
--
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: Assembly reportingserviceswebserver.dll security
permission grant set is incompatible between appdomains.
Source Error:
Line 26: <assemblies>
Line 27: <clear />
Line 28: <add assembly="ReportingServicesWebServer" />
Line 29: </assemblies>
Line 30: </compilation>
Source File: C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\web.config Line: 28
"Teo Lachev" <teo@.nospam.prologika.com> wrote in message
news:uwTfyymgEHA.1972@.TK2MSFTNGP09.phx.gbl...
> Tina,
> Good job. Just hit the Refresh Fields toolbar button found on the Data
tab.
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.prologika.com
>
> "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> news:OLZsW1kgEHA.3016@.tk2msftngp13.phx.gbl...
> > Teo,
> > I'm going thru your documentation. I'm at "Setting the Report
DataSource"
> > and am having some trouble.
> >
> > I Deployed, and registered the dataset extension and adjusted the code
> > access security policy as per your instructions.
> >
> > Upon running the query I was prompted for the parameter value of
> @.DataSource
> > where I entered the path to my dsResults.xsd. It displayed the button
> > columns but no fields on the left. Because there are no fields on the
> left,
> > I can't design the report.
> >
> > What do you think might be wrong?
> > Thanks,
> > T
> >
> >
> > "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
> > news:e2Sr6bWgEHA.1276@.TK2MSFTNGP09.phx.gbl...
> > > Tina,
> > >
> > > Binding to datasets is not supported in version 1.0 so you need to
write
> a
> > > custom data extension to report off ADO.NET datasets or you can use
mine
> > >
> >
>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5.
> > > In addition, you can use my AwReportViewer web control (extended
version
> > of
> > > the HTML Viewer control) which makes generating reports on the server
> side
> > > of a web app plus dataset binding easier (I hope). You can download it
> > from
> > > here
> > > http://www.manning-sandbox.com/thread.jspa?threadID=10392&tstart=0
> > >
> > > Please note that version 2005 of RS will include WinForm and ASP.NET
> > > controls which will support binding to ADO.NET datasets.
> > >
> > > --
> > > Hope this helps.
> > >
> > > ---
> > > Teo Lachev, MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > http://www.prologika.com
> > >
> > >
> > > "Tina" <tinamseaburn@.removespamexcite.com> wrote in message
> > > news:ObwTjOWgEHA.3932@.TK2MSFTNGP10.phx.gbl...
> > > > I'm still seeking my holy grail to figure out a way to pass a
dataset,
> > > full
> > > > of data to SSRS at run time.
> > > >
> > > > The work to build the dataset has to be done in my ASPX program. I
> > figure
> > > I
> > > > could easily create a physical table containing the data at runtime
> with
> > a
> > > > name made up of MyTable + Session number.
> > > >
> > > > My SSRS report would have this exact table format defined but would
> not
> > > know
> > > > the table name.
> > > >
> > > > Now I would like to find a way to dynamically pass the table name to
> > SSRS
> > > > when I execute the report and find a way to modify the SQL in my
SSRS
> > > report
> > > > when the parameter is received.
> > > >
> > > > Is this feasible?
> > > > Thanks,
> > > > T
> > > >
> > > >
> > >
> > >
> >
> >
>

Wednesday, March 21, 2012

passing boolean to stored proc as SQLDBtype.bit not working

Hi I was hoping that someone might be able to help me with this.

I'm trying to figure out why my VB.net code below generates 0 or 1 but doesn't insert it when I can execute my stored procedure with: exec sp 0

myParm = myCommand.Parameters.Add("@.bolProMembCSNM", SqlDbType.Bit)
myParm.Value = IIf(CBool(rblProMembCSNM.SelectedItem.Value) = True, 1, 0)

I've tried everything I used to use with Classic ASP and am stumped now.
Any ideas? I will have to do this for numerous controls on my pages.

Thanks in advance for any advice.If you can execute the stored procedure with bit value in database, that means the value passed from application is not right. You may check the input value by inserting into a temp. table or as a return value to the calling app.|||thank you, that is what I thought.

I have printed out the value of the param in the trace and it is 0 which I find odd as that should be accepted as a valid bit, unless I'm totally missing something.

Is there not a way to pass 'true' or 'false' to the SQLDBtype.bit and have SQL Server convert it to 1 or 0?

still working on it here.
thanks again for your input|||What kind of control is "rblProMembCSNM"?|||thank you,

I took your advice and created a temp table and insert all of my values, after all that it was a different parameter I was passing and I was not escaping the ' ...... very frustrating to find that out after everything but I did learn quite a bit in my research.

Tuesday, March 20, 2012

Passing a Simple Parameter....Help!

Hello and thanks for the help.
I am trying to pass a simple report parameter to a report and cannot
figure out why it is not working.
I run this in Start - Run
The report runs but it will not use the parameter.
http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
The Data Source uses this parameter to return the correct result set.
I set the data type on the parameter to int.
Any Ideas?
Thanks, Leocan you be a little clear on your question please
"cte25117@.centurytel.net" wrote:
> Hello and thanks for the help.
> I am trying to pass a simple report parameter to a report and cannot
> figure out why it is not working.
> I run this in Start - Run
> The report runs but it will not use the parameter.
> http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
> The Data Source uses this parameter to return the correct result set.
> I set the data type on the parameter to int.
> Any Ideas?
> Thanks, Leo
>|||1. Have you defined the parameter in the Designer. If Yes what is the "Name"
2. In the URL, you should specify the same name as you define in the designer.
If the above 2 are taken care of, then you are fine and it should work..
"RP" wrote:
> can you be a little clear on your question please
> "cte25117@.centurytel.net" wrote:
> > Hello and thanks for the help.
> >
> > I am trying to pass a simple report parameter to a report and cannot
> > figure out why it is not working.
> >
> > I run this in Start - Run
> >
> > The report runs but it will not use the parameter.
> >
> > http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
> >
> > The Data Source uses this parameter to return the correct result set.
> >
> > I set the data type on the parameter to int.
> >
> > Any Ideas?
> >
> > Thanks, Leo
> >|||Suresh,
The Parameter is in the query as follows
WHERE (TWN$Job.[HB Job ID] = @.JobID)
The Parameter name in the report is the same. (Default)
I know it should work but for some simple reason it is not. It makes no
sense. Is there some setting I have to set in reporting services to
allow this? I have SP2.
http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render
This is all should have to add to the string correct?
&JobID=55029
Thanks, Leo
Suresh wrote:
> 1. Have you defined the parameter in the Designer. If Yes what is the "Name"
> 2. In the URL, you should specify the same name as you define in the designer.
> If the above 2 are taken care of, then you are fine and it should work..
> "RP" wrote:
>
>>can you be a little clear on your question please
>>"cte25117@.centurytel.net" wrote:
>>
>>Hello and thanks for the help.
>>I am trying to pass a simple report parameter to a report and cannot
>>figure out why it is not working.
>>I run this in Start - Run
>>The report runs but it will not use the parameter.
>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
>>The Data Source uses this parameter to return the correct result set.
>>I set the data type on the parameter to int.
>>Any Ideas?
>>Thanks, Leo|||Leo,
Here's the syntax through URL:
"&JobID=" + <variableName>
Tell me what is the error that you are getting...
"cte25117@.centurytel.net" wrote:
> Suresh,
> The Parameter is in the query as follows
> WHERE (TWN$Job.[HB Job ID] = @.JobID)
> The Parameter name in the report is the same. (Default)
> I know it should work but for some simple reason it is not. It makes no
> sense. Is there some setting I have to set in reporting services to
> allow this? I have SP2.
> http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render
>
> This is all should have to add to the string correct?
> &JobID=55029
> Thanks, Leo
>
> Suresh wrote:
> > 1. Have you defined the parameter in the Designer. If Yes what is the "Name"
> > 2. In the URL, you should specify the same name as you define in the designer.
> >
> > If the above 2 are taken care of, then you are fine and it should work..
> >
> > "RP" wrote:
> >
> >
> >>can you be a little clear on your question please
> >>
> >>"cte25117@.centurytel.net" wrote:
> >>
> >>
> >>Hello and thanks for the help.
> >>
> >>I am trying to pass a simple report parameter to a report and cannot
> >>figure out why it is not working.
> >>
> >>I run this in Start - Run
> >>
> >>The report runs but it will not use the parameter.
> >>
> >>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
> >>
> >>The Data Source uses this parameter to return the correct result set.
> >>
> >>I set the data type on the parameter to int.
> >>
> >>Any Ideas?
> >>
> >>Thanks, Leo
> >>
>|||Suresh,
This is exaclty what I put in through URL:
Tried this:
http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
Tried this:
http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID+55029
Tried this:
http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&JobID+55029
Tried this:
http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&"JobID"+55029
Tried this:
http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&"JobID=55029"
Tried this:
JobID=55029 - JobID is the ParameterName - 55029 is the value
I do not get an error. The report returns nothing. It is still showing
the Prompt for the paramter JobID. It is as if it will not accept a
parameter.
I am trying to return the report based on the JobID = 55029
Suresh wrote:
> Leo,
> Here's the syntax through URL:
> "&JobID=" + <variableName>
> Tell me what is the error that you are getting...
>
> "cte25117@.centurytel.net" wrote:
>
>>Suresh,
>>The Parameter is in the query as follows
>>WHERE (TWN$Job.[HB Job ID] = @.JobID)
>>The Parameter name in the report is the same. (Default)
>>I know it should work but for some simple reason it is not. It makes no
>>sense. Is there some setting I have to set in reporting services to
>>allow this? I have SP2.
>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render
>>
>>This is all should have to add to the string correct?
>>&JobID=55029
>>Thanks, Leo
>>
>>Suresh wrote:
>>1. Have you defined the parameter in the Designer. If Yes what is the "Name"
>>2. In the URL, you should specify the same name as you define in the designer.
>>If the above 2 are taken care of, then you are fine and it should work..
>>"RP" wrote:
>>
>>can you be a little clear on your question please
>>"cte25117@.centurytel.net" wrote:
>>
>>Hello and thanks for the help.
>>I am trying to pass a simple report parameter to a report and cannot
>>figure out why it is not working.
>>I run this in Start - Run
>>The report runs but it will not use the parameter.
>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
>>The Data Source uses this parameter to return the correct result set.
>>I set the data type on the parameter to int.
>>Any Ideas?
>>Thanks, Leo
>>|||Suresh and Leo,
We are attempting to do the same exact thing and it isn't working. We have:
http://server-1/Reports/Pages/Report.aspx?ItemPath=%2fMarkListingbyStudent%2fMarkListingbyStudent&rs:Command=Render&calendarID=155
The report doesnt error. It just shows all the parameters and is waiting
for us to type in the calendarID instead of inserting 153 (what we are
passing through and want it to use).
Has anyone resolved this problem? Please help!!!!!!!! This is urgent and I
just don't understand why it isn't working. It appears we have everything
set up the way the documentation recommends. Is there anyone that has seen
this actually work?
Thank you for your help! :)
Sharlyn
"cte25117@.centurytel.net" wrote:
> Suresh,
> This is exaclty what I put in through URL:
> Tried this:
> http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
> Tried this:
> http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID+55029
> Tried this:
> http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&JobID+55029
> Tried this:
> http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&"JobID"+55029
> Tried this:
> http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&"JobID=55029"
> Tried this:
> JobID=55029 - JobID is the ParameterName - 55029 is the value
> I do not get an error. The report returns nothing. It is still showing
> the Prompt for the paramter JobID. It is as if it will not accept a
> parameter.
> I am trying to return the report based on the JobID = 55029
>
> Suresh wrote:
> > Leo,
> >
> > Here's the syntax through URL:
> > "&JobID=" + <variableName>
> >
> > Tell me what is the error that you are getting...
> >
> >
> > "cte25117@.centurytel.net" wrote:
> >
> >
> >>Suresh,
> >>
> >>The Parameter is in the query as follows
> >>WHERE (TWN$Job.[HB Job ID] = @.JobID)
> >>The Parameter name in the report is the same. (Default)
> >>
> >>I know it should work but for some simple reason it is not. It makes no
> >>sense. Is there some setting I have to set in reporting services to
> >>allow this? I have SP2.
> >>
> >>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render
> >>
> >>
> >>This is all should have to add to the string correct?
> >>
> >>&JobID=55029
> >>
> >>Thanks, Leo
> >>
> >>
> >>Suresh wrote:
> >>
> >>1. Have you defined the parameter in the Designer. If Yes what is the "Name"
> >>
> >>2. In the URL, you should specify the same name as you define in the designer.
> >>
> >>If the above 2 are taken care of, then you are fine and it should work..
> >>
> >>"RP" wrote:
> >>
> >>
> >>
> >>can you be a little clear on your question please
> >>
> >>"cte25117@.centurytel.net" wrote:
> >>
> >>
> >>
> >>Hello and thanks for the help.
> >>
> >>I am trying to pass a simple report parameter to a report and cannot
> >>figure out why it is not working.
> >>
> >>I run this in Start - Run
> >>
> >>The report runs but it will not use the parameter.
> >>
> >>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029
> >>
> >>The Data Source uses this parameter to return the correct result set.
> >>
> >>I set the data type on the parameter to int.
> >>
> >>Any Ideas?
> >>
> >>Thanks, Leo
> >>
> >>
>|||Two examples for you depending on whether you are creating the URL yourself
from your own app or if you are using the jump to URL.
Jump to URL use this:
The below example specifies the directory starting from the root. I have
this because this particular report can reside in a different directory than
the report I am jumping to. If it is in the same directory you can just not
worry about specifying the directory. A couple of others things to note, I
use the globals variable so this will work regardless of where I deploy it.
Also, note that parameter values are case sensitive so you must match it
exactly or you will end up without values in your parameter fields. Also
note that you can add to this URL a command to tell it to hide the parameter
toolbar. Anyway, this should get you started.
=Globals!ReportServerUrl & "?/Inventory/Similar Loads&Manifest=" &
Fields!manifstdocno.Value & "&WasteIDNum=" & Fields!wasteidnum.Value
Creating your own URL use this:
Here is a working URL. The folder is called Demo. The report is called
Sales Order 2 Two parameters StartDate and EndDate
Note that parameters are case sensitive. The %20 is the encoding for space.
Rendering is the default so you can leave it off the line.
Try to match my pattern here and hopefully it will work for you. It defaults
to rendering to HTML so you can leave that off as well.
http://YourServerName/ReportServer?/Demo/Sales%20Order%20Detail%202&StartDate=9/1/2003&EndDate=9/2/2003--Bruce Loehle-CongerMVP SQL Server Reporting Services"SharinDenver" <SharinDenver@.discussions.microsoft.com> wrote in messagenews:84E2CB92-0349-42B2-91C3-B3131B7301FD@.microsoft.com...> Suresh and Leo,>> We are attempting to do the same exact thing and it isn't working. Wehave:>>http://server-1/Reports/Pages/Report.aspx?ItemPath=%2fMarkListingbyStudent%2fMarkListingbyStudent&rs:Command=Render&calendarID=155>> The report doesnt error. It just shows all the parameters and is waiting> for us to type in the calendarID instead of inserting 153 (what we are> passing through and want it to use).>> Has anyone resolved this problem? Please help!!!!!!!! This is urgent andI> just don't understand why it isn't working. It appears we have everything> set up the way the documentation recommends. Is there anyone that hasseen> this actually work?>> Thank you for your help! :)>> Sharlyn>> "cte25117@.centurytel.net" wrote:>> Suresh,>> This is exaclty what I put in through URL:>> Tried this:>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029>> Tried this:>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID+55029>> Tried this:>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&JobID+55029>> Tried this:>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&"JobID"+55029>> Tried this:>>>">http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&"JobID=55029">> Tried this:>> JobID=55029 - JobID is the ParameterName - 55029 is the value>> I do not get an error. The report returns nothing. It is still showing>> the Prompt for the paramter JobID. It is as if it will not accept a>> parameter.>> I am trying to return the report based on the JobID = 55029>> Suresh wrote:>> > Leo,>> >> > Here's the syntax through URL:>> > "&JobID=" + <variableName>> >> > Tell me what is the error that you are getting...>> >> >> > "cte25117@.centurytel.net" wrote:>> >> >> >>Suresh,>> >> >>The Parameter is in the query as follows>> >>WHERE (TWN$Job.[HB Job ID] = @.JobID)>> >>The Parameter name in the report is the same. (Default)>> >> >>I know it should work but for some simple reason it is not. It makesno>> >>sense. Is there some setting I have to set in reporting services to>> >>allow this? I have SP2.>> >>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render>> >> >> >>This is all should have to add to the string correct?>> >> >>&JobID=55029>> >> >>Thanks, Leo>> >> >> >>Suresh wrote:>> >> >>1. Have you defined the parameter in the Designer. If Yes what is the"Name">> >> >>2. In the URL, you should specify the same name as you define in thedesigner.>> >> >>If the above 2 are taken care of, then you are fine and it shouldwork..>> >> >>"RP" wrote:>> >> >> >> >>can you be a little clear on your question please>> >> >>"cte25117@.centurytel.net" wrote:>> >> >> >> >>Hello and thanks for the help.>> >>> >>I am trying to pass a simple report parameter to a report and cannot>> >>figure out why it is not working.>> >>> >>I run this in Start - Run>> >>> >>The report runs but it will not use the parameter.>> >>>>http://twsql/Reports/Pages/Report.aspx?ItemPath=%2fPlant%2fPlant+-+Saw+Planning&rs:Command=Render&JobID=55029>> >>> >>The Data Source uses this parameter to return the correct resultset.>> >>> >>I set the data type on the parameter to int.>> >>> >>Any Ideas?>> >>> >>Thanks, Leo>> >>> >>