Trying to get pop up pictures for phone list in Excel - excel-2003

I have a simple phone list with columns in the form of Name, Address, Phone#, etc.
On the last column I'd like to have the equivalent of a comment rollover which would automatically pop up the persons photo (there are many who only come to this group occasionally, and this would be a help in recognizing them and remembering their names)
1) I have tried to change the comment box Shapes property, but of course there is no msoPicture shape type.
2) I tried to place the picture in the cell and make it clickable, and then to click it again to make it collapse. But identifying the source picture to change its scalewidth has stumped me.
Any thoughts?

Okay, I figured out an answer. Place the picture in a tiny format in the cell adjacent to the person's name, and assign the following macro to it. All of the pictures point to the same macro. clicking on thepicture toggles it large/small.
Sub Picture_Magnify_Click()
With ActiveSheet.Shapes(Application.Caller)
If .Height < 20 Then
.Height = .Height * 4
Else
.Height = .Height / 4
End If
End With
End Sub

Related

how to show YOY metric values as text in a tableau viz

please click here for the image
2 questions to the Tableau Sanseis:
The given percentages/numbers in the attachment (shown by parentheses), all belong to the YOY variance and are meant to be displayed in front of the orange (2021) bars
a) Both the numbers/percentages are not showing in one line and current display gives the impression to a user that %ages belong to the blue bars and number to the orange colored bars.
- How to show both in front of orange bars ?
b) Beats me as to why some of the category bars (highlighted with red arrows) don't display any value (no %ages or numbers)
Thanks in advance
Probably "between" your two measure there's some CR, so you see one up and the other down, causing to display just some values and not all.
Something like this:
Go into the Text Mark of your worksheet, and try to dispay your values in just one line with no CR, and you should get something like this:
Sometimes, due to font size and cardinality of your data, some label could be missing just because Tableau tries to optimize the rendering, but you can also check the last option of the Label Mark selecting "Allow Labels to overlap other marks".

(Auto Fit All Columns) of ListGrid's Context Menu stretches the Row number in SmartGWT

I'm not sure whether this should be the expected behaviour or is a bug.
When the Row Number column is set to be shown, selection of (Auto Fit All Columns) from context menu stretches the column
to the end of the ListGrid.
I though there is an issue in our app but the ShowCase has (Grids > Appearance > Row Numbering)
the same problem.
final ListGrid countryGrid = new ListGrid();
countryGrid.setWidth(500);
countryGrid.setHeight(224);
countryGrid.setShowAllRecords(true);
countryGrid.setShowRowNumbers(true);
If you change the width of a column before applying the Auto fit it behaves normally.
Has someone had the same issue ever?
Is there any workaround?
Without looking further at your code (for instance, other width and autofit related configurations applied to the list grid, field types and expected contents) it's difficult to know if this is expected behavior. Although I agree, by looking at the demo, that it is at least strange behavior.
But this is what I do in my ListGrids to keep the row numbers at the size I want:
// this field is created only as a way to define the row number field properties
ListGridField rowNumberFieldProps = new ListGridField();
rowNumberFieldProps.setWidth(50);
rowNumberFieldProps.setCanAutoFitWidth(true);
rowNumberFieldProps.setAutoFitWidthApproach(AutoFitWidthApproach.VALUE);
grid.setRowNumberFieldProperties(rowNumberFieldProps);
grid.setShowRowNumbers(true);
Some notes:
Since I expect a lot of records to be displayed (and in consequence, large row numbers), I use a row number column width that fits properly my numbers (50 in my case).
Notice that setCanAutoFitWidth(false) will leave your row number field fixed in size, even when 'Auto Fit All Columns' is used. This is probably a good approach in your case. If you do that, you can simply remove the line with setAutoFitWidthApproach.
setCanAutoFitWidth(true) and setAutoFitWidthApproach help me control what happens when I use the 'Auto Fit All Columns' context menu. In my case I do want autofitting to apply to extend the column width when I have row numbers beyond 99.999 (not the most common case for me, but possible).

Word Openxml: how to get a text box the right size?

I'm using PHP to generate docx documents from a database. The generated document contains column charts which have labels attached (i.e. user shapes containing textboxes). In an attempt to get the textboxes to accommodate and display all of the text (i.e. it shouldn't be necessary for the user to resize a textbox to see all the text) my code calculates how many characters will fit into 3cm, adds linefeeds to the string as required and tells me how many lines of text are needed. I have:
<a:xfrm xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:off x="1638276" y="1676399"/>
<a:ext cx="1257325" cy="'.(252000 * $labelLeftLines).'"/>
</a:xfrm>
which I believe should give me a text box around 3.5cm wide (extra .5 for the internal padding) and a height of .7cm multiplied by whatever is the value of $labelLeftLines. However, the text box always turns up as 3.cm wide by .86cm high, which only ever displays one line of text.
If I add in 'autofit':
<a:bodyPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" vertOverflow="clip" wrap="square" rtlCol="0">
<a:spAutoFit/>
</a:bodyPr>
the generated file looks just the same, though, when I right click on the textbox to inspect the properties, 'autofit' is indeed applied. I have to uncheck it and recheck it to make it affect the textbox.
Any openXML gurus out there?
Hmm, some random floundering around revealed that the values I need to manipulate are here:
<cdr:relSizeAnchor xmlns:cdr="http://schemas.openxmlformats.org/drawingml/2006/chartDrawing">
<cdr:from>
<cdr:x>0.47</cdr:x>
<cdr:y>0.75</cdr:y>
</cdr:from>
<cdr:to>
<cdr:x>0.67</cdr:x>
<cdr:y>1</cdr:y>
</cdr:to>
Changing those values does actually change the size of the texbox, though I haven't a clue what units are being used. From 0.75 to 1 produces a height of 1.43cm.
One day I'll maybe be able to find my way around the doucmentation.

