Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

Monday, March 26, 2012

Passing Global Variables from a Execute Package Task

I have a package (Package1) that is run from another package (Package2) via a Execute Package Task. I set a Global Variable called sErrorMessage in the in Package1 and would like to access that Global Variable in an ActiveX Script Task in Package2. How can I do this?Package 1:
Edit your Execute Package Task, and click on the "Outer Package Global Variables" tab. Select all the Global Variables you want available to Package 2. Save and close.

Package 2:
Edit your ActiveX Script Task and use the code below to access the variable:
DTSGlobalVariables("<global variable name>").Value|||Package1 doesnt have an Execute Package Task, Package2 does...

Package1:
ActiveX Script --> Connection1 -TransformData-> Connection2

Package2:
Exec Package1 -Success-> Send Success Email
'-Failure-> ActiveX (msgbox DTSGlobalVariables("sErrorMessage").Value) --> Send Failure Email|||Ooookay.. so substitute 2 for 1 and 1 for 2... done...|||Thats what I figured when you posted, but I tried that and got nothing.....I might have edited the reply since you looked at it...

When I run Package1 by itself I can see in the Package1 Properties that the Global Variable is being set properly from Package1.

The Execute Package Task in Package2 has the Outer Package Global Variable selected, but when I reference it with DTSGlobalVariables("sErrorMessage").Value in ActiveX Code it shows the variable as being empty.|||Just a update on this:

Seppuku was nice enough the help me via AIM. So far we have come to the conclusion that there is no builtin way for a child to pass data to the parent except maybe through file drops, or writing to a db table.|||Will attempt having the child write to a common table for communication...and will post the results here.

Friday, March 23, 2012

passing date parameters between reports changing from dd/mm/yyyy to mm/dd/yyyy

