SSRS 2008 draw lines on report - sql

I have 2 sets of coordinates in a table. The first set is XFrom and YFrom and the other set is XTo and YTo. If you draw a line between these two coordinates then you get an arrow.
I would like to draw these arrows in a report, for as many rows as the table has.
XFrom YFrom XTo YTo
1 1 3 3
2 2 4 4
1 2 5 6
Each row represents an arrow
I can't seems to find a way.
Any suggestions?
Thanks

Drag and drop a chart control from the toolbox.
As soon as you do that , you get a pop-up, displaying various image shapes for the chart control & try to choose your option.

Related

tadvstringgrid not copying every cell

I have this tadvStringGrid
it has:
navigation.allowclipboardAlways=true
navigation.allowclipboardshortcut=true
option.goRangeSelect = true
MouseActions.DisjunctRowSelect = true
goEditing=true
I can select multiple cells but when i ctrl-c and ctrl-v ( at another location) only the last cell selected is copied.
Is there a property which needs to be turned on to have all the cells copied.
Or do i have to create a list of the selected cells and copy them at the new location?
ex:
Table:
1 2 3 4 5 6
7 8 9 10 11 12
if i i select 1,2,7 (ctrl-c them)
then click on cell 4 and ctrl-v
the 4 will change to 7 but the rest will remain unchanged.
i would like for 4 to become 1, 5 to become 2 and 10 to become 7.
thank you
After much searching.
To solve my issue, i had to turn off editing
which gave me acces to all the selected cells.
I saved the X Y coordinate with its value in a temp variable on the copy event
Made a list of those variable and on the paste event i would copy the list to the desired location.
This is more complicated way than needed but i cant find the easy way. so if anyone has a clue, I'll take it
thank you

How to use VBA to color and frame cells with value

I'm trying to color and frame a column in data. There are blank rows inside. I only want to color the cells with value. The data position might change, so I want to use an input box to color and frame .
The data will be like this. The select range would be column B.
1 A
2 B
3
4 A
5 B
6
7 A
8 B
9
10 A
11 B
12
13 A
14 B
15
16 A
17 B
18
19 A
20 B
21
22 A
23 B
You don't necessarily need VBA - you could use Conditional Formatting. Highlight the entire column B, then go to "Conditional Formatting" under Home tab. Click "New Rule" and choose the last one in the list, "Use a formula to determine which cells to format.", enter this in the box =$B1<>"". Then click "Format" and go to "Fill" - choose the color you want, and hit "OK" and "OK". That should do it!
Edit: Ah, about the input box - can you expand on what you want to do with that? What do you mean by using it to "color and frame"?

SSRS Comparing 2 rows (new vs old) and highlighting the differences / changes

I have a report which gives the current state of an item, and the previous state of an item and I want to display both rows and highlight the differences. For example:
STATUS ORDER# NAME ADDRESS QTY PRICE TOTAL
new 255 Joe 1 Main St 2 5 10
old 255 Joe 1 Main St 4 5 20
new 256 Matt 100 Green Ave 5 5 25
old 256 Matt 65 Blue St 5 5 25
So for order 255 I'd like to highlight the QTY and TOTAL values since they changed.
For order 256, I'd like to highlight the ADDRESS value.
Does anyone know how I can accomplish this?
Thanks a bunch in advance!!
In the textbox properties go to the Fill tab. For fill color enter an expression like this:
=iif(Fields!GroupID.Value=previous(Fields!GroupID.Value)
and Fields!Spouse.Value<>previous(Fields!Spouse.Value)
,Parameters!Color.Value,Nothing)
Change "GroupID" to be your Order# and change the "Color.Value" to the highlight color you want.
Note: This will only highlight the second row when it is different from the first, there is no way to highlight the first row as well because there is no "Next" function, just the Previous function. You can use this to either highlight just the cells that are different or the entire row.

Display data table for a pie chart in excel using vb.net

I have an excel data and able to draw an pie chart from vb.net.
I should be able to add the data table below the pie chart from vb.net
Thanks
Rupesh
A very useful trick I learned a while back is if you open Excel, record macro and then step into it, you can usually see how to write the code or get something very close to what you'll need in .NET. For example, I created 4 columns like this:
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
5 5 5 5
6 6 6 6
I went to the Developer tab and hit 'Record Macro' and then highlighted the cells and inserted a table. I then hit 'Stop Recording" and stepped into the macro by selecting it from the Macros list. It gave me this code:
Range("A1:D6").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$D$6"), , xlYes).Name = "Table1"
You should be able to do something very similar in .NET using the interop. There are range and table objects in .NET that you can use and place the table where you like.
Hope this helps.

Conditional formatting in Access

I have a datasheet that looks like this:
ID name_ 1 2 3 4
1 name1 x 0 0 0
2 name2 0 x 0 0
3 name3 0 0 x 0
4 name4 0 0 0 x
I have rectangles on a report that correspond to this datasheet.
When the report opens, I need the rectangles to be colored red according to the data. For example, in the name1 row where there is an x in the 1 column, I need the specific rectangle corresponding to this (name1, 1) to be colored red. Here is the result that I need:
x
x
x
x
(where x is a rectangle that is red)
Perhaps the best place to place this code would be in ON LOAD event of the report, but i am not sure exactly. Can you please suggest to me some code that would turn the specified rectangles red according to the data?
Use conditional formatting, not code.
In this case, I see no reason that #Remou's answer is not correct -- you want to display an x, which is data, so you would use a textbox with conditional formatting that sets the background color appropriately.
However, if you wanted to do this without a data control, you'd likely use the Format event of the Detail of the report. This is the event that fires when each record is processed, and it could be used to run a test that determines which rectangle to hide/show or what color to give the background of the rectangle.
The OnOpen runs before any of the data is loaded, and the OnLoad event before any particular rows are accessed. Because of that, neither is appropriate for formatting controls in individual rows of the report.
And BTW, your mention of the OnLoad in reports indicates that you're using Access 2007 or later (the event didn't exist for reports in A2003 and earlier), and you should have stated that in your question.