Boardgame-Map with crossroads etc

I have a little logical problem over here.
As the title says, I try to build a boardgame as a computer-program (maybe with internet-support, but thats another story)
As for now, I have a map, which has some crossroads in it, hence I cannot simply define the fields as '1, 2, 3, 4, ...' because if there is a crossroad at field 10, I would have more than one field which has to be labeled 11 (Because then there is a field left and right of field 10, for example.)
So the problem is, if I cannot define the Board in numbers then I cannot simply get the possible positions a player can take when he rolls 2d6-dices with calculating 'Field-Nr. + RandomRange(1,6) + RandomRange(1,6)'
Does anybody have an idea, how to define a Map like this on another way, where I still can calculate the possible new-fields for Player X with a 2d6-dice-roll?
Thanks in advance.
If i understand well... (i don't thing so) this might help you. Just use dynamic arrays for your boardgame field and change your actions after the dimensions x,y .... Look at this "type Name = array of {array of ...} Base type; // Dynamic array"
It sounds like you have a graph of connected vertices. When a player is at a particular vertex of N edges, assuming N < 12, the new Field will be reached from traversing edge number N % ( rand(6) + rand(6) ).
You could also just do rand(12), but that would have an even distribution, unlike 2d6.
Instead of dynamic arrays, I would recommend using a linked-list of records to describe the surrounding cells, and traverse the player's location and possible moves using that linked-list.
First, define a record that describes each cell in your board's playable grid (the cells on the grid can be four-sided like a chessboard, or hexagonal like in Civilization V) ... each cell record should contain info such as coordinates, which players are also in that cell, any rewards/hazards/etc that would affect gameplay, etc. (you get the idea).
Finally, the linked-list joins all of these cells, effectively pointing to any connected cells. That way, all you'd need is the cell location of Player X and calculate possible moves over n amount of cells (determined by the dice roll), traversing the adjoining cells (that don't have hazards, for example).
If all you want is to track the possible roads, you can also use this approach to identify possible paths (instead of cells) Player X can travel on.

SSRS line chart not connecting data points

I've looked high and low and can't seem to find an answer to what appears to be quite a straightforward issues (I would think).
I have a line chart where there is data at several points in a series but only only one set of points link up.
Does anyone know why this is? Is it to do with my data? If it is, I am struggling to see any relationships in the data that may explain this behavior.
Here is what I mean:
As you can see, the red diamonds should be connecting - the same could be said about the blue squares and the dark blue triangles. Any thoughts?
Apologies if my colors are wrong - I'm colorblind.
Okay, so I worked this out.
Firstly, in order to get the lines to join up, you need to set the EmptyPoint colour for the series.
select your series in your chart
In the properties tab (not the dialog) drill down into the EmptyPoint property and set the colour to be Black
This will get them joining up - yay! But part of the line is colour and the other part is black, right? That's a bit silly, especially considering if you leave the colour to Automatic on the EmptyPoint that it will be transparent.
So, then we need to get the series and the EmptyPoint's colours in sync.
Using code from here. I added some code to the code of the report.
1). Right click on an empty space on the report and select "Report Properties"
2). In the code tab, paste the following:
Private colorPalette As String() = {"#418CF0", "#FCB441", "#E0400A", "#05642E", "#1A3B69", "#BFBFBF", "#E0400A", "#FCB441", "DarkBlue", "Tomato", "Orange", "CornflowerBlue", "Gold", "Red", "Green", "LightBlue", "Lime", "Maroon", "LightSteelBlue", "Tan", "Silver"}
Private count As Integer = 0
Private mapping As New System.Collections.Hashtable()
Public Function GetColor(ByVal groupingValue As String) As String
If mapping.ContainsKey(groupingValue) Then
Return mapping(groupingValue)
End If
Dim c As String = colorPalette(count Mod colorPalette.Length)
count = count + 1
mapping.Add(groupingValue, c)
Return c
End Function
Then we need to call this code when setting the colour of the series and of the EmptyPoint.
Select your series
In the properties tab paste something the following (replace WhateverTheGroupIsForYourSeries with your series group name): =Code.GetColor(Fields!*WhateverTheGroupIsForYourSeries*.Value)
Drill down to the color element of the EmptyPoint Series property
Paste the same text as from point two [e.g. =Code.GetColor(Fields!*WhateverTheGroupIsForYourSeries*.Value)]
And voila! You're done!
I can't believe how unnecessarily difficult this is :D
I just had a problem where it was showing markers but not the lines. I ended up solving it by wrapping the expression in a CInt() to convert it to an integer.
Another way to handle this is to do a recursive select (if you have very large data sets don't do this, it kills performance). So you could make your dataset:
SELECT *, ROW_NUMBER() over(partition by Store order by Date desc) as rn
FROM StorePerformance
Now you can have your category group be rn (it should group by rn and sort by rn) but select date for its label. This will still display the date on your x axis, but since you are grouping by rn the data will still be continuous and all of the lines will connect. Also your legend will still match.
I still haven't looked deeply into how much this shifts the data points since we are plotting with row number and displaying date, but if you are mainly concerned with visualizing trends in the lines and aren't as concerned with where they are at a given point in time in relation to one another, it will serve you just fine. Otherwise I would leave the chart the way it is and just read the plot points, which are still valid data.
Solution
Just put your Fields!(YourSeriesGroup).Value in Series Groups to above of
Fields!(YourCategoryGroup).Value in Category Groups, your series group should be in both Series Groups and Category Groups (should be above of your initial category group).
And after that right click horizontal axis and select Horizontal Axis Properties. Set Axis Type to Scalar and click OK.
Result

Resources