Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2008

Tip: Looking for answers? Try searching our database.

Dynamic Report on Dynamic recordset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lorenzo_ - 17 Jul 2008 14:45 GMT
sorry,

maybe I didn't searched enough, but I can't find an answer for this
question ...
I'd like to build a dynamic report based on a dynamic record set.

How can I do it?

Just to make me understand, here you find an hypothetical origin of
data I'd like to output:

create procedure [dbo].[SP_Dynamic_report]
@param int =1
as
BEGIN

if @param=1
    select top 10 * from SYSOBJECTS
else
    select top 10 * from  syscolumns

end

then the user can chose between param 1 or 2 and get
in the same report different data ...

exec [SP_Dynamic_report] 1
exec [SP_Dynamic_report] 2

Is it possible?
Can you provide me an example? or a link?
Thank you very much for any help!

Lorenzo
Bruce L-C  [MVP] - 17 Jul 2008 15:00 GMT
It is easy to call a SP with different parameters. If you define your
dataset as going against a stored procedure RS automatically detects your
parameter, creates both a query parameter and a report parameter and links
them together.

You need to first make sure you understand and can use Stored Procedures.
Start with a simple one.

Next, make sure you understand and can use a Matrix report. Matrix is the
closest you get to a dynamic report. If a matrix report doesn't work you are
out of luck. You would have to create RDL (Report Definition Language) on
the fly which is extremely non-trivial.

Signature

Bruce Loehle-Conger
MVP SQL Server Reporting Services

> sorry,
>
[quoted text clipped - 30 lines]
>
> Lorenzo
Lorenzo_ - 17 Jul 2008 16:01 GMT
thank you for your prompt reply.
I don't have problem doing what you say until "Matrix report"
here I get lost ...

How do I use a Matrix report to show any kind of table?

My wish would be just to show a generic table inside RS,
The original idea was to give a web access to our DB to our internal
user ...

I'd like to create on the fly a report for a generic select top 10 *
from [any_table]
showing the correct column name for each field ...

My original wish was to show all this reports inside only one report

select name as report_title  , 'select top 10 * from ' + name as
report_sql
from SYSOBJECTS where xtype in ('U', 'V')

Can you provide me a link to an example showing "Matrix report" in
action
with any kind of record set?

Thank you again,

Lorenzo

On 17 Lug, 16:00, "Bruce L-C  [MVP]" <bruce_lcNOS...@hotmail.com>
wrote:
> It is easy to call a SP with different parameters. If you define your
> dataset as going against a stored procedure RS automatically detects your
[quoted text clipped - 49 lines]
>
> - Mostra testo citato
Bruce L-C  [MVP] - 17 Jul 2008 16:07 GMT
You cannot do what you want. RS is not designed to give you this sort of
functionality (i.e. build a report on the fly based on your stored
procedure.)

Signature

Bruce Loehle-Conger
MVP SQL Server Reporting Services

thank you for your prompt reply.
I don't have problem doing what you say until "Matrix report"
here I get lost ...

How do I use a Matrix report to show any kind of table?

My wish would be just to show a generic table inside RS,
The original idea was to give a web access to our DB to our internal
user ...

I'd like to create on the fly a report for a generic select top 10 *
from [any_table]
showing the correct column name for each field ...

My original wish was to show all this reports inside only one report

select name as report_title  , 'select top 10 * from ' + name as
report_sql
from SYSOBJECTS where xtype in ('U', 'V')

Can you provide me a link to an example showing "Matrix report" in
action
with any kind of record set?

Thank you again,

Lorenzo

On 17 Lug, 16:00, "Bruce L-C  [MVP]" <bruce_lcNOS...@hotmail.com>
wrote:
> It is easy to call a SP with different parameters. If you define your
> dataset as going against a stored procedure RS automatically detects your
[quoted text clipped - 54 lines]
>
> - Mostra testo citato
Setu Trivedi - 18 Jul 2008 07:06 GMT
Lorenzo,

I am not an expert, but I think what you are trying to do may be
accomplished by Ad-hoc reports.  Why can't you let the users create their
own reports using Report Designer?

Cheers,

thank you for your prompt reply.
I don't have problem doing what you say until "Matrix report"
here I get lost ...

How do I use a Matrix report to show any kind of table?

My wish would be just to show a generic table inside RS,
The original idea was to give a web access to our DB to our internal
user ...

I'd like to create on the fly a report for a generic select top 10 *
from [any_table]
showing the correct column name for each field ...

My original wish was to show all this reports inside only one report

select name as report_title  , 'select top 10 * from ' + name as
report_sql
from SYSOBJECTS where xtype in ('U', 'V')

Can you provide me a link to an example showing "Matrix report" in
action
with any kind of record set?

Thank you again,

Lorenzo

On 17 Lug, 16:00, "Bruce L-C  [MVP]" <bruce_lcNOS...@hotmail.com>
wrote:
> It is easy to call a SP with different parameters. If you define your
> dataset as going against a stored procedure RS automatically detects your
[quoted text clipped - 54 lines]
>
> - Mostra testo citato
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.