Showing posts with label retrieve. Show all posts
Showing posts with label retrieve. Show all posts

Saturday, February 25, 2012

Custom Data Extension to SQL Server

Where I work we have custom code to retrieve the connection string. Theprogrammer provides a role and a mode and a connection object isretured. I need similar functionality from Reporting Services and I'mnot sure where to start. I was thinking of passing the role and mode inas username and password under credentials and being able to use thisas my connection to get data for reports. Any help in solving thisproblem would be greatly appreciated.

SQL Server Reporting services is part of SQL Server so you can create roles either with stored procedure or under permissions in Enterprise manager. Hope this helps.

Kind regards,

Gift Peddie

|||Sorry but you did not understand my post. Please read before replying.As I said we have custom code that we pass a role and mode to that willgive us the CONNECTIONSTRING.
Ryan
|||

Sorry maybe the link below could help.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/html/secmod12.asp

Kind regards,

Gift Peddie

|||I have figured it out and that link doesn't relate to the problem.
I figured out how to do a custom data extension but I am getting astack overflow exception when I try using the extension. I am alsogetting a SecurityPermission exception when I try calling a functionthat uses interop code. So anyone with any ideas to either of theseproblems would be appreciated.
Ryan

Friday, February 24, 2012

custom code to populate parm default

I am using custom code to retrieve the current year to populate the default
year parameter for a report. The custom code correctly retrieves the year
when tested within the body of the report. However, when referenced as an
expression code.CurYr in the "default" seection of the report parameters, it
causes the preview pane to grey-out the prompt. I can not enter anything in
the prompt and it does not contain a value. When I remove the custom code
from the expression for the "default", the prompt is white and available to
me for entry. Does anyone have any idea why this is happening, or how I can
default the current year into my prompt parameter?
Thank you...On May 1, 8:24 am, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> I am using custom code to retrieve the current year to populate the default
> year parameter for a report. The custom code correctly retrieves the year
> when tested within the body of the report. However, when referenced as an
> expression code.CurYr in the "default" seection of the report parameters, it
> causes the preview pane to grey-out the prompt. I can not enter anything in
> the prompt and it does not contain a value. When I remove the custom code
> from the expression for the "default", the prompt is white and available to
> me for entry. Does anyone have any idea why this is happening, or how I can
> default the current year into my prompt parameter?
> Thank you...
I don't think you need to use custom code. Using a date part function
that SSRS will accept should do the trick. Try =YEAR(getdate()) or
=YEAR(now())|||=year(now is acceptable , HOWEVER, the preview pane still greys-out the year
prompt and does Not let me enter anything. It also does Not display the
results for the =year(now expression
For some reason, the preview pane doesn't work properly when an expression
provides the default value. In the past, I have specified a specific default
value, or used a query to load and had no difficulty.
Thoughts?
"toolman" wrote:
> On May 1, 8:24 am, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> > I am using custom code to retrieve the current year to populate the default
> > year parameter for a report. The custom code correctly retrieves the year
> > when tested within the body of the report. However, when referenced as an
> > expression code.CurYr in the "default" seection of the report parameters, it
> > causes the preview pane to grey-out the prompt. I can not enter anything in
> > the prompt and it does not contain a value. When I remove the custom code
> > from the expression for the "default", the prompt is white and available to
> > me for entry. Does anyone have any idea why this is happening, or how I can
> > default the current year into my prompt parameter?
> >
> > Thank you...
> I don't think you need to use custom code. Using a date part function
> that SSRS will accept should do the trick. Try =YEAR(getdate()) or
> =YEAR(now())
>|||On May 2, 3:24 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> =year(now is acceptable , HOWEVER, the preview pane still greys-out the year
> prompt and does Not let me enter anything. It also does Not display the
> results for the =year(now expression
> For some reason, the preview pane doesn't work properly when an expression
> provides the default value. In the past, I have specified a specific default
> value, or used a query to load and had no difficulty.
> Thoughts?
>
> "toolman" wrote:
> > On May 1, 8:24 am, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> > > I am using custom code to retrieve the current year to populate the default
> > > year parameter for a report. The custom code correctly retrieves the year
> > > when tested within the body of the report. However, when referenced as an
> > > expression code.CurYr in the "default" seection of the report parameters, it
> > > causes the preview pane to grey-out the prompt. I can not enter anything in
> > > the prompt and it does not contain a value. When I remove the custom code
> > > from the expression for the "default", the prompt is white and available to
> > > me for entry. Does anyone have any idea why this is happening, or how I can
> > > default the current year into my prompt parameter?
> > > Thank you...
> > I don't think you need to use custom code. Using a date part function
> > that SSRS will accept should do the trick. Try =YEAR(getdate()) or
> > =YEAR(now())- Hide quoted text -
> - Show quoted text -
Apparently once you establish an expression as your default that's
what you get without options for editing.
The way around it (although it bugs me to have to jump the extra
hoops) is as follows.
Create a new Text type dataset and enter this query SELECT
year(getdate()) AS 'Year'
In the Parameters dialog, set the default to From query and use the
new dataset. This plugs in the year but allows it to be edited.|||Got it... Thanks! :)
"toolman" wrote:
> On May 2, 3:24 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> > =year(now is acceptable , HOWEVER, the preview pane still greys-out the year
> > prompt and does Not let me enter anything. It also does Not display the
> > results for the =year(now expression
> >
> > For some reason, the preview pane doesn't work properly when an expression
> > provides the default value. In the past, I have specified a specific default
> > value, or used a query to load and had no difficulty.
> >
> > Thoughts?
> >
> >
> >
> > "toolman" wrote:
> > > On May 1, 8:24 am, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> > > > I am using custom code to retrieve the current year to populate the default
> > > > year parameter for a report. The custom code correctly retrieves the year
> > > > when tested within the body of the report. However, when referenced as an
> > > > expression code.CurYr in the "default" seection of the report parameters, it
> > > > causes the preview pane to grey-out the prompt. I can not enter anything in
> > > > the prompt and it does not contain a value. When I remove the custom code
> > > > from the expression for the "default", the prompt is white and available to
> > > > me for entry. Does anyone have any idea why this is happening, or how I can
> > > > default the current year into my prompt parameter?
> >
> > > > Thank you...
> >
> > > I don't think you need to use custom code. Using a date part function
> > > that SSRS will accept should do the trick. Try =YEAR(getdate()) or
> > > =YEAR(now())- Hide quoted text -
> >
> > - Show quoted text -
> Apparently once you establish an expression as your default that's
> what you get without options for editing.
> The way around it (although it bugs me to have to jump the extra
> hoops) is as follows.
> Create a new Text type dataset and enter this query SELECT
> year(getdate()) AS 'Year'
> In the Parameters dialog, set the default to From query and use the
> new dataset. This plugs in the year but allows it to be edited.
>

Tuesday, February 14, 2012

Cursors and Remote Stored Procedures

given it would appear i can use a cusor as an OUTPUT parameter to a remote
stored procedure, what is the best way to retrieve/return a batch of data
from a stored procedure.On Tue, 8 Nov 2005 07:26:06 -0800, "Martin Samm" <Martin
Samm@.discussions.microsoft.com> wrote:

>given it would appear i can use a cusor as an OUTPUT parameter to a remote
>stored procedure, what is the best way to retrieve/return a batch of data
>from a stored procedure.
Hi Martin,
http://www.sommarskog.se/share_data.html
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)