Showing posts with label cell. Show all posts
Showing posts with label cell. Show all posts

Friday, February 24, 2012

Excel vbcrlf

Hi, in my matrix, i have a cell like: "text1"+ vbcrlf + "text2".
On the matrix, it show correctly, text2 is under text1 because vbcrlf is a
carriage return.
But when i export my matrix to excel, i Have a line between text1 and text2.
it seem that exporting to excel does two vbcrlf and it should do one. I have
rs sp2 and it is not better for this.
Also, how to say to excel to format number to number and not to text.
thanksI ran into this today and ended up using "text1" & Chr(10) & "text2". It
works fine when exporting to Excel.
"Francis" wrote:
> Hi, in my matrix, i have a cell like: "text1"+ vbcrlf + "text2".
> On the matrix, it show correctly, text2 is under text1 because vbcrlf is a
> carriage return.
> But when i export my matrix to excel, i Have a line between text1 and text2.
> it seem that exporting to excel does two vbcrlf and it should do one. I have
> rs sp2 and it is not better for this.
> Also, how to say to excel to format number to number and not to text.
> thanks
>
>|||SStoyko,
Sorry to talk you. Yes. Now you can export to EXCEL file normal.
But :-) when you view the report thru IE, this two lines now is together.
(Under development view, it is O.K. but when user browse it then it is not
look like what it shall be :-)
I had tried Chr(10)/Chr(10) + Chr(13)/vbNewLine/...
I just can not find a solution both work for IE browser and EXCEL :-)
"SStoyko" wrote:
>
> I ran into this today and ended up using "text1" & Chr(10) & "text2". It
> works fine when exporting to Excel.
>
>
> "Francis" wrote:
> > Hi, in my matrix, i have a cell like: "text1"+ vbcrlf + "text2".
> > On the matrix, it show correctly, text2 is under text1 because vbcrlf is a
> > carriage return.
> > But when i export my matrix to excel, i Have a line between text1 and text2.
> > it seem that exporting to excel does two vbcrlf and it should do one. I have
> > rs sp2 and it is not better for this.
> >
> > Also, how to say to excel to format number to number and not to text.
> > thanks
> >
> >
> >

Sunday, February 19, 2012

Excel report - stop text from wrapping

How do I stop text from wrapping within a cell?
or
How do I make a cell automatically grow horizontally and not vertically?On Mar 14, 5:43 am, JRMalherbe <JRMalhe...@.discussions.microsoft.com>
wrote:
> How do I stop text from wrapping within a cell?
> or
> How do I make a cell automatically grow horizontally and not vertically?
As far as I can tell, this functionality (automatic horizontal growth)
does not exist in Reporting Services. To not allow cell/text wrapping,
you would remove the selection of 'Can increase to accommodate
contents' on the Format tab of the Textbox Properties (below Textbox
height). Sorry I could not be of greater assistance.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||That is correct.
The RDL CanGrow property only works in the vertical direction. Setting this
to false will disable this functionality.
"EMartinez" wrote:
> On Mar 14, 5:43 am, JRMalherbe <JRMalhe...@.discussions.microsoft.com>
> wrote:
> > How do I stop text from wrapping within a cell?
> > or
> > How do I make a cell automatically grow horizontally and not vertically?
> As far as I can tell, this functionality (automatic horizontal growth)
> does not exist in Reporting Services. To not allow cell/text wrapping,
> you would remove the selection of 'Can increase to accommodate
> contents' on the Format tab of the Textbox Properties (below Textbox
> height). Sorry I could not be of greater assistance.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>|||My report uses a table to display the data in.
Even though all the cells is set to CanGrow=False the cells will expand
vertically and the text will wrap.
For me it seems that the CanGrow=False has no effect at all.
Is it just me or did I miss something somewhere?
"Bruce Johnson [MSFT]" wrote:
> That is correct.
> The RDL CanGrow property only works in the vertical direction. Setting this
> to false will disable this functionality.
>
>
> "EMartinez" wrote:
> > On Mar 14, 5:43 am, JRMalherbe <JRMalhe...@.discussions.microsoft.com>
> > wrote:
> > > How do I stop text from wrapping within a cell?
> > > or
> > > How do I make a cell automatically grow horizontally and not vertically?
> >
> > As far as I can tell, this functionality (automatic horizontal growth)
> > does not exist in Reporting Services. To not allow cell/text wrapping,
> > you would remove the selection of 'Can increase to accommodate
> > contents' on the Format tab of the Textbox Properties (below Textbox
> > height). Sorry I could not be of greater assistance.
> >
> > Regards,
> >
> > Enrique Martinez
> > Sr. SQL Server Developer
> >
> >

Friday, February 17, 2012

Excel Rendering Problem

