Showing posts with label width. Show all posts
Showing posts with label width. Show all posts

Wednesday, March 7, 2012

Column width workarounds

I have been looking over the forums looking for answers to the question that nails us all: how do you dynamically resize column widths? MS says: you don't. However, I have heard many people say they have found ways around it. I wonder if anyone might share those with me (and everyone else). Share the wisdom you have gained with those less experienced!
The work-arounds depend on your situation. If you can explain your situation you might get a better answer.

Column width

i am using reporting services 2000 & my backend is sql 2000.
In one of my reports, i have a parameter which needs to take value more than
1400 characters but in reporting services report view i can only give 1200
characters. Kindly let me know how do i resolve this issue.WOW! A parameter with 1400 characters? Where does that value come
from? Probably not from user input I'll bet.
Anyway, if the SSRS max is 1200, I doubt there's going to be a way to
expand that. Alternatively, you're going to have to look at
abbreviating the param value. Obvious I know, but without more info,
it's going to be hard to offer helpful suggestions. Post some more
details please and we can give it a shot.
toolman
Hasan Dalwai wrote:
> i am using reporting services 2000 & my backend is sql 2000.
> In one of my reports, i have a parameter which needs to take value more than
> 1400 characters but in reporting services report view i can only give 1200
> characters. Kindly let me know how do i resolve this issue.

Column Width

How can you widen or shorten a column's width when the report is run?
The width doesn't allow custom code or expressions.
Basically, based on a parameter I pass in, I want to widen or shrink a
column's width.Anyone?
"JSF" wrote:
> How can you widen or shorten a column's width when the report is run?
> The width doesn't allow custom code or expressions.
> Basically, based on a parameter I pass in, I want to widen or shrink a
> column's width.|||JSF,
It doesn't look like it's possible to dynamically change column width.
I just did another search through the group and found nothing new.

Column width

Hi Every1, I'm getting this error.
'Cannot specify a column width on data type smalldatetime.'
I'm using SQL Server & I've check the data type in the db & it's same as smalldatetime.
Any suggestions would be highly appreciated.
Thanks

<Error
Column or parameter #8: Cannot specify a column width on data type smalldatetime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Column or parameter #8: Cannot specify a column width on data type smalldatetime.

Source Error:

Line 344: Try
Line 345: myConnection.Open()
Line 346: dgdSearch.DataSource = myCommand.ExecuteReader()
Line 347: dgdSearch.DataBind()
Line 348: Finally

Source File: c:\inetpub\wwwroot\Demo Equip Log\Search Equipment.aspx.vb Line: 346

Stack Trace:

[SqlException: Column or parameter #8: Cannot specify a column width on data type smalldatetime.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader() +41
Demo_Equip_Log.Search_Equipment.BindGrid() in c:\inetpub\wwwroot\Demo Equip Log\Search Equipment.aspx.vb:346
Demo_Equip_Log.Search_Equipment.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Demo Equip Log\Search Equipment.aspx.vb:195
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750Show the code you are using to set up the parameter. I presume the message means EXACTLY what it says. Are you trying to set the length of the smalldatetime parameter? You cannot.|||Hi Doug, thanks for your response & Yep!. I've released that after I posted on the forum.
This is the first time I'm using Stored Procedure.
I've removed it & now I'm not getting that error.
However, I'm getting a different error ... I highly appreciate your suggestion.

Thanks

<Error>
Cannot compute Count for a data source that does not implement ICollection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Cannot compute Count for a data source that does not implement ICollection.

Source Error:

Line 345: myConnection.Open()
Line 346: dgdSearch.DataSource = myCommand.ExecuteReader()
Line 347: dgdSearch.DataBind()
Line 348: Finally
Line 349: myConnection.Close()

Source File: c:\inetpub\wwwroot\Demo Equip Log\Search Equipment.aspx.vb Line: 347

Stack Trace:

[HttpException (0x80004005): Cannot compute Count for a data source that does not implement ICollection.]
System.Web.UI.WebControls.PagedDataSource.get_DataSourceCount() +152
System.Web.UI.WebControls.PagedDataSource.get_Count() +187
System.Web.UI.WebControls.PagedDataSource.GetEnumerator() +268
System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) +712
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +49
System.Web.UI.WebControls.BaseDataList.DataBind() +23
Demo_Equip_Log.Search_Equipment.BindGrid() in c:\inetpub\wwwroot\Demo Equip Log\Search Equipment.aspx.vb:347
Demo_Equip_Log.Search_Equipment.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Demo Equip Log\Search Equipment.aspx.vb:195
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

Column Size

From what I understand there is not a function or script available to
determine the row size of a table containing variable width columns.
Specifically I have a text column and was trying to determine the size of
the data being inserted, for each specific row.
I see the DATALENGTH function but that is returning the length in bytes,
not the size in bytes.
What if I ran a query in DTS to export the data in the column to a text
file, say "select messagebody from ifsmessages where messageid = 433"?
Would the size of the text file indicate the size stored in the column?
Message posted via http://www.sqlmonster.com
Robert Richards via SQLMonster.com wrote:
> I see the DATALENGTH function but that is returning the length in
> bytes, not the size in bytes.
The length is the size, pretty much. You could use datalength to add up
all the lengths across all columns for a given row to estimate the row
size. There is some row byte overhead depending on how columns are
defined.
http://msdn.microsoft.com/library/de...es_02_92k3.asp
David Gugick
Imceda Software
www.imceda.com

Column Size

From what I understand there is not a function or script available to
determine the row size of a table containing variable width columns.
Specifically I have a text column and was trying to determine the size of
the data being inserted, for each specific row.
I see the DATALENGTH function but that is returning the length in bytes,
not the size in bytes.
What if I ran a query in DTS to export the data in the column to a text
file, say "select messagebody from ifsmessages where messageid = 433"?
Would the size of the text file indicate the size stored in the column?
Message posted via http://www.droptable.comRobert Richards via droptable.com wrote:
> I see the DATALENGTH function but that is returning the length in
> bytes, not the size in bytes.
The length is the size, pretty much. You could use datalength to add up
all the lengths across all columns for a given row to estimate the row
size. There is some row byte overhead depending on how columns are
defined.
http://msdn.microsoft.com/library/d...>
_02_92k3.asp
David Gugick
Imceda Software
www.imceda.com

Column Size

From what I understand there is not a function or script available to
determine the row size of a table containing variable width columns.
Specifically I have a text column and was trying to determine the size of
the data being inserted, for each specific row.
I see the DATALENGTH function but that is returning the length in bytes,
not the size in bytes.
What if I ran a query in DTS to export the data in the column to a text
file, say "select messagebody from ifsmessages where messageid = 433"?
Would the size of the text file indicate the size stored in the column?
--
Message posted via http://www.sqlmonster.comRobert Richards via SQLMonster.com wrote:
> I see the DATALENGTH function but that is returning the length in
> bytes, not the size in bytes.
The length is the size, pretty much. You could use datalength to add up
all the lengths across all columns for a given row to estimate the row
size. There is some row byte overhead depending on how columns are
defined.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_02_92k3.asp
David Gugick
Imceda Software
www.imceda.com