Showing posts with label variables. Show all posts
Showing posts with label variables. Show all posts

Wednesday, March 21, 2012

Reporting Services - Variables/Parameters - Is this a bug?

When creating a Reporting Services report and declaring local variables as part of your query in a dataset there is sometimes a problem. When you hit run in the Data section and the “Define Query Parameters” box pops up, all the variables are not there. Sometimes when you go to properties (…) of that dataset the parameters are gone. Is this a bug? This is happening both in RS2000 and 2005.

Thanks

?

|||Anyone?|||

Not an expert in this area of the product, but i tried it briefly on my computer - local variables are recognized when you use the generic query designer (the default). They do not appear in the parameters (as they shouldn't). Parameters that are not local variables are automatically detected and shown in the parameters.

I couldn't emulate the behavior you describe. No matter how many times I opened/closed the report the parameters were correctly recognized and the local variables were preserved.

If you're using the graphical query designer, you may be running into some problems - that component rewrites queries and sometimes makes mistakes with more complicated query structures. Unfortunately, it is a standard component that we do not control. Recommendation is to try the generic query designer and see if the problem persists. There is a button on the data tab that lets you switch from using the graphical to using the generic query designer.

Hope that helps,

-Lukasz

|||

this is possibly related, and everytime i encounter it i get closer to having a nervous break down.. its very very annoying to say the least..

here's what i'm getting:

i have a report that gets data from a WebService.. webservice takes 6 parameters, all are primative datatypes.

i have a set of report parameters, and a set of dataset parameters that come from the report params.

i hit the execute button, fill in my values, it chugs along and give's me my expected results in the results grid.. perfect..

i edit my dataset query and put in an <ElementPath> so i can specify a particular table, hit execute and again i get my expected results..

if i do anything ie, edit the query, change to the layout window, then go back to the data window and hit refresh, the query blows up.. i edit my dataset and on the parameters tab, there's nothing.. all gone! wow.. i put all the parameters back in again, viewed the report source, copy and paste the block of code contained in the <DataSets> node to the notepad so i dont have to continually waste time re-entering the parameters..

this seems to happen whenever i click the refresh button.. i've tried to put it in generic query designer, and do it, but the UI seems to revert back to the graphical designer..

i've been dealing with it because most of my reports only took a parameter or two..

any ideas?

EDIT:

actually, i think it might be a problem if there is an error when you type in the parameters.. ie if i have a string param called strGuid, and it craps out the webservice when i cast the string to a guid (missed a char).. it seems to wipe out the dataset parameters..

|||

I've seen this many times, codemare & ruckazz

It will happen for one of the following reasons:

1. Your Query does not get parsed correctly i.e type error and you hit the properties button to go to parameters

2. You use a parameter that is not defined or you spelled incorrectly and go to parameters in properties

Use the Undo button (Ctrl-Z or Edit>Undo) and your parameters WILL be restored, do not save, find your flaw, fix it, save it, run it.

Reporting Services - Variables/Parameters - Is this a bug?

When creating a Reporting Services report and declaring local variables as part of your query in a dataset there is sometimes a problem. When you hit run in the Data section and the “Define Query Parameters” box pops up, all the variables are not there. Sometimes when you go to properties (…) of that dataset the parameters are gone. Is this a bug? This is happening both in RS2000 and 2005.

Thanks

?

|||Anyone?|||

Not an expert in this area of the product, but i tried it briefly on my computer - local variables are recognized when you use the generic query designer (the default). They do not appear in the parameters (as they shouldn't). Parameters that are not local variables are automatically detected and shown in the parameters.

I couldn't emulate the behavior you describe. No matter how many times I opened/closed the report the parameters were correctly recognized and the local variables were preserved.

If you're using the graphical query designer, you may be running into some problems - that component rewrites queries and sometimes makes mistakes with more complicated query structures. Unfortunately, it is a standard component that we do not control. Recommendation is to try the generic query designer and see if the problem persists. There is a button on the data tab that lets you switch from using the graphical to using the generic query designer.

Hope that helps,

-Lukasz

|||

this is possibly related, and everytime i encounter it i get closer to having a nervous break down.. its very very annoying to say the least..

here's what i'm getting:

i have a report that gets data from a WebService.. webservice takes 6 parameters, all are primative datatypes.

i have a set of report parameters, and a set of dataset parameters that come from the report params.

i hit the execute button, fill in my values, it chugs along and give's me my expected results in the results grid.. perfect..

i edit my dataset query and put in an <ElementPath> so i can specify a particular table, hit execute and again i get my expected results..

if i do anything ie, edit the query, change to the layout window, then go back to the data window and hit refresh, the query blows up.. i edit my dataset and on the parameters tab, there's nothing.. all gone! wow.. i put all the parameters back in again, viewed the report source, copy and paste the block of code contained in the <DataSets> node to the notepad so i dont have to continually waste time re-entering the parameters..

this seems to happen whenever i click the refresh button.. i've tried to put it in generic query designer, and do it, but the UI seems to revert back to the graphical designer..

i've been dealing with it because most of my reports only took a parameter or two..

any ideas?

EDIT:

actually, i think it might be a problem if there is an error when you type in the parameters.. ie if i have a string param called strGuid, and it craps out the webservice when i cast the string to a guid (missed a char).. it seems to wipe out the dataset parameters..

|||

I've seen this many times, codemare & ruckazz

It will happen for one of the following reasons:

1. Your Query does not get parsed correctly i.e type error and you hit the properties button to go to parameters

2. You use a parameter that is not defined or you spelled incorrectly and go to parameters in properties

Use the Undo button (Ctrl-Z or Edit>Undo) and your parameters WILL be restored, do not save, find your flaw, fix it, save it, run it.

Reporting Services - Variables/Parameters - Is this a bug?

When creating a Reporting Services report and declaring local variables as part of your query in a dataset there is sometimes a problem. When you hit run in the Data section and the “Define Query Parameters” box pops up, all the variables are not there. Sometimes when you go to properties (…) of that dataset the parameters are gone. Is this a bug? This is happening both in RS2000 and 2005.

Thanks

?

|||Anyone?|||

Not an expert in this area of the product, but i tried it briefly on my computer - local variables are recognized when you use the generic query designer (the default). They do not appear in the parameters (as they shouldn't). Parameters that are not local variables are automatically detected and shown in the parameters.

I couldn't emulate the behavior you describe. No matter how many times I opened/closed the report the parameters were correctly recognized and the local variables were preserved.

If you're using the graphical query designer, you may be running into some problems - that component rewrites queries and sometimes makes mistakes with more complicated query structures. Unfortunately, it is a standard component that we do not control. Recommendation is to try the generic query designer and see if the problem persists. There is a button on the data tab that lets you switch from using the graphical to using the generic query designer.

Hope that helps,

-Lukasz

|||

this is possibly related, and everytime i encounter it i get closer to having a nervous break down.. its very very annoying to say the least..

here's what i'm getting:

i have a report that gets data from a WebService.. webservice takes 6 parameters, all are primative datatypes.

i have a set of report parameters, and a set of dataset parameters that come from the report params.

i hit the execute button, fill in my values, it chugs along and give's me my expected results in the results grid.. perfect..

i edit my dataset query and put in an <ElementPath> so i can specify a particular table, hit execute and again i get my expected results..

if i do anything ie, edit the query, change to the layout window, then go back to the data window and hit refresh, the query blows up.. i edit my dataset and on the parameters tab, there's nothing.. all gone! wow.. i put all the parameters back in again, viewed the report source, copy and paste the block of code contained in the <DataSets> node to the notepad so i dont have to continually waste time re-entering the parameters..

this seems to happen whenever i click the refresh button.. i've tried to put it in generic query designer, and do it, but the UI seems to revert back to the graphical designer..

i've been dealing with it because most of my reports only took a parameter or two..

any ideas?

EDIT:

actually, i think it might be a problem if there is an error when you type in the parameters.. ie if i have a string param called strGuid, and it craps out the webservice when i cast the string to a guid (missed a char).. it seems to wipe out the dataset parameters..

|||

I've seen this many times, codemare & ruckazz

It will happen for one of the following reasons:

1. Your Query does not get parsed correctly i.e type error and you hit the properties button to go to parameters

2. You use a parameter that is not defined or you spelled incorrectly and go to parameters in properties

Use the Undo button (Ctrl-Z or Edit>Undo) and your parameters WILL be restored, do not save, find your flaw, fix it, save it, run it.

Saturday, February 25, 2012

Reporting Server - Passing Parameters programtically

We've developed several reports where you can type in / select variables and run them, affecting their outcomes.

We'd like to change this so if the user clicks on a link from our Intranet, this takes them straight to the report with the appropriate parameter(s) - rather like the "jump to report" function within a report - i.e. the url for that function...

Is this possible?

Steve

Yes, it is. You should check in the docs for topics mentioning "URL Access", but the basic deal is this:

I usually start this by drilling down to the appropriate URL for the report (sans parameters) using ReportServer rather than Reports (Report Manager) interface.

Once you have the appropriate base URL, you can add the appropriate instructions to the URL's query string.

You start with the ones that tell the server to render the report, in the appropriate format, for example:

&rs:Command=Render&rs:format=EXCEL

... and then you can add your params to this as more name-value pairs in normal querystring style, for example:

&myParam1=53&myKeyValue=SomeToken&myID=965

... okay?

By "start with" and "then", I don't mean that the order of the params and report instructions in the query string is significant, just that I generally think it through in this order, report-owned instructions and then parameters. If you are going to build the URL dynamically at runtime it helps to think about the two groups separately <s>.

>L<

|||

superb! i think the note to add to this is to use the "report server" site not the "reports" site i.e. http://servername/reportserver rather than http://servername/reports

thanks

|||

Yup, that's the way they do it in the docs, and that's the way I've been doing it... one site is the "real" server and the other is just the pretty interactive interface....

>L<

Reporting Server - Passing Parameters programtically

We've developed several reports where you can type in / select variables and run them, affecting their outcomes.

We'd like to change this so if the user clicks on a link from our Intranet, this takes them straight to the report with the appropriate parameter(s) - rather like the "jump to report" function within a report - i.e. the url for that function...

Is this possible?

Steve

Yes, it is. You should check in the docs for topics mentioning "URL Access", but the basic deal is this:

I usually start this by drilling down to the appropriate URL for the report (sans parameters) using ReportServer rather than Reports (Report Manager) interface.

Once you have the appropriate base URL, you can add the appropriate instructions to the URL's query string.

You start with the ones that tell the server to render the report, in the appropriate format, for example:

&rs:Command=Render&rs:format=EXCEL

... and then you can add your params to this as more name-value pairs in normal querystring style, for example:

&myParam1=53&myKeyValue=SomeToken&myID=965

... okay?

By "start with" and "then", I don't mean that the order of the params and report instructions in the query string is significant, just that I generally think it through in this order, report-owned instructions and then parameters. If you are going to build the URL dynamically at runtime it helps to think about the two groups separately <s>.

>L<

|||

superb! i think the note to add to this is to use the "report server" site not the "reports" site i.e. http://servername/reportserver rather than http://servername/reports

thanks

|||

Yup, that's the way they do it in the docs, and that's the way I've been doing it... one site is the "real" server and the other is just the pretty interactive interface....

>L<

|||Thank you for this information. It works perfectly! You saved me a bunch of time!

Reporting Server - Passing Parameters programtically

We've developed several reports where you can type in / select variables and run them, affecting their outcomes.

We'd like to change this so if the user clicks on a link from our Intranet, this takes them straight to the report with the appropriate parameter(s) - rather like the "jump to report" function within a report - i.e. the url for that function...

Is this possible?

Steve

Yes, it is. You should check in the docs for topics mentioning "URL Access", but the basic deal is this:

I usually start this by drilling down to the appropriate URL for the report (sans parameters) using ReportServer rather than Reports (Report Manager) interface.

Once you have the appropriate base URL, you can add the appropriate instructions to the URL's query string.

You start with the ones that tell the server to render the report, in the appropriate format, for example:

&rs:Command=Render&rs:format=EXCEL

... and then you can add your params to this as more name-value pairs in normal querystring style, for example:

&myParam1=53&myKeyValue=SomeToken&myID=965

... okay?

By "start with" and "then", I don't mean that the order of the params and report instructions in the query string is significant, just that I generally think it through in this order, report-owned instructions and then parameters. If you are going to build the URL dynamically at runtime it helps to think about the two groups separately <s>.

>L<

|||

superb! i think the note to add to this is to use the "report server" site not the "reports" site i.e. http://servername/reportserver rather than http://servername/reports

thanks

|||

Yup, that's the way they do it in the docs, and that's the way I've been doing it... one site is the "real" server and the other is just the pretty interactive interface....

>L<