Showing posts with label populate. Show all posts
Showing posts with label populate. Show all posts

Friday, March 30, 2012

Report parameters

I'm using a query to populate a drop down list for a report parameter. E.g. a
number of stores. I'm using this to get sales figures per store.
Now I need a way to show the sales figures for all stores. A user should for
example be able to skip the stores selection list to select them all...
I haven't figured out yet how to skip this, or some other solution to get
every store. When I do not select a store, RS complains there's no store
selected. Even when I select "allow null value" in the parameter options...
Can someone help me?Hi Andreas,
look here in the Newsgroup :
Report Parameters with a choice of "All"
mfg Georg
"Andreas" <Andreas@.discussions.microsoft.com> schrieb im Newsbeitrag
news:BC84B219-9A78-4E5F-8FC1-5CC1A4C175D1@.microsoft.com...
> I'm using a query to populate a drop down list for a report parameter.
E.g. a
> number of stores. I'm using this to get sales figures per store.
> Now I need a way to show the sales figures for all stores. A user should
for
> example be able to skip the stores selection list to select them all...
> I haven't figured out yet how to skip this, or some other solution to get
> every store. When I do not select a store, RS complains there's no store
> selected. Even when I select "allow null value" in the parameter
options...
> Can someone help me?
>|||thx georg
"Georg Schmelzer" wrote:
> Hi Andreas,
> look here in the Newsgroup :
> Report Parameters with a choice of "All"
>
> mfg Georg
>
>
> "Andreas" <Andreas@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:BC84B219-9A78-4E5F-8FC1-5CC1A4C175D1@.microsoft.com...
> > I'm using a query to populate a drop down list for a report parameter.
> E.g. a
> > number of stores. I'm using this to get sales figures per store.
> > Now I need a way to show the sales figures for all stores. A user should
> for
> > example be able to skip the stores selection list to select them all...
> > I haven't figured out yet how to skip this, or some other solution to get
> > every store. When I do not select a store, RS complains there's no store
> > selected. Even when I select "allow null value" in the parameter
> options...
> >
> > Can someone help me?
> >
>
>

Report parameter won't show values with stored procedure results

Hi,
I wrote a stored procedure in C# to return results that I could use to
populate a report parameter list. The problem occurs when I set up the
parameter. Under "Report Parameters -> Available Values -> From Query", I
can set the dataset fine but no entries appear under the Value field or the
Label field. When I run the query (whether it's thru the data tab or in SQL
server management Studio or the SQL Server project), I get the correct
results. If I try to type in the name of the field, I get an
rsInvalidDataSetReferenceField error when I preview the report.
Below is the steps I took to get to where I'm at:
1.
The stored procedure was supposed to extract certain areas from the area
path, with the TFSWarehouse as my data source. The areas of interest were
top-level areas, i.e. \\TeamProject\TopLevelArea\SubAreas... The
CommandText attribute of my SqlCommand instance is as follows:
@."SELECT DISTINCT Area.[Area Path]
FROM Area INNER JOIN
[Current Work Item] ON Area.__ID = [Current Work
Item].Area";
2.
The results are returned in an SqlDataReader. I read thru each record of
the reader and manipulate some of the data and send it back using
SqlContext.Pipe.SendResultsStart/Row/End when appropriate. The structure of
the record consists of one column, called "TopLevelArea".
3.
I compiled it into an assembly using the Visual Studio command prompt, ran a
T-SQL query to create the procedure, so that it appears in the Stored
Procedures list. And then I created a dataset whose command type is
StoredProcedure, and it contains the name of the procedure. Then I set up
the parameter and that's where everything went all wrong.
Please help.Hi Winkles,
Would you please try to check the DataSet Properties?
Make sure the Field have set a proper name in the data tab of the Report
Project.
Also, please make sure you have set the correct dataset name when you
config the report parameter.
If this does not help, would you please send the sample stored procedure to
me for troubleshooting? Thanks!
Sincerely yours,
Wei Lu
Microsoft Online Partner Support
=====================================================
PLEASE NOTE: The partner managed newsgroups are provided to assist with
break/fix
issues and simple how to questions.
We also love to hear your product feedback!
Let us know what you think by posting
- from the web interface: Partner Feedback
- from your newsreader: microsoft.private.directaccess.partnerfeedback.
We look forward to hearing from you!
======================================================When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hello Winkles,
I have tested on my side with your code.
You need to set the Field tab in the DataSet properties.
In the Field Name, type TopLevelArea, and type TopLevelArea in the Value.
(Remove the equal mark). And then, you could get the Field name in the
Parameter.
Please do the above and let me know the result.
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi Wei,
It worked!!! Thank you very much! I had been including the equal sign
before.
The 'TopLevelArea' in Field Name...does that correspond to the metadata
column in the stored procedure? What does the TopLevelArea in the 'Value'
column match up with? Or do they both refer to the same thing?
Thanks again.
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:1BHmMqBwGHA.5976@.TK2MSFTNGXA01.phx.gbl...
> Hello Winkles,
> I have tested on my side with your code.
> You need to set the Field tab in the DataSet properties.
> In the Field Name, type TopLevelArea, and type TopLevelArea in the Value.
> (Remove the equal mark). And then, you could get the Field name in the
> Parameter.
> Please do the above and let me know the result.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
>|||Hi Winkles,
Yes, it correspond to the metadata column in the stored procedure.
The TopLevelArea in the Value column is the Friendly Name you could use in
the Report. You could modify it with other name.
Here is the article for your reference:
Fields
Each dataset in a report contains a list of fields. Typically, the fields
refer to columns or fields returned by the query in the dataset. Fields
that refer to database fields contain a pointer to the database field and a
name property. You can use the name property to provide a friendly name in
place of the name of the database field. In addition to database fields,
the fields list can contain calculated fields. Calculated fields contain a
name and an expression. The expression can be as simple as a concatenation
of two database fields (for example, first name and last name), or it can
be used to perform complex calculations.
Some query languages are flexible enough so that a query can be written to
return friendly field names and perform calculations, making changes to the
fields list unnecessary. The fields list is especially useful when using a
database or query language that does not provide this flexibility.
http://msdn2.microsoft.com/en-us/library/ms160324.aspx
If you have any questions or concerns, please feel free to let me know.
Sincerely,
Wei Lu
Microsoft Online Community Supportsql

Wednesday, March 28, 2012

Report Parameter Dataset Running Twice?

Hi,
I have a DDL Report Parameter tied to a Dataset.
When I go to view the Report in RS the Dataset is run to populate the
Parameter, but it also seems to run the Dataset when I hit the View Report
button.
I don't have the Dataset tied to anything except the Report Parameter.
Is there a way to stop the 2nd run?
thank you
tOn May 22, 11:59 am, DigHazuse <DigHaz...@.discussions.microsoft.com>
wrote:
> Hi,
> I have a DDL Report Parameter tied to a Dataset.
> When I go to view the Report in RS the Dataset is run to populate the
> Parameter, but it also seems to run the Dataset when I hit the View Report
> button.
> I don't have the Dataset tied to anything except the Report Parameter.
> Is there a way to stop the 2nd run?
> thank you
> t
It should only be running to populate the report parameter. It sounds
like you possibly have the autorefresh set for the report (go to the:
Report drop-down tab -> Report Properties... -> General tab ->
autorefresh and see if it is selected). Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thank you for responding Enrique ... unfortunately that box is not checked.
Any other ideas?
thank you
t
"EMartinez" wrote:
> On May 22, 11:59 am, DigHazuse <DigHaz...@.discussions.microsoft.com>
> wrote:
> > Hi,
> > I have a DDL Report Parameter tied to a Dataset.
> >
> > When I go to view the Report in RS the Dataset is run to populate the
> > Parameter, but it also seems to run the Dataset when I hit the View Report
> > button.
> >
> > I don't have the Dataset tied to anything except the Report Parameter.
> >
> > Is there a way to stop the 2nd run?
> >
> > thank you
> > t
>
> It should only be running to populate the report parameter. It sounds
> like you possibly have the autorefresh set for the report (go to the:
> Report drop-down tab -> Report Properties... -> General tab ->
> autorefresh and see if it is selected). Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>sql

Tuesday, February 21, 2012

Report from ASP.NET datagrid

I'd like to populate a datagrid in my asp.net project and run a report
from the grid. Does anyone have any suggestions on how to do this?
Thanks in advance.You could go the link route and use URL access to access the report or you
could create a viewer page with the report viewer on it and pass the
necessary parameters to it on the query string. How extensible do you need
it to be? Will usability be affected if another page is displayed? What
are security requirements?
"gallan" <gregallan@.tvl.com> wrote in message
news:1147822435.406853.303450@.j55g2000cwa.googlegroups.com...
> I'd like to populate a datagrid in my asp.net project and run a report
> from the grid. Does anyone have any suggestions on how to do this?
> Thanks in advance.
>