Showing posts with label columns. Show all posts
Showing posts with label columns. Show all posts

Tuesday, March 27, 2012

Data Extract - Partitioning

Hello,

I have a table containing 3 columns Department Name, RiskScenario and Cost. I am trying to create a data extract that contains the top 3 Risk Scenarios (sorted by Cost) per Department.

I tried using this sql statement in MSQuery but it doesn't work. Any ideas where I'm going wrong or if there is a simpler way to do this?

Select * from (
Select DepartmentName, `Risk Scenario`, Cost, row_number() OVER (PARTITION BY DepartmentName order by Cost) rn
FROM 'Departmental Risks`) where rn <=3

Please help. Just can't figure this out!

Meera

Meera:

Exactly what kind of error(s) are you experiencing? It appears to me that you have spurious "quotes" in your query.


Dave

|||

Meera:

I mocked the data with this table:

create table [Departmental Risks]
( DepartmentName varchar(30),
[Risk Scenario] varchar(30),
cost numeric (9,2)
)
go
insert into [Departmental Risks] values ('Dept A', 'Scene 1', 45.32)
insert into [Departmental Risks] values ('Dept A', 'Scene 2', 29.95)
insert into [Departmental Risks] values ('Dept A', 'Scene 3', 71.45)
insert into [Departmental Risks] values ('Dept A', 'Scene 4', 54.34)
insert into [Departmental Risks] values ('Dept B', 'Scene A', 21.45)

I then ran tried this query and obtained the result that follows:

select DepartmentName,
[Risk Scenario],
cost
from ( select DepartmentName,
row_number () over
( partition by DepartmentName
order by cost desc, [Risk Scenario]
) as Seq,
[Risk Scenario],
cost
from [Departmental Risks]
) a
where seq <= 3
order by DepartmentName,
cost desc,
[Risk Scenario]

-- -- Output: --

-- DepartmentName Risk Scenario cost
-- -
-- Dept A Scene 3 71.45
-- Dept A Scene 4 54.34
-- Dept A Scene 1 45.32
-- Dept B Scene A 21.45

See if this is in the direction you are aiming.


Dave

|||

Hi Dave,

I tried that in both MSQuery and MsAccess. In MS query the message i get say could not add the table '('. In Access I get a syntax error in query expresion 'row_number()...

Am at a loss!

Here is whatI used:

select [RA07 - Departmental Risks].DepartmentName,
[RA07 - Departmental Risks].[Risk Scenario],
[RA07 - Departmental Risks].annualriskcost
from ( select [RA07 - Departmental Risks].DepartmentName,
row_number () over
( partition by [RA07 - Departmental Risks].DepartmentName
order by [RA07 - Departmental Risks].annualriskcost desc, [RA07 - Departmental Risks].[Risk Scenario]
) as Seq,
[RA07 - Departmental Risks].[Risk Scenario],
[RA07 - Departmental Risks].annualriskcost
from [RA07 - Departmental Risks]
) a
where seq <= 3
order by [RA07 - Departmental Risks].DepartmentName,
[RA07 - Departmental Risks].annualriskcost desc,
[RA07 - Departmental Risks].[Risk Scenario];

|||

Is your target database an Access database or a SQL Server 2000 database? The errors you are getting indicates that the target database is not SQL Server 2005.


Dave

|||

Dave,

Its an Access Database

Wednesday, March 21, 2012

data dictionary tool

Is there any tool for data dictionary? Basically there are no
descriptions/comments to many of the columns (about 99%) in the database.
Datawarehouse team does not know exactly what those columns are, where its
used, how its used. No comments have been defined in the system tables. We
would like to have a tool where SME's/Bussiness analysts enter the
description for the columns in the production database. We have SQL Server
databases, many oracle dbs, few sybase databases, ACCESS. Sometimes we might
have to search for strings in the descriptions entered.
Answered in another NG. Please do not post the same message independently
to multiple newsgroups.
sql

data dictionary tool

Is there any tool for data dictionary? Basically there are no
descriptions/comments to many of the columns (about 99%) in the database.
Datawarehouse team does not know exactly what those columns are, where its
used, how its used. No comments have been defined in the system tables. We
would like to have a tool where SME's/Bussiness analysts enter the
description for the columns in the production database. We have SQL Server
databases, many oracle dbs, few sybase databases, ACCESS. Sometimes we might
have to search for strings in the descriptions entered.Answered in another NG. Please do not post the same message independently
to multiple newsgroups.

data dictionary tool

Is there any tool for data dictionary? Basically there are no
descriptions/comments to many of the columns (about 99%) in the database.
Datawarehouse team does not know exactly what those columns are, where its
used, how its used. No comments have been defined in the system tables. We
would like to have a tool where SME's/Bussiness analysts enter the
description for the columns in the production database. We have SQL Server
databases, many oracle dbs, few sybase databases, ACCESS. Sometimes we might
have to search for strings in the descriptions entered.Answered in another NG. Please do not post the same message independently
to multiple newsgroups.

Monday, March 19, 2012

data copy questions ...

I want to copy data from one sql server table to another sql server table.
In the original table almost all columns are of data type = 'varchar' , in
the destination table, I would like to convert columns into various data
types like 'nvarchar', 'numeric', date, etc.
When I try to issue the insert statement, it wouldn't allow me since values
in some columns is NULL and I get the error - "error converting null into
<...> format"
I tried to issue an insert for one column like -
insert dest_table (OrderNo) (select orderno from orig_table where orderno IS
NOT NULL)
I am able to insert values using this statement where the column is not null
.
I have over 50 such columns and with different data types. I am wondering if
there is any way by which I can issue a statement like
insert dest_table (select * from orig_table)
without having to check for NULL values for individual columns and
also without having to issue CONVERT(decimal, salesamt). It should pick up
the data type from the destination table.
If this is not the right group, please let me know so that I can post it on
the right one.
Thank you,
-MeMe -
Two ways:
1 - Redefine your target table columns to allow NULLs. Then you can do
Insert Into Select * from... if everything is defined to line up properly.
2 - In your select for each column that allows NULL use a COALESCE to
convert NULLs into some default value.
RLF
"Me" <Me@.discussions.microsoft.com> wrote in message
news:7FC22119-153E-44D9-967B-9BA57E584387@.microsoft.com...
>I want to copy data from one sql server table to another sql server table.
> In the original table almost all columns are of data type = 'varchar' , in
> the destination table, I would like to convert columns into various data
> types like 'nvarchar', 'numeric', date, etc.
> When I try to issue the insert statement, it wouldn't allow me since
> values
> in some columns is NULL and I get the error - "error converting null into
> <...> format"
> I tried to issue an insert for one column like -
> insert dest_table (OrderNo) (select orderno from orig_table where orderno
> IS
> NOT NULL)
> I am able to insert values using this statement where the column is not
> null.
> I have over 50 such columns and with different data types. I am wondering
> if
> there is any way by which I can issue a statement like
> insert dest_table (select * from orig_table)
> without having to check for NULL values for individual columns and
> also without having to issue CONVERT(decimal, salesamt). It should pick up
> the data type from the destination table.
> If this is not the right group, please let me know so that I can post it
> on
> the right one.
> Thank you,
> -Me
>|||Russell,
Thanks for your timely response. Your suggestion helped me trace out the
root of the problem.
It was due to bad data that I was unable to copy records over. For eg. in
one case, the date field had value of 189 so it couldn't convert into date.
I
fail to understand for another field the actual text in the field was more
than the allowed field length. It should have at least dispalyed the field
for which it was over the maximum length.
Anyways, I resolved it now and thanks for your and everyone else in
newsgroups for their help at all times.
-Me
"Russell Fields" wrote:

> Me -
> Two ways:
> 1 - Redefine your target table columns to allow NULLs. Then you can do
> Insert Into Select * from... if everything is defined to line up properly.
> 2 - In your select for each column that allows NULL use a COALESCE to
> convert NULLs into some default value.
> RLF
> "Me" <Me@.discussions.microsoft.com> wrote in message
> news:7FC22119-153E-44D9-967B-9BA57E584387@.microsoft.com...
>
>

data copy questions ...

I want to copy data from one sql server table to another sql server table.
In the original table almost all columns are of data type = 'varchar' , in
the destination table, I would like to convert columns into various data
types like 'nvarchar', 'numeric', date, etc.
When I try to issue the insert statement, it wouldn't allow me since values
in some columns is NULL and I get the error - "error converting null into
<...> format"
I tried to issue an insert for one column like -
insert dest_table (OrderNo) (select orderno from orig_table where orderno IS
NOT NULL)
I am able to insert values using this statement where the column is not null.
I have over 50 such columns and with different data types. I am wondering if
there is any way by which I can issue a statement like
insert dest_table (select * from orig_table)
without having to check for NULL values for individual columns and
also without having to issue CONVERT(decimal, salesamt). It should pick up
the data type from the destination table.
If this is not the right group, please let me know so that I can post it on
the right one.
Thank you,
-Me
Me -
Two ways:
1 - Redefine your target table columns to allow NULLs. Then you can do
Insert Into Select * from... if everything is defined to line up properly.
2 - In your select for each column that allows NULL use a COALESCE to
convert NULLs into some default value.
RLF
"Me" <Me@.discussions.microsoft.com> wrote in message
news:7FC22119-153E-44D9-967B-9BA57E584387@.microsoft.com...
>I want to copy data from one sql server table to another sql server table.
> In the original table almost all columns are of data type = 'varchar' , in
> the destination table, I would like to convert columns into various data
> types like 'nvarchar', 'numeric', date, etc.
> When I try to issue the insert statement, it wouldn't allow me since
> values
> in some columns is NULL and I get the error - "error converting null into
> <...> format"
> I tried to issue an insert for one column like -
> insert dest_table (OrderNo) (select orderno from orig_table where orderno
> IS
> NOT NULL)
> I am able to insert values using this statement where the column is not
> null.
> I have over 50 such columns and with different data types. I am wondering
> if
> there is any way by which I can issue a statement like
> insert dest_table (select * from orig_table)
> without having to check for NULL values for individual columns and
> also without having to issue CONVERT(decimal, salesamt). It should pick up
> the data type from the destination table.
> If this is not the right group, please let me know so that I can post it
> on
> the right one.
> Thank you,
> -Me
>
|||Russell,
Thanks for your timely response. Your suggestion helped me trace out the
root of the problem.
It was due to bad data that I was unable to copy records over. For eg. in
one case, the date field had value of 189 so it couldn't convert into date. I
fail to understand for another field the actual text in the field was more
than the allowed field length. It should have at least dispalyed the field
for which it was over the maximum length.
Anyways, I resolved it now and thanks for your and everyone else in
newsgroups for their help at all times.
-Me
"Russell Fields" wrote:

> Me -
> Two ways:
> 1 - Redefine your target table columns to allow NULLs. Then you can do
> Insert Into Select * from... if everything is defined to line up properly.
> 2 - In your select for each column that allows NULL use a COALESCE to
> convert NULLs into some default value.
> RLF
> "Me" <Me@.discussions.microsoft.com> wrote in message
> news:7FC22119-153E-44D9-967B-9BA57E584387@.microsoft.com...
>
>

data copy questions ...

I want to copy data from one sql server table to another sql server table.
In the original table almost all columns are of data type = 'varchar' , in
the destination table, I would like to convert columns into various data
types like 'nvarchar', 'numeric', date, etc.
When I try to issue the insert statement, it wouldn't allow me since values
in some columns is NULL and I get the error - "error converting null into
<...> format"
I tried to issue an insert for one column like -
insert dest_table (OrderNo) (select orderno from orig_table where orderno IS
NOT NULL)
I am able to insert values using this statement where the column is not null.
I have over 50 such columns and with different data types. I am wondering if
there is any way by which I can issue a statement like
insert dest_table (select * from orig_table)
without having to check for NULL values for individual columns and
also without having to issue CONVERT(decimal, salesamt). It should pick up
the data type from the destination table.
If this is not the right group, please let me know so that I can post it on
the right one.
Thank you,
-MeMe -
Two ways:
1 - Redefine your target table columns to allow NULLs. Then you can do
Insert Into Select * from... if everything is defined to line up properly.
2 - In your select for each column that allows NULL use a COALESCE to
convert NULLs into some default value.
RLF
"Me" <Me@.discussions.microsoft.com> wrote in message
news:7FC22119-153E-44D9-967B-9BA57E584387@.microsoft.com...
>I want to copy data from one sql server table to another sql server table.
> In the original table almost all columns are of data type = 'varchar' , in
> the destination table, I would like to convert columns into various data
> types like 'nvarchar', 'numeric', date, etc.
> When I try to issue the insert statement, it wouldn't allow me since
> values
> in some columns is NULL and I get the error - "error converting null into
> <...> format"
> I tried to issue an insert for one column like -
> insert dest_table (OrderNo) (select orderno from orig_table where orderno
> IS
> NOT NULL)
> I am able to insert values using this statement where the column is not
> null.
> I have over 50 such columns and with different data types. I am wondering
> if
> there is any way by which I can issue a statement like
> insert dest_table (select * from orig_table)
> without having to check for NULL values for individual columns and
> also without having to issue CONVERT(decimal, salesamt). It should pick up
> the data type from the destination table.
> If this is not the right group, please let me know so that I can post it
> on
> the right one.
> Thank you,
> -Me
>|||Russell,
Thanks for your timely response. Your suggestion helped me trace out the
root of the problem.
It was due to bad data that I was unable to copy records over. For eg. in
one case, the date field had value of 189 so it couldn't convert into date. I
fail to understand for another field the actual text in the field was more
than the allowed field length. It should have at least dispalyed the field
for which it was over the maximum length.
Anyways, I resolved it now and thanks for your and everyone else in
newsgroups for their help at all times.
-Me
"Russell Fields" wrote:
> Me -
> Two ways:
> 1 - Redefine your target table columns to allow NULLs. Then you can do
> Insert Into Select * from... if everything is defined to line up properly.
> 2 - In your select for each column that allows NULL use a COALESCE to
> convert NULLs into some default value.
> RLF
> "Me" <Me@.discussions.microsoft.com> wrote in message
> news:7FC22119-153E-44D9-967B-9BA57E584387@.microsoft.com...
> >I want to copy data from one sql server table to another sql server table.
> > In the original table almost all columns are of data type = 'varchar' , in
> > the destination table, I would like to convert columns into various data
> > types like 'nvarchar', 'numeric', date, etc.
> >
> > When I try to issue the insert statement, it wouldn't allow me since
> > values
> > in some columns is NULL and I get the error - "error converting null into
> > <...> format"
> >
> > I tried to issue an insert for one column like -
> >
> > insert dest_table (OrderNo) (select orderno from orig_table where orderno
> > IS
> > NOT NULL)
> >
> > I am able to insert values using this statement where the column is not
> > null.
> >
> > I have over 50 such columns and with different data types. I am wondering
> > if
> > there is any way by which I can issue a statement like
> >
> > insert dest_table (select * from orig_table)
> >
> > without having to check for NULL values for individual columns and
> > also without having to issue CONVERT(decimal, salesamt). It should pick up
> > the data type from the destination table.
> >
> > If this is not the right group, please let me know so that I can post it
> > on
> > the right one.
> >
> > Thank you,
> > -Me
> >
>
>

Thursday, March 8, 2012

Data comparison and update

Hello All,

I have two tables T1 and T2 with the same data structure. I need to compare T1 with T2 for all columns and update T2 for deleted, inserted and updated rows. How can I do this?

Are you duplicating the T1 data into T2? If so, why not simply delete all T2 rows and insert all T1 rows into T2 (or drop T2 and then recreate it from T1, including data)?|||

Hello,

Thanks you very much for the reply. T1 is big and is changing constantly and I am trying to find the discrepancy between T1 and T2 and update T2 based on the discrepancies. SO trying to realize synchronization on a single table. Any idea?

|||I haven't used Triggers in a long time, but it may be a good solution to your situation. Set up the Triggers for UPDATE, INSERT and DELETE operations and have it synchronize your T2 table accordingly. Once the Triggers are defined (and tested), you don't even have to worry about it. Be sure that performance isn't hit by doing this, though.|||

Sorry Jim, wish I could help you, but I'm currently bound by some confidentiality agreements that prohibit me from discussing this in much detail. But here are some choices:

Use a trigger to update t1 whenever t2 is updated (If you need them to be synchronized in realtime, including transaction consistancy). But since they are the same structure, there is usually little reason for implementing it this way.

Replication. You can use this to replicate data from server to server, and probably from table to table as well. There are so many options on how this can be done, it'll take you a while to research and test the possibilities.

Diff-gramming. Write queries to automatically insert, update, and delete those rows which differ from table1 to table2.

Data by Row for a chart?

Hi,
I have a dataset which displayes data in a row (no of documents in each month)
So, basically I get 12 columns and one row with value for each month.
I want to create a Bar Chart, but can i supply the data by row?
I have to add 12 data fields to the Bar chart currently and they all show up
in different colors because of that. Is there a way for me to drop the row as
a series (like in excel?)
Thanks,Hi,
Can anyone please let me know if this is possible?
Along with the (unanswered) questions posted before, i also wanted to know
if it is possible to have one series as a line chart and one series as a Bar
chart on the same graph? if yes, can someone PLEASE tell me how? THANKS
"Prashant" wrote:
> Hi,
> I have a dataset which displayes data in a row (no of documents in each month)
> So, basically I get 12 columns and one row with value for each month.
> I want to create a Bar Chart, but can i supply the data by row?
> I have to add 12 data fields to the Bar chart currently and they all show up
> in different colors because of that. Is there a way for me to drop the row as
> a series (like in excel?)
> Thanks,
>|||If you have RS 2000 SP1 or SP2 installed, you could set the color to the
same identical value for all values (under appearance - series styles).
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Prashant" <Prashant@.discussions.microsoft.com> wrote in message
news:1712D9E5-284D-40CF-8E17-B5BBE3476A5C@.microsoft.com...
> Hi,
> I have a dataset which displayes data in a row (no of documents in each
> month)
> So, basically I get 12 columns and one row with value for each month.
> I want to create a Bar Chart, but can i supply the data by row?
> I have to add 12 data fields to the Bar chart currently and they all show
> up
> in different colors because of that. Is there a way for me to drop the row
> as
> a series (like in excel?)
> Thanks,
>|||Yes, you can do that. Create your column chart. Then go to the chart
properties dialog. In the dialog go to the Data tab and edit the properties
of your trend data series. The "Edit chart value" dialog should pop up. In
this dialog go to the Appearance tab and select "Plot data as line".
You can also check this KB article: http://support.microsoft.com/kb/842422
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Prash" <Prash@.discussions.microsoft.com> wrote in message
news:C9D588CF-E695-4E62-9E49-4E4F9FEC0EAD@.microsoft.com...
> Hi,
> Can anyone please let me know if this is possible?
> Along with the (unanswered) questions posted before, i also wanted to know
> if it is possible to have one series as a line chart and one series as a
> Bar
> chart on the same graph? if yes, can someone PLEASE tell me how? THANKS
>
> "Prashant" wrote:
>> Hi,
>> I have a dataset which displayes data in a row (no of documents in each
>> month)
>> So, basically I get 12 columns and one row with value for each month.
>> I want to create a Bar Chart, but can i supply the data by row?
>> I have to add 12 data fields to the Bar chart currently and they all show
>> up
>> in different colors because of that. Is there a way for me to drop the
>> row as
>> a series (like in excel?)
>> Thanks,

Saturday, February 25, 2012

data access to large tables in sql 2005

hi all,

i have a large table in sql server 2005 (it has about 6 columns and 10 million records).

i need to work in a linear way on all the records (i know it sounds dumb but i need to work on all records).

now, obviously when trying to work on this table sql server get stuck for timeout or something like that...

i've noticed that a simple function like "select top 100 * from ExportTable" still works.

is there any way to have sql send me the data when it access it so that i'll still be able to proccess it on the same time, i basically work using dataset so that fixing the timeout wont be helpfull since windows probably wont allow me to load this amount of data into memory.

can any1 help?

Z

this is not so huge table as far as SQL Server is concerned.... I think the problem is with the Indexing of the table.. post the structure and indexes on the table ...

Madhu

Friday, February 17, 2012

CVS - Columns not exporting when Visibility>Hidden has a parameter in it

Hi there,
I am using SQL 2005, with Reporting Services 2005 and Visual Studio
2005 Team Suite.
I have a report which uses 52 parameters to determine which columns are
shown.
Each of the columns have a value in the visibilty>hidden field of
something like '=IIF(Parameters!showname.Value,False,True)' where
showname is a boolean parameter.
It displays perfectly in html & pdf - if the parameter is false, the
column is hidden, if the parameter is true, the column is hidden.
When i try to export to csv, it doesn't show the column at all. Even
if the expression is changed to '=IIF(1=1,False,True)' - the only way I
can get the column to show in the csv output is by setting the hidden
value to 'False' which means that its shown regardless of the
parameter.
Any ideas?I got a reply from a MS contact on msdn. Here is his reply for anyone
else with the same problem...
John,
You can't conditionally hide and show data in data renderers (CSV,
XML). This is by design. If you have an expression in the Hidden field
and 'Auto' in DataOutput tab for text boxes in the column, your data
will not be rendered into CSV or XML.
You can set DataElementOutput to Output for textboxes in the cells and
in the header, and the coulmn will always be in the output file.
Thanks!
----
- DenisL (SQL RS Team)
johnburns007@.gmail.com wrote:
> Hi there,
> I am using SQL 2005, with Reporting Services 2005 and Visual Studio
> 2005 Team Suite.
> I have a report which uses 52 parameters to determine which columns are
> shown.
> Each of the columns have a value in the visibilty>hidden field of
> something like '=IIF(Parameters!showname.Value,False,True)' where
> showname is a boolean parameter.
> It displays perfectly in html & pdf - if the parameter is false, the
> column is hidden, if the parameter is true, the column is hidden.
> When i try to export to csv, it doesn't show the column at all. Even
> if the expression is changed to '=IIF(1=1,False,True)' - the only way I
> can get the column to show in the csv output is by setting the hidden
> value to 'False' which means that its shown regardless of the
> parameter.
> Any ideas?

