Showing posts with label height. Show all posts
Showing posts with label height. Show all posts

Sunday, March 11, 2012

Dynamically define the height of a chart

Current Situation:
I have a "Stacked Bar" chart and it has a certain ammount of lines depending on its data source. Sometimes if there are too many lines, only every other label shows up for that line on the left hand side (See image).

What I need:
Basically I need a solution that fixes my current situation. My first thouts were to dynamically size the height of the chart, but I haven't had much luck doing that. Also, I have tried to find properties for the char item that might let it grow.

If anyone has any suggestions, or know where I can get more information on this, I would appreciate it very much. Thanks in advance.

It looks like you have just a list of items to show in the chart.

Here is one approach:
* Add a list to the report, put the chart inside the list
* Add a (detail) group to the list with the following grouping expression:
=Int((RowNumber(Nothing)-1)/15)
This should result in the desired grouping of 15 items per (repeating) list instance.

Another approach is to define multiple charts of different sizes and use the Visibility.Hidden property on the chart to dynamically hide all charts but one. Note: you can use =CountRows("DatasetName") to determine the number of rows in a particular dataset and hide one chart e.g. if the total number of dataset rows is greater than 20: Visibility.Hidden property setting: =CountRows("DatasetName") > 20

-- Robert

|||Thanks for the reply. This seems like a good solution, however other problems were present that I didn't notice before. If you look at the x-axis of my graph it too does not display the labels correctly. My boss would like me to now explore using image creation on the fly to possibly fix this problem. Do you think that using a list would fix my problem with the x-axis?|||

You didn't explain why you think the x-axis labels are displayed incorrectly - but if the problem is that lots of data is shown in one chart and the x-axis looks crowded, splitting the underlying dataset into multiple charts will help.

-- Robert

Friday, February 24, 2012

Dynamic Textbox height?

Hi,

I often have a 'label' text box next to a 'data' textbox. If the data textbox expands how can I get the label to match it in height?. I tried to set the height of one to the height of the other but got errors.

Thanks,

Best way would be to use a table, the row the label and the textbox are in would be sized at the same size then.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||

Dear,

U can do it by using functioin.Your testbox and label size will be same.

U can try this

="hello" & space(len(Parameters!SaleOrderNo.Value)) & "."

In passed these parameter with in a lable(textbox).

Parameters!SaleOrderNo.Value in a textbox.

Hope this helps u.

from

sufian

|||

Thanks Jens,

But at present this needs to stay free form.

|||

Thanks Sufian,

But I'm not following what you are saying. I believe you are saying to create a report parameter and then use this code:

space(len(Parameters!SaleOrderNo.Value)) & "."

I did this (using my own values of course) but am not able to make it work. Please explain what I'm not understanding.

Thanks,

Fairfield

|||

Dear,

suppose u have a lable and a textbox.

In textbox u have a value(!Fieldname.value)

In the label function box write the code like this

="hello" & space(len(!fieldname.value)) & "."

So it will read the (!fieldname)length and add that length to ur lable with space function.I used a dot "." at last in the function because there should be something to hold the space.

U can customise the code according to ur need.

HTH

from

sufian.

|||

Thanks again, Sufian.

However for some reason this technique doesn't expand the textbox either horizontally or vertically. Even when I force it using Space(250) and the "." it still doesn't expand the textbox. Any ideas?

Thanks.

|||

Dear failfield,

I read ur question. In that u had written that when the size of the testbox is increased the lable size should be increaed automatically.

U had not written anything like that u need to increase the size of the textbox.

BTW there should be a object to hold another object detail.

for example

if u need to increase the size of the lable in refence to height u need to hold the height of the textbox in ur lable.

suppose u have a textbox1. and u have a text lets say "Hello world"

and a lable lable1 with text hello.

Now u need that lable should be of the same size as the text.(in refrence to height only)

then in the function box write the same code i had written.

="hello" & space(len("helloworld")) & "." .

U can also use a field in place ot "helloword".

All this code is written in lable function window.

Hope this helps u.

from

sufian