I have a report which is based on a start and end date that are passed
as parameters at run time. This works fine. However, in the report is
a link to another report, which needs to run based on the same date
parameters. However, the following happens...
Report 1 runs fine with date parameters and report is generated.
When report 2 is selected the same dates are passed, but the date
format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
report 2 will either run with the wrong dates, or it will crash and not
run at all if swapping month and day gives an invalid date.
I have my report languages set to default so it should pick up my
regional setting ok. But when passing these dates between reports the
settings seem to be lost somehow.
Can anyone help'Check the data settings on the machine, and the report server configuration.
That may be the culprit.
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
<gearoid_healy@.yahoo.com> wrote in message
news:1102350682.082943.295010@.c13g2000cwb.googlegroups.com...
>I have a report which is based on a start and end date that are passed
> as parameters at run time. This works fine. However, in the report is
> a link to another report, which needs to run based on the same date
> parameters. However, the following happens...
> Report 1 runs fine with date parameters and report is generated.
> When report 2 is selected the same dates are passed, but the date
> format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
> report 2 will either run with the wrong dates, or it will crash and not
> run at all if swapping month and day gives an invalid date.
> I have my report languages set to default so it should pick up my
> regional setting ok. But when passing these dates between reports the
> settings seem to be lost somehow.
> Can anyone help'
>|||Oops. Not "data settings" but "date settings", as in Control Panel.
Cheers,
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
news:er8cQd82EHA.4072@.TK2MSFTNGP10.phx.gbl...
> Check the data settings on the machine, and the report server
> configuration. That may be the culprit.
> --
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> <gearoid_healy@.yahoo.com> wrote in message
> news:1102350682.082943.295010@.c13g2000cwb.googlegroups.com...
>>I have a report which is based on a start and end date that are passed
>> as parameters at run time. This works fine. However, in the report is
>> a link to another report, which needs to run based on the same date
>> parameters. However, the following happens...
>> Report 1 runs fine with date parameters and report is generated.
>> When report 2 is selected the same dates are passed, but the date
>> format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
>> report 2 will either run with the wrong dates, or it will crash and not
>> run at all if swapping month and day gives an invalid date.
>> I have my report languages set to default so it should pick up my
>> regional setting ok. But when passing these dates between reports the
>> settings seem to be lost somehow.
>> Can anyone help'
>|||The date settings on my pc are correct. How do I check the report
server configuration? I've taken a look at RSReportServer.config and
the other .config files but can't see anything there that look like
regional settings, apart from
<Render>
<Extension Name=...>
<Configuration>
<OWCConfiguration>
<OWCDownloadLocation
language="en">http://office.microsoft.com/downloads/2002/owc10.aspx</OWCDownloadLocation>
but I don't think this has anything to do with it? Like I said, it
renders fine the first time, but when the dates are passed as part of
the url in a query string to the second report the date format changes,
so it must be some kind of report server configuration setting alright.
I just don't know where to go to check or fix this...|||ok, finally found a solution to this. Apparently it's a known issue
that was addressed in SP1 -
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm
...which states "The rs:ParameterLanguage URL access parameter
alleviates a problem in which culture-sensitive report parameters, such
as dates, times, currency, and numbers, are interpreted using the
browser language"
Basically you have to add
...&rs:ParameterLanguage=<regionalSetting>
where regional setting is en-ie or en-us or whatever...|||Great, thanks for posting your solution back to the newsgroup.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:1102422016.683757.198040@.z14g2000cwz.googlegroups.com...
> ok, finally found a solution to this. Apparently it's a known issue
> that was addressed in SP1 -
> http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm
> ...which states "The rs:ParameterLanguage URL access parameter
> alleviates a problem in which culture-sensitive report parameters, such
> as dates, times, currency, and numbers, are interpreted using the
> browser language"
> Basically you have to add
> ...&rs:ParameterLanguage=<regionalSetting>
> where regional setting is en-ie or en-us or whatever...
>|||I posested my solution to this before I actually tested it. This still
doesn't solve the problem I was having...
I call all my reports through a custom .net application, and display
them in my own application, building up my own URLs to display them.
However, when I link from one report (by clicking on an an image) it
calls the second report. But this is done within the report manager
and as such I don't get the option to append my own parameters to the
query string - namely the &rs:ParameterLanguage=en-ie part that I need.
Can anyone tell me how I might overcome this? I tried adding it as a
parameter in the Image Properties - Navigation - Hyperlink action -
Parameters but got the following error
...Parameter names must be CLS-compliant identifiers.
I'd appreciate a response from someone from Microsoft on this as it's a
known issue. How do I get around this bug in Reporting Services'|||It sounds like you are using Jump to Report. Use Jump to URL. You can put an
expression in Jump to URL that can be anything you want so you should have
no problem appending this onto it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:1102509563.514657.75340@.z14g2000cwz.googlegroups.com...
> I posested my solution to this before I actually tested it. This still
> doesn't solve the problem I was having...
> I call all my reports through a custom .net application, and display
> them in my own application, building up my own URLs to display them.
> However, when I link from one report (by clicking on an an image) it
> calls the second report. But this is done within the report manager
> and as such I don't get the option to append my own parameters to the
> query string - namely the &rs:ParameterLanguage=en-ie part that I need.
> Can anyone tell me how I might overcome this? I tried adding it as a
> parameter in the Image Properties - Navigation - Hyperlink action -
> Parameters but got the following error
> ...Parameter names must be CLS-compliant identifiers.
> I'd appreciate a response from someone from Microsoft on this as it's a
> known issue. How do I get around this bug in Reporting Services'
>|||Thanks Bruce!
Exactly what I was looking for. One slight problem... As I said, I'm
running these reports from a .net app. Is there anyway of reading the
URl of the web server from my web.config for my .net app'|||Use the global variable for this. Here is an example of a working jump to
url expression of mine:
=Globals!ReportServerUrl & "?/Inventory/Similar Loads&Manifest=" &
First(Fields!manifstdocno.Value, "LoadID") &"&WasteIDNum=" &
First(Fields!wasteidnum.Value, "LoadID")
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:1102529644.706986.86770@.z14g2000cwz.googlegroups.com...
> Thanks Bruce!
> Exactly what I was looking for. One slight problem... As I said, I'm
> running these reports from a .net app. Is there anyway of reading the
> URl of the web server from my web.config for my .net app'
>|||brilliant - thanks a million for that Bruce!! Problem sorted.|||I have something to share with everyone for this problem.
If you are using Jump to Report method then to solve this problem simply
format the date you are passing to linked report as "dd-MMM-yyyy" in
paraemeters window.
This worked for me.
Cheers,
Harry
"gearoid_healy@.yahoo.com" wrote:
> I have a report which is based on a start and end date that are passed
> as parameters at run time. This works fine. However, in the report is
> a link to another report, which needs to run based on the same date
> parameters. However, the following happens...
> Report 1 runs fine with date parameters and report is generated.
> When report 2 is selected the same dates are passed, but the date
> format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
> report 2 will either run with the wrong dates, or it will crash and not
> run at all if swapping month and day gives an invalid date.
> I have my report languages set to default so it should pick up my
> regional setting ok. But when passing these dates between reports the
> settings seem to be lost somehow.
> Can anyone help'
>

