Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Friday, March 23, 2012

Passing datetime parameter to stored procedure

I want to pass a date parameter to stored procedure which is expecting
smalldatetime. I need to subtract a number of days from the current time and
pass it to the stored procedure. I tried DateAdd("d", -1, Now()). I can
display the the result in a text field on the report but when passing it to
the stored procedure to retrieve data I get and error that it is in bad
format.
Thanks,
AntoninOn May 22, 11:03 pm, "Antonin" <Antonin.Koude...@.fmc.sa.gov.au> wrote:
> I want to pass a date parameter to stored procedure which is expecting
> smalldatetime. I need to subtract a number of days from the current time and
> pass it to the stored procedure. I tried DateAdd("d", -1, Now()). I can
> display the the result in a text field on the report but when passing it to
> the stored procedure to retrieve data I get and error that it is in bad
> format.
> Thanks,
> Antonin
You could do one of a few different things:
- Use the CDate() function to pass it to a stored procedure.
- Redefine the smalldatetime input parameter in the stored procedure
as datetime and manipulate it to be a smalldatetime somewhere else in
the stored procedure
- Try to use Datepart to split the report field and then concatenate
it with '/' and then convert it to a datetime (the stored procedure
might implicitly accept it as a smalldatetime, though I don't recall).
- A combination of the above.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks Enrique. Would you know the solution for my other problem?
When I try to deploy a report I get this error:
The underlying connection was closed: Could not establish trust
relationship for the SSL/TLS secure channel.
The same error I get when I try to open
http://localhost/Reports/Pages/Folder.aspx
Antonin
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1179923004.037985.311190@.q69g2000hsb.googlegroups.com...
> On May 22, 11:03 pm, "Antonin" <Antonin.Koude...@.fmc.sa.gov.au> wrote:
>> I want to pass a date parameter to stored procedure which is expecting
>> smalldatetime. I need to subtract a number of days from the current time
>> and
>> pass it to the stored procedure. I tried DateAdd("d", -1, Now()). I can
>> display the the result in a text field on the report but when passing it
>> to
>> the stored procedure to retrieve data I get and error that it is in bad
>> format.
>> Thanks,
>> Antonin
> You could do one of a few different things:
> - Use the CDate() function to pass it to a stored procedure.
> - Redefine the smalldatetime input parameter in the stored procedure
> as datetime and manipulate it to be a smalldatetime somewhere else in
> the stored procedure
> - Try to use Datepart to split the report field and then concatenate
> it with '/' and then convert it to a datetime (the stored procedure
> might implicitly accept it as a smalldatetime, though I don't recall).
> - A combination of the above.
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>sql

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

Passing data between multiple Data Flows

OK, it's the first of the month...that must mean it's time for another dumb question!

I'm trying to "componentize" an SSIS package with multiple Data Flows, and I can't figure out how to get the output of the results from one Data Flow into another.

So, for example, at the end of one Data Flow, I have a Recordset destination, and I'm storing that into a variable. But I can't figure out how to access the contents of that variable in the following Data Flow. Can this be done, or am I going about this the wrong way?The best is to use a raw file destination and source.

You could use a script component to store the data in a variable however you want and then use a script component to retrieve the data.|||If you want to try the second option that Simon mentioed then there's some code here that might help you extract data from a variable.
http://blogs.conchango.com/jamiethomson/archive/2005/02/08/960.aspx

-Jamie|||

Jamie, thanks for the link, but it doesn't seem to apply in my situation, as I'm not sending the recordset to a Script Task, but rather a Script Component (as a source) in a Data Flow.

What I'm trying to do is break a package down into four or five separate Data Flows that I can enable/disable and route around as necessary--essentially creating a template package that I can apply to many different scenarios.

It seems like it should be a trivial thing to dump the data at the end of one Data Flow into a recordset and retrieve it at the beginning of another, but I can't figure out how to do it.

I suppose using raw files is one answer, but it seems like there has to be a more elegant solution, without writing files to disk.

|||John,
Use the recordset destination to dump the data into a recordset in memory. The code I linked to above can easily be used in a script source component to loop through that recordset and put values into the pipeline.

Your next question may be "if there's a Recordset Destination, why isn't there a Recordset Source?" The reason is that SSIS needs to know the metadata of the dataflow at design time which wouldn't be possible with a recordset Source.

-Jamie|||Jamie

But whats the point of being able to put it in and not get it out. Essentially your working round the fact so why can't SSIS.

Having a recordset source that you define the columns, whats wrong with that. Ok so it can't validate until execution time and that needs to be understood. Not providing a source component people are just going to write their own as you sort of have done.|||

Will there be a "typed dataset source" somewhere in the near future? The current situation with writing data, say half a gig, to disk only to read it again seconds later does not sound very performant. And writing one's own metadata in scriptcomponent or scripttask (in a language other than the preferred) without IDE support isn't a killer feature either :-/

With best regards,

Artus

|||

ArtusKG wrote:

Will there be a "typed dataset source" somewhere in the near future? The current situation with writing data, say half a gig, to disk only to read it again seconds later does not sound very performant. And writing one's own metadata in scriptcomponent or scripttask (in a language other than the preferred) without IDE support isn't a killer feature either :-/

With best regards,

Artus

It may not sound very performant but have you tried it? Its a proprietary file format and is very very fast indeed.

Even an out-of-the-box recordset source wouldn't be able to pick up its metadata from anywhere because that metadata doesn't exist until runtime.

If there's a way around that problem then i don't know about it.

-Jamie

|||

The problem I am currently struggling with is the vast amount of data unnecessarily written to disk. Let's keep the example with 500 MB in the recordset. If I had to write it the disk were the bottleneck for several seconds. Therafter some logi occurs (prior to my next dataflow task). And when I then read the data from the raw file I am again waisting time by reading data unnecessarily written to disk (and blocking every other disk-i/o on the machine).

I don't mind the data being held in RAM as I want it there for further processing later on anyway.

And a design time component where I can define my RecordSet's colums using drag-drop were a great improvement. Think of a "write schema to file" option of the RecordSet destination and a "read schema from file" option in the to be component RecordSet source...

With best regards,

Artus

|||

What is the scenario you are trying to enable, Artus? The first post in this thread was about componentization of data flows - we will be addressing that in the future, probably through other mechanisms. In your case you want to persist the results of a data flow in memory and then have another data flow pick up that data? Why? You really want to persist 500MB of data in RAM?

Thanks

Donald

Passing data between multiple Data Flows

OK, it's the first of the month...that must mean it's time for another dumb question!

I'm trying to "componentize" an SSIS package with multiple Data Flows, and I can't figure out how to get the output of the results from one Data Flow into another.

So, for example, at the end of one Data Flow, I have a Recordset destination, and I'm storing that into a variable. But I can't figure out how to access the contents of that variable in the following Data Flow. Can this be done, or am I going about this the wrong way?The best is to use a raw file destination and source.

You could use a script component to store the data in a variable however you want and then use a script component to retrieve the data.|||If you want to try the second option that Simon mentioed then there's some code here that might help you extract data from a variable.
http://blogs.conchango.com/jamiethomson/archive/2005/02/08/960.aspx

-Jamie|||

Jamie, thanks for the link, but it doesn't seem to apply in my situation, as I'm not sending the recordset to a Script Task, but rather a Script Component (as a source) in a Data Flow.

What I'm trying to do is break a package down into four or five separate Data Flows that I can enable/disable and route around as necessary--essentially creating a template package that I can apply to many different scenarios.

It seems like it should be a trivial thing to dump the data at the end of one Data Flow into a recordset and retrieve it at the beginning of another, but I can't figure out how to do it.

I suppose using raw files is one answer, but it seems like there has to be a more elegant solution, without writing files to disk.

|||John,
Use the recordset destination to dump the data into a recordset in memory. The code I linked to above can easily be used in a script source component to loop through that recordset and put values into the pipeline.

Your next question may be "if there's a Recordset Destination, why isn't there a Recordset Source?" The reason is that SSIS needs to know the metadata of the dataflow at design time which wouldn't be possible with a recordset Source.

-Jamie|||Jamie

But whats the point of being able to put it in and not get it out. Essentially your working round the fact so why can't SSIS.

Having a recordset source that you define the columns, whats wrong with that. Ok so it can't validate until execution time and that needs to be understood. Not providing a source component people are just going to write their own as you sort of have done.|||

Will there be a "typed dataset source" somewhere in the near future? The current situation with writing data, say half a gig, to disk only to read it again seconds later does not sound very performant. And writing one's own metadata in scriptcomponent or scripttask (in a language other than the preferred) without IDE support isn't a killer feature either :-/

With best regards,

Artus

|||

ArtusKG wrote:

Will there be a "typed dataset source" somewhere in the near future? The current situation with writing data, say half a gig, to disk only to read it again seconds later does not sound very performant. And writing one's own metadata in scriptcomponent or scripttask (in a language other than the preferred) without IDE support isn't a killer feature either :-/

With best regards,

Artus

It may not sound very performant but have you tried it? Its a proprietary file format and is very very fast indeed.

Even an out-of-the-box recordset source wouldn't be able to pick up its metadata from anywhere because that metadata doesn't exist until runtime.

If there's a way around that problem then i don't know about it.

-Jamie

|||

The problem I am currently struggling with is the vast amount of data unnecessarily written to disk. Let's keep the example with 500 MB in the recordset. If I had to write it the disk were the bottleneck for several seconds. Therafter some logi occurs (prior to my next dataflow task). And when I then read the data from the raw file I am again waisting time by reading data unnecessarily written to disk (and blocking every other disk-i/o on the machine).

I don't mind the data being held in RAM as I want it there for further processing later on anyway.

And a design time component where I can define my RecordSet's colums using drag-drop were a great improvement. Think of a "write schema to file" option of the RecordSet destination and a "read schema from file" option in the to be component RecordSet source...

With best regards,

Artus

|||

What is the scenario you are trying to enable, Artus? The first post in this thread was about componentization of data flows - we will be addressing that in the future, probably through other mechanisms. In your case you want to persist the results of a data flow in memory and then have another data flow pick up that data? Why? You really want to persist 500MB of data in RAM?

Thanks

Donald

Friday, March 9, 2012

pass variable

Hello,

I placed a post regarding this issue previously but no success. So I thought I explain everything properly this time in a new post. Thanks


I have created a stored procedure which passes variables to the ssis package and then executes the package.
The two variables inside the ssis package are @.FileName and @.ConnectionPath
As you can see from the below stored procedure, xp_cmdshell is used to execute the package.
If only the first variable is used in the package and the @.connectionPath variable is hardcoded inside the package then package runs fine.
Problem is in this particular call as you see below because @.ConnectionPath is included.

The output of print is:

dtexec /f d:\sysappl\CEM\SSIS\Imports\Trades\BaseProfiles2.dtsx /set \Package.Variables[User::FileName].Properties[Value];"d:\ApplData\CEM\WorkingTemp\profiles.csv"
/set \Package.Variables[User::ConnectionPath].Properties[Value];"Data Source=servername1\instancename1, 2025;Initial Catalog=CounterpartyExposure;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"


Error is:

Error: 2007-08-08 08:46:01.29
Code: 0xC0202009
Source: BaseProfiles2 Connection manager "CounterpartyExposure"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
End Error


if only the output is run in the query analyser then the error is:

The identifier that starts with 'Data Source=gblond088sjy\MSQL_curves_DEV1, 2025;Initial Catalog=CounterpartyExposure;Provider=SQLNCLI.1;Integrated Security=SSPI' is too long. Maximum length is 128.

/*********************************************************************************

uspCEMTradeExecutePackage2 'd:\sysappl\CEM\SSIS\Imports\Trades\StaticMappingOverride.dtsx',
'StaticMappingOverride.csv',
'Data Source=servername1\instancename1, 2025;Initial Catalog=CounterpartyExposure;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;'
*********************************************************************************/

ALTER procedure [dbo].[uspCEMTradeExecutePackage2]

@.FullPackagePath varchar(1000),
@.FileName varchar(500),
@.ConnectionPath varchar(1000)


as

declare @.returncode int
declare @.cmd varchar(1000)

declare @.FilePath varchar(1000)
declare @.FullFilePath varchar(1000)

set @.FilePath = 'd:\ApplData\CEM\WorkingTemp\'
set @.FullFilePath = @.FilePath + @.FileName
print ' -- ' + @.FileName

set @.cmd = 'dtexec /f ' + @.FullPackagePath + ' /set \Package.Variables[User::FileName].Properties[Value];"' + @.FullFilePath + '"'
set @.cmd = 'dtexec /f ' + @.FullPackagePath +
' /set \Package.Variables[User::FileName].Properties[Value];"' + @.FullFilePath + '"
/set \Package.Variables[User::ConnectionPath].Properties[Value];"' + @.ConnectionPath + '"'

print @.cmd

set nocount on

begin try

exec @.returncode = master..xp_cmdshell @.cmd

end try

begin catch

exec @.LastGoodVersionSP

DECLARE @.msg nvarchar(200)
SET @.msg = ('Error during execute package')

EXECUTE uspErrorReporter @.msg
end catch

set nocount off

Did you get this resolved in one of your other threads, or is it still open?

Monday, February 20, 2012

partitioning the table

I have some tables in the large production database which suppose to grow hi
gh and obviously the time consumption on making query on those tables will b
e really high, so is there any way by which I can partition the table, I mea
n the records entered befor
e a particular date will go into some separate partition and will be archive
d on requirement the query can be passed to that partition.
Hope this could be the way to handle the large tables. Or if you can suggest
some ways or links to handle very large database then I'll be thankful for
you.
Thanks in advance
Regards,
SunilHi Sunil.
You can use partitioned views to do this. These can either be local or
distributed accross physical servers.
Do these tables have identities? If so, this is a gotcha but I have a work
around if you do.
Regards,
Greg Linwood
SQL Server MVP
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:4BC00EDE-6F44-4B1C-ACB0-F77D2035DE53@.microsoft.com...
quote:

> I have some tables in the large production database which suppose to grow

high and obviously the time consumption on making query on those tables will
be really high, so is there any way by which I can partition the table, I
mean the records entered before a particular date will go into some separate
partition and will be archived on requirement the query can be passed to
that partition.
quote:

>
> Hope this could be the way to handle the large tables. Or if you can

suggest some ways or links to handle very large database then I'll be
thankful for you.
quote:

>
> Thanks in advance
> Regards,
> Sunil
|||Design the table again for the larger table, I think the problem is caused
by the design of table|||Partition the tables and use partitioned views to consolidate... You should
do lots of load testing to make sure this scales to suit your needs...
Wayne Snyder MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
(Please respond only to the newsgroups.)
I support the Professional Association for SQL Server
(www.sqlpass.org)
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:4BC00EDE-6F44-4B1C-ACB0-F77D2035DE53@.microsoft.com...
quote:

> I have some tables in the large production database which suppose to grow

high and obviously the time consumption on making query on those tables will
be really high, so is there any way by which I can partition the table, I
mean the records entered before a particular date will go into some separate
partition and will be archived on requirement the query can be passed to
that partition.
quote:

>
> Hope this could be the way to handle the large tables. Or if you can

suggest some ways or links to handle very large database then I'll be
thankful for you.
quote:

>
> Thanks in advance
> Regards,
> Sunil