Wednesday, March 7, 2012

Problem creating report with Table having dynamic columns.

The requierment is tyo have a dynamic report, that has a table with number of
columns decided on the input from recordset.
The SQL procedure takes in parameters and returns recordset, that can have
varying number of columns. All we want to do is to link this recordset to a
table on the report.
The report table should show the columns as they are in the Recordset. ( and
the column name in the recordset shall appear as the column header in the
Reporting table.)
-- Alok Kumar GuptaWhat you could do in this case is make the SP return a
fixed number of records all the time and return zero
values for the column not required.
Then map all the fields to columns in a table and set
visibility expression for columns to the appropriate
condition.
>--Original Message--
>The requierment is tyo have a dynamic report, that has a
table with number of
>columns decided on the input from recordset.
>The SQL procedure takes in parameters and returns
recordset, that can have
>varying number of columns. All we want to do is to link
this recordset to a
>table on the report.
>The report table should show the columns as they are in
the Recordset. ( and
>the column name in the recordset shall appear as the
column header in the
>Reporting table.)
>-- Alok Kumar Gupta
>.
>|||I have the same issue but my columns are being generated dynamically by user
data and I have no way of knowing how many there will be nor the names.
"Alok" wrote:
> I thought of that, but that seems to be a very crude way of achieving it.
> Doesn't the reporting service supports something like a grid to simply
> display what you get from the recordset.
> Another problem I found in the approach is about the column headers in the
> table.
> I could not write an expression for the column headers in the Table that
> could read the column titles in my recordset.
> thanks for your response.
> Alok
>
> "anonymous@.discussions.microsoft.com" wrote:
> > What you could do in this case is make the SP return a
> > fixed number of records all the time and return zero
> > values for the column not required.
> > Then map all the fields to columns in a table and set
> > visibility expression for columns to the appropriate
> > condition.
> > >--Original Message--
> > >The requierment is tyo have a dynamic report, that has a
> > table with number of
> > >columns decided on the input from recordset.
> > >
> > >The SQL procedure takes in parameters and returns
> > recordset, that can have
> > >varying number of columns. All we want to do is to link
> > this recordset to a
> > >table on the report.
> > >
> > >The report table should show the columns as they are in
> > the Recordset. ( and
> > >the column name in the recordset shall appear as the
> > column header in the
> > >Reporting table.)
> > >
> > >-- Alok Kumar Gupta
> > >.
> > >
> >

No comments:

Post a Comment