Passing 'date' parameter to Jet 4.0 linked server - collation problem?

Hello,
I've attached Access MDB as a linked server to SQL 2000 server. Now I
want to run distributed queries. I set 'collation compatible' option,
so when I reference an Access MDB table in WHERE clause, the parameter
is passed to Access data provider. But I can't do the same for
Datetime columns! :-((
Unfortunately I have a large legacy application which uses dynamic SQL
creation, so it is VERY painful for me to rewrite&optimize all SQL
statements in order to use OPENQUERY statements :-((
Example:
Select * From MyMDB...Orders Where OrderDate Between '1/1/5' and
GETDATE()
This statement results in scanning all of the Orders table by SQL
server :-(
Please help me!> Select * From MyMDB...Orders Where OrderDate Between '1/1/5'
What the heck kind of date is that? Try '20050101', assuming that is the
date you meant. The fact that *I* don't know what date you are passing
should be some kind of clue as to why the software doesn't understand it.

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

Tuesday, March 20, 2012

Passing an array to query in a table adapter

I'm looking for a way to pass an array of values as a parameter to a query in a table adapter. For example I want to run a query something like:

SELECT * FROM menu WHERE menu_role IN (@.roles)

And I could pass something like 'RegisteredUser, SuperUser, OtherUser' to the @.roles parameter.

For some reason I can't figure out a way to do this. Any help would be greatly appericated.

Thanks,

Ryan.

This is possible from only code behind. Dynamically create the string and assrign it to the select command of tableadapter.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=319884&SiteID=1

check this link

|||Thanks, but I don't think that that helps my situation. I guess I will just have to create a query string on the fly even though I hate doing that.|||

Check if this helps:http://weblogs.sqlteam.com/dinakar/archive/2007/03/28/60150.aspx

|||

There's more than one way to skin a cat...

I was trying to figure out the same thing when I realized I could filter the data AFTER it was returned. I put it in a dataview and used the rowfilter property. Hope that helps!

|||My solutions was to create a stored procedure that dynamically setup the query on the fly before sending the results back. All in all it turned out to be a fairly elegant solution, although I do wish I could just pass an array in through a parameter.

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

Monday, March 12, 2012

passing a query to sp_send_cdosysmail

I am looking for any help or hints on how to pass a query into or run a query as sp_send_cdosysmail as the body.
I need some way other than using an attachment to return the results of a query from sp_send_cdosysmail as the body. Any good points in a direction would help!XP_sendmail [BOL]

This example sends the results of the sp_configure to Robert King.

EXEC xp_sendmail 'robertk', @.query = 'sp_configure'|||Only problem with that is we don't want to install outlook on every sql machine we have....

Originally posted by Ruprect
XP_sendmail [BOL]

This example sends the results of the sp_configure to Robert King.

EXEC xp_sendmail 'robertk', @.query = 'sp_configure'|||just curious
why not?

sql mail works really well. you dont have to load anything but outlook.
you could configure the msi with a transform file and deploy it with a group policy
you could set the profile with a vb script so all you would have to do is log on wait for the install to finish and log off.|||for the 16+ servers we would have to pay for an outlook license.

Originally posted by Ruprect
just curious
why not?

sql mail works really well. you dont have to load anything but outlook.
you could configure the msi with a transform file and deploy it with a group policy
you could set the profile with a vb script so all you would have to do is log on wait for the install to finish and log off.

Wednesday, March 7, 2012

Pass user selected parameter

I have a report where the user will clik on a field value and anotherreport will run and appear. I want to pass the field value the userclicks on as a parameter to the report so when the second report appersit will have been filtered by the user selected value.

Pass the parameter in the URL to the report you are opening, and on the PageLoad method of the aspx page that contains the target report, just create a new ReportParameter using the value of the query string, add it to an array, and call report.SetParameters() with that array.

Pass through Authentication

We have Reporting Services 2000 standard edition installed and everything works fine. You can log in and run reports and the Reporting Services security rolls work. The problem is when a user goes to the url of reporting services web server it prompts them for a login. They enter their Windows domain login and they get in. Is there a way to configure Reporting Services to use the user's Windows Domain login credentials (pass through) and not prompt for them, similar toSharePoint.Here is our configuration:

We have a NT Domain (not active directory) all servers and client machine’s are in the same domain.
IIS for Reporting Services is set to authenticate users by Integrated Windows authentication, Enable anonymous is unchecked.
Server is running Windows Server 2003 Web Edition
Database security utilizes sql server login and is storedin the data source.

We are also planning to move the access to Reporting Services through SharePoint.Don’t know if that will complicate this login issue

Thanks

Enable anonymous access should be checked. Username and password credentials should be given, uncheck Integrated Windows authentication|||

I have a DotNetNuke portal running Reports from Reporting Services. I am having a problem because each time I access my ReportServer on a browser I am asked to authenticate myself. I am currently hosting my database on a hosting services company and I only have access to the Report Manager. Where should I define the access properties in the report manager for my report server?

The user I must use to authenticate is the main user which has full access to reports so this is not a viable solution.

Thanks for your help.

Pass report parameters to data source (2000)?

In the data tab of my report (Reporting Services for SQL Server 2000), I'd like to run a query that requires parameters be passed to it. Is there a way to pass the parameters of the report to that query?

Thank you.

Hello,

Yes, of course you can. Let's say you have a parameter named Param1, in the data tab, your query would look something like this:

select * from table1 where field2 = @.Param1

Hope this helps.

Jarret

|||I knew it had to be simple... Thank you so much! Smile

Saturday, February 25, 2012

Pass a variable to a linked server (FoxPro) query

I'm having problem with an OpenQuery statement in stored procedure, which should be run on FoxPro linked server. I'm getting either an error messages or not the result I expected. I know that the problem is with WHERE part, without this part it works.

Here is the code:
------------
DECLARE @.LastDate datetime
SELECT @.LastDate = MAX(DateChaged)
FROM tblPersonel
WHERE ACTIVE IN( 'A', 'T')

1. I tried:
SELECT * FROM OPENQUERY(FoxProLink, 'SELECT ACTIVE, EmpNumber FROM tblPersonel WHERE DateChanged >=''+@.LastDate+''')

This line gives me an error msg:

Could not execute query against OLE DB provider 'MSDASQL'.
[OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro Driver]Operator/operand type mismatch.]

2. I tried to use CTOD() - FOXPRO function to convert character to date.

SELECT * FROM OPENQUERY(FoxProLink, 'SELECT ACTIVE, EmpNumber FROM tblPersonel WHERE DateChanged >=CTOD(''+@.LastDate+'')')

-this doesn't give any error, but doesn't limit the result set as it should.

Thanks all.I am surprised that #2 works, because OPENQUERY does not work with parameter parsing or dynamic SQL tricks that SQL lets you get away with.|||I read an article on MSDN, describing how to pass a variable to linked server query...at the same time I read elsewhere that you can not pass parametrs to OpenQuery...
Does anybody have any suggestions?
Thanks all.

Pass a parameter with a Snap Shot request

I have a set of common reports which I run on a nightly snap shot just fine.

I would like to run a snap shot on these same reports passing a customer_id parameter to override the default customer_id already in the report.

I know one way around this is to create a linked report from the core reports and change the customer_id parameter there but I would rather not maintain several thousand linked reports folders or have to go through and create a new one every time we have a new customer.

So is there a way I can send a parameter through a Snap Shot or some other way I could do this that I have not thought of?

You can't really dynamically provide a per-snapshot parameter the way you describe it. One thing you could do (which has its own implicit drawbacks) is to create your snapshots with default paramter values that will NOT do any fitering at all. You essentially save a giant snapshot of ALL your data.

Then, when your users request the snapshot, you implement filtering on the report server itself (instead of on the SQL side) by utilizing a filter on the dataset or data region itself -- The obvious drawback is that you're bringing tons of unnecessary data across the wire to be filtered at SSRS....

|||

Russell Christopher - msft wrote:

Then, when your users request the snapshot, you implement filtering on the report server itself (instead of on the SQL side) by utilizing a filter on the dataset or data region itself -- The obvious drawback is that you're bringing tons of unnecessary data across the wire to be filtered at SSRS....

Ok, this is what I plan on doing but i've been all over the net looking for how to do exactly this, could someone explain?

|||

We have a similar requirement for creating snapshots and we are going to write a console application that will do all of our schedule runs and call the SetReportParameters() method along with CreateReportHistorySnapshot() right after it.

This solves the issues with runs for all data, which our security would never allow, even if we guaranteed that the filters would work.