Tuesday, February 14, 2012

Customizing the Job Activity Monitor

Hey, all!
There is a lot of useful info in the various windows within SSMS. However, I
don't personally want to see all the columns and/or data in, say, the Job
Activity Monitor. Is there any way to customize the view by removing columns?
And, is there any way to get my column order and filters to "stick" once I close
SSMS? Thanks for your help.You can't really customize it, no. But the information it uses comes from
very simple queries against catalog views and DMVs in msdb (you can just set
up profiler to trace when you launch the activity monitor, and it will show
you the queries). You could probably build your own little win form GUI
pretty easily, with the functionality you want, using VB.Net or C#.
On 4/30/08 9:52 AM, in article ON9vwlsqIHA.672@.TK2MSFTNGP02.phx.gbl,
"Darrell61" <Darrell.Wright.nospam@.okc.gov> wrote:
> Hey, all!
> There is a lot of useful info in the various windows within SSMS. However, I
> don't personally want to see all the columns and/or data in, say, the Job
> Activity Monitor. Is there any way to customize the view by removing columns?
> And, is there any way to get my column order and filters to "stick" once I
> close
> SSMS? Thanks for your help.

Customizing report columns count at runtime

Hello all. In my application I have some rdl file that determines
general look of my report. Also I have a table that has 20 columns I
have stored proc that returns dataset that also has 20 columns but may
have filled less than 20 columns (5 for example). The problem is how
to hide another (20-n) columns.
Now I simply pass params to report and hide columns according to these
params.In this case I have normally rendered report on screen and I'm
experiencing problems with printing: I have my "n" columns printed
normally then long space and table end line ( in another printed
page ) what looks ugly.
So my question is: can I dynamically manage columns count ( without
having to generate rdl programatically :) ), for example pass report
param "ColumnsCount" and then have so much columns as I want (also
apply binding values for these columns)
or
is there a method how to hide my (20-n) columns and minimize table so
I do not have that big white space and ugly line after it.
Any ideas?
Thanks in advanceOn Apr 30, 4:15 am, mblishch <mykhaylo.blis...@.gmail.com> wrote:
> Hello all. In my application I have some rdl file that determines
> general look of my report. Also I have a table that has 20 columns I
> have stored proc that returns dataset that also has 20 columns but may
> have filled less than 20 columns (5 for example). The problem is how
> to hide another (20-n) columns.
> Now I simply pass params to report and hide columns according to these
> params.In this case I have normally rendered report on screen and I'm
> experiencing problems with printing: I have my "n" columns printed
> normally then long space and table end line ( in another printed
> page ) what looks ugly.
> So my question is: can I dynamically manage columns count ( without
> having to generate rdl programatically :) ), for example pass report
> param "ColumnsCount" and then have so much columns as I want (also
> apply binding values for these columns)
> or
> is there a method how to hide my (20-n) columns and minimize table so
> I do not have that big white space and ugly line after it.
> Any ideas?
> Thanks in advance
You should be able to toggle visibility of the columns in the report
via an expression. Right-clicking the column in the table control and
selecting properties and select the tab for visibility and then enter
an expression that checks for the sum of the column's value. Something
like this should work:
=iif(Sum(Fields!ColumnItemX.Value) > 0, "true", "false")
Also, you might want to make sure that for individual cells, the
shrink to fit (or similar wording) is selected and that you
conditionally set border styles based on if the column is visible
(via, Properties -> Border Style: =iif(Sum(Fields!ColumnItemX.Value) >
0, "Solid", "None"))
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant