michaelloveusa

Hi everyone.

I am struggling with an issue where I setup a report parameter and am using it successfully as part of my where clause on a dataset (below):

select * from tblDeferredGain where DeferredGain_ID = @DeferredGain_ID

One of the columns returned from this query against tblDeferredGain here is the Relinquished CS_ID

*** This is working fine**

What I want to do is to setup another dataset based on the result of the above query as follows:

select * from tblClosingStmt where ClosingStmt_ID = @RelinquishedCS_ID

I am able to do this manually via combobox, but I want to do it dynamically as the user really should be shielded from these ids.

Any ideas on how to address this issue would be greatly appreciated.

Thanks, Mike



Re: Visual Studio Report Controls Report Parameters and Datasets

William Vaughn

The rowsets (usually in the form of a DataTable) are generated entirely by your code in LocalReport mode. Are you using Local or server-side reports

In the case of a local report, you can execute the primary query based on input parameters and execute another query based on the result or simply execute a query that returns both rowsets (one after another). The Fill method automatically creates multiple tables from these queries.

This is described in detail in my book.

hth






Re: Visual Studio Report Controls Report Parameters and Datasets

michaelloveusa

Thanks William.

I am using server side reports and with that in mind, how do I "and execute another query based on the result "

Thanks, Mike





Re: Visual Studio Report Controls Report Parameters and Datasets

William Vaughn

Without seeing your data sources and queries in more detail and how you plan the UI in the report I don't think I can help much more. With a local report you have a lot more flexibility as to how the rowsets are created but there are issues there as well. Perhaps you're describing cascading parameters which are supported in all versions of RS. These are implemented by setting up the report parameters to draw on rowsets generated by another dataset. This dataset can have computed or derived columns to populate the pick lists as Peter Blackburn and I discuss in our book "Hitchhiker's Guide to SQL Server 2000 Reporting Services".






Re: Visual Studio Report Controls Report Parameters and Datasets

michaelloveusa

Thanks William. Boy, I asked that question a while ago! I think you hit it on the head... I wanted cascading parameters.

Mike





Re: Visual Studio Report Controls Report Parameters and Datasets

William Vaughn

Sorry about that. I abandoned the MSDN forums for quite awhile while they worked out some technical issues (that are still around). I might have to go back to using the newsgroups exclusively.