When I render in Excel, the Excel cells do not grow to accomodate the cell
contents so data is hiding up, e.g. ABCD is not wrapping up as
AB
CD
but showing up as
AB
if the column width is small.
Anybody has seen this happen?
How to overcome this?
Thanks
SanjaySanjay,
I have experienced the same problem, but I cannot find any way for RS to
'instruct' excel to expand cells where required. Therefore this has to be
dealt with within the Excel app.
You will likely know the next part, but for those that do not: If you select
the whole worksheet, right click and turn on Word Wrapping, the rows will
expand virtically to display all the data. If you want the rows to remain the
same height, turn off WW and they will return to their original sizes. To
expand all columns, select whole worksheet, move the mousr along the top
column header bar until a double horizontal arrow appera, and double-click.
The columns will expand to their custom widths, dependant on what data is
contained in the column.
If you wish to automate this, and place in a macro, the following code will
assist you:
Cells.Select
Cells.EntireColumn.AutoFit
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = True 'False to turn off
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
"Sanjay" wrote:
> When I render in Excel, the Excel cells do not grow to accomodate the cell
> contents so data is hiding up, e.g. ABCD is not wrapping up as
> AB
> CD
> but showing up as
> AB
> if the column width is small.
> Anybody has seen this happen?
> How to overcome this?
> Thanks
> Sanjay|||Thanks, Logicalman. Your post has been really useful. Can I cause a macro to
be included in a report server generated Excel spreadsheet?
I have several reports and this happens with only one of those reports. The
one report it happens with is modified from one of the reports with which
this doesn't happen. Something has changed in this rdl which is causing this
behavior. I was wondering if somebody knew what that change could be.
Thanks
Sanjay
"Logicalman" wrote:
> Sanjay,
> I have experienced the same problem, but I cannot find any way for RS to
> 'instruct' excel to expand cells where required. Therefore this has to be
> dealt with within the Excel app.
> You will likely know the next part, but for those that do not: If you select
> the whole worksheet, right click and turn on Word Wrapping, the rows will
> expand virtically to display all the data. If you want the rows to remain the
> same height, turn off WW and they will return to their original sizes. To
> expand all columns, select whole worksheet, move the mousr along the top
> column header bar until a double horizontal arrow appera, and double-click.
> The columns will expand to their custom widths, dependant on what data is
> contained in the column.
> If you wish to automate this, and place in a macro, the following code will
> assist you:
> Cells.Select
> Cells.EntireColumn.AutoFit
> With Selection
> .HorizontalAlignment = xlLeft
> .VerticalAlignment = xlBottom
> .WrapText = True 'False to turn off
> .Orientation = 0
> .AddIndent = False
> .IndentLevel = 0
> .ShrinkToFit = False
> .ReadingOrder = xlContext
> .MergeCells = False
> End With
>
> "Sanjay" wrote:
> > When I render in Excel, the Excel cells do not grow to accomodate the cell
> > contents so data is hiding up, e.g. ABCD is not wrapping up as
> > AB
> > CD
> >
> > but showing up as
> > AB
> >
> > if the column width is small.
> >
> > Anybody has seen this happen?
> > How to overcome this?
> >
> > Thanks
> > Sanjay|||Sanjay,
I apologise but that's the part I am still working on, the 'instruct' part.
I am certain it included in the URL used to create the Excel-formatted output.
One thing you say that may hold a key though is in the second para of your
reply '...one report it happens with is modified from one of the reports with
which this doesn't happen...', this leads me to belive that it is in the URL
of the export. I have taken the exporting to a level of simply placing a
button on a standard (or curently used) ASP page, and simply attaching the
URL to the Onclick event of the button.
You may take a look at the export part of the report you generate, this may
then hold the key to what is actually different between the two reports.
For myself, I would be more than interested in the results you get, as this
is just another step in my temas usage of RS to deliver ad-hoc reporting for
our current Intranet sites delivering mertics.
Please keep me informed of any progress there, and I will continue trying to
find the same answer also. I can be contacted via my email address, just
remove ALL the numbers from it first.
Thanks,
Tony
"Sanjay" wrote:
> Thanks, Logicalman. Your post has been really useful. Can I cause a macro to
> be included in a report server generated Excel spreadsheet?
> I have several reports and this happens with only one of those reports. The
> one report it happens with is modified from one of the reports with which
> this doesn't happen. Something has changed in this rdl which is causing this
> behavior. I was wondering if somebody knew what that change could be.
> Thanks
> Sanjay
> "Logicalman" wrote:
> > Sanjay,
> >
> > I have experienced the same problem, but I cannot find any way for RS to
> > 'instruct' excel to expand cells where required. Therefore this has to be
> > dealt with within the Excel app.
> > You will likely know the next part, but for those that do not: If you select
> > the whole worksheet, right click and turn on Word Wrapping, the rows will
> > expand virtically to display all the data. If you want the rows to remain the
> > same height, turn off WW and they will return to their original sizes. To
> > expand all columns, select whole worksheet, move the mousr along the top
> > column header bar until a double horizontal arrow appera, and double-click.
> > The columns will expand to their custom widths, dependant on what data is
> > contained in the column.
> >
> > If you wish to automate this, and place in a macro, the following code will
> > assist you:
> >
> > Cells.Select
> > Cells.EntireColumn.AutoFit
> > With Selection
> > .HorizontalAlignment = xlLeft
> > .VerticalAlignment = xlBottom
> > .WrapText = True 'False to turn off
> > .Orientation = 0
> > .AddIndent = False
> > .IndentLevel = 0
> > .ShrinkToFit = False
> > .ReadingOrder = xlContext
> > .MergeCells = False
> > End With
> >
> >
> >
> > "Sanjay" wrote:
> >
> > > When I render in Excel, the Excel cells do not grow to accomodate the cell
> > > contents so data is hiding up, e.g. ABCD is not wrapping up as
> > > AB
> > > CD
> > >
> > > but showing up as
> > > AB
> > >
> > > if the column width is small.
> > >
> > > Anybody has seen this happen?
> > > How to overcome this?
> > >
> > > Thanks
> > > Sanjay