Showing posts with label passing. Show all posts
Showing posts with label passing. Show all posts

Monday, March 12, 2012

RE-Using passed parameters

Hi All

I link to a report passing parm a,b,c (3 parms) a (Hidden), B(Multi Selection), C(Single selection), the report display correctly and the parm selection boxes display with available options.

I would like to be able to choose from the selection boxes and replace the initial (passed parameters) B and C would have a new value, and display the same report using the selected criteria.

Thank you

Trentino

I can't understand what you are asking. You want to link to the same report with new parameter values? Or you want to just select different values? Maybe another example would help.|||

Hi Brian

I like to select different values.

report A link to report B using parm1 and parm2.

Parm1 passes value 'A', parm2 is spaces (space is interpreted as select all records

matching the other criteria, ex. if there are 5 records all of them will be retieved), the new report storedProc retrieve the data that I would like to use to initialize parm2.

I cannot initialize parm2 with the result value from the SP (5 records value), I get forward dependencies are not valid.

Currently I created a new parm3, initialize it with the SP values, I can select 1 or more of the 5 displayed records (multi value box) and that work ok.

Is there a way to re-use parm2 without adding parm3 so no changes need to be done to the SP?

Hope this help you understand, thank you for your time.

Trentino

|||You probably have based the Valid Values list query used for parm 2 dependent on parm2. This is a circular reference. You need to have the 3rd report parameter and you use the second one as a seed value.|||

Hello Brian,

I've read your previous reply about forward dependencies and I was hoping you'd hear my plee.

I am using Visual Studio 2005 and I'm passing a single parameter (a unique string called AuditGUID) to a report and this single parameter is part of a multivalue list (select box) of many AuditGUID's. This returns a lot of information related to that unique AuditGUID.

When I set the parameter to use a select box, the error says the following:

[rsInvalidReportParameterDependency] The report parameter ‘Audit_GUID_par’ has a DefaultValue or a ValidValue that depends on the report parameter “Audit_GUID_par”. Forward dependencies are not valid.

But, when I change the select box to a textbox, where the user would have to enter a Audit_GUID (which is a very long and complicated string), then the report compiles successfully and works...but I can't allow users to have to go through this, I'd rather let them select it from a list (selectbox). Could you help me with this please?

Thank you for your time and I look forward to hearing from you.

Jean

Reusing Execution Plan

I've created a stored procedure and tried to compare the
execution plans by passing different parameters to it. The
execution plan in all the cases is displayed as same. But
how can i make sure that SQL Server is using the same
execution plan from memory each time i execute my stored
procedure. I want to make sure its not recreating the
execution plan each time i call the stored procedure.
Appreciate if anyone can help me to trace that.
Lots of thanks in advance.Look at masters syscacheobjects for your proc
select * from master.syscacheobjects where objid = object_id('myproc')
If you are plan sharing, you should see 2 entries, 1 executable plan and
1compiled plan...
"Sudhakar Koolla" <anonymous@.discussions.microsoft.com> wrote in message
news:093801c3b81d$492771b0$a301280a@.phx.gbl...
> I've created a stored procedure and tried to compare the
> execution plans by passing different parameters to it. The
> execution plan in all the cases is displayed as same. But
> how can i make sure that SQL Server is using the same
> execution plan from memory each time i execute my stored
> procedure. I want to make sure its not recreating the
> execution plan each time i call the stored procedure.
> Appreciate if anyone can help me to trace that.
> Lots of thanks in advance.

Friday, March 9, 2012

Reusing Execution Plan

I've created a stored procedure and tried to compare the execution plans by passing different parameters to it. The execution plan in all the cases is displayed as same. But how can i make sure that SQL Server is using the same execution plan from memory each time i execute my stored procedure. I want to make sure its not recreating the execution plan each time i call the stored procedure
Appreciate if anyone can help me to trace that
Lots of thanks in advance.See my other reply. Please don't multipost.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Sudhakar Koolla" <sudhakar.koolla@.wipro.com> wrote in message
news:465AB931-50FE-4F2D-9A7F-143A69B7CEE5@.microsoft.com...
> I've created a stored procedure and tried to compare the execution plans by passing different
parameters to it. The execution plan in all the cases is displayed as same. But how can i make sure
that SQL Server is using the same execution plan from memory each time i execute my stored
procedure. I want to make sure its not recreating the execution plan each time i call the stored
procedure.
> Appreciate if anyone can help me to trace that.
> Lots of thanks in advance.