How to remove amounts in thousands in Telerik WPF RadChart? - wpf

Using RadChart is assigned at runtime to the same data through a dataset, the result of a database query.
Through code (vb.net) created the series and other settings needed in a conventional bar graph.
The problem:
When values ​​are thousands, the value is represented by a "K". Example: If the value is 1658, the bar shows 1.66 K.
question:
  How to remove the value of "K" and express the number unchanged as it gets?
Thanks

You can try following to remove it
RadChart1.DefaultView.ChartArea.LabelFormatBehavior = LabelFormatBehavior.None;
For More options please refer to this link, I hope this would help.

Related

FieldType.Number is capping the edit value to 100, any value more than 100 is automatically changed to 100

I have been struggling with this issue for a while now. In popup edit of Shield UI all the values that are entered FieldType.Number seems to have a upper limit of 100. Every value more than 100 gets automatically changed to 100.
There seem to be only 4 types String, boolean, data & number. The number seems to limit the max to 100 on edit and add.Even any decimal values are being rounded off automatically and their website is not providing much help on the issue because demo grid views on website are showing similar behaviour
Fields("empNumber", fb => fb.Path("empNumber").Type(ShieldUI.AspNetCore.Mvc.DataSource.FieldType.Number))
I'm looking for a way to add values more than 100 as well as decimal point for prices. Any help or suggestions in this regard are much appreciated
I ran into the same issue. However I found the following workaround. I have set the grid fieldtype to string instead of number. When editing or creating the grid a javascript is started that calls the controller method through ajax call. In my controller method I take the "string" value and convert it to an int like so:
propertyOfModel = Convert.ToInt32(stringParameterFromGrid);
That works for me, let me know if you need more help.

macro for automatic refresh function on array

I am creating a dynamic reporting tool that creates reports from data sourced from Wonderware. The data that is sourced is gathered from various pumps/flows/temps around site for operators/management to use. I want to create a dynamic sheet rather than use the wizards available because of limited IT experience of some of the operators.
I have managed to create the report but have one issue that i cannot resolve that would help the sheet become more user friendly.
I have some array formulas that link to cells that have dropdowns. (This is what helps make it user friendly). The drop down cells include, which server to look at, which tagname to look for, the start time, the duration and the number of cells in the array.
When changing the number of cells in the array cell dropdown the array doesnt change until you select a cell in within the array and then select the Refresh Function command. This then changes the array.
I want to write a macro that will select several cells on the sheet that have individual arrays and select Refresh Function command. I will then assign this to a shape that can quickly and easily be selected.
Can anyone help with this macro please?
You just need to add the reference to ActiveFactoryWorkbook in visual basic editor, and then something like this:
Range("B11").Activate
ActiveFactoryWorkbook.wwRefreshFunction
Be sure that in the cell B11 you will have a part of the array the query generates. As you have to refresh more than one array just copy the code again and change the cell reference.
Sub Workbook_RefreshAll()
ActiveWorkbook.RefreshAll
End Sub

Programmatically Position Image on RDLC using Database Values

I have an image that I'd like to programmatically position on an RDLC based on the X and Y values from the database. I originally thought I could just apply an expression to the Left and Top properties of the Location property, however it doesn't seem like there's an option to do that.
Is there anything I can do?
EDIT:
Fortunately the padding property allows expressions, however it seems I have another issue on my hands.
Here's my code for the "Left" property within the "Padding" property group.
=((Sum(Fields!intDessinX.Value, "dsRapport_uspReportCommandeInhumation") * 2.54) / 96) & "cm"
Essentially I'm converting the intDessinX value from the database from pixel to cm using the formula "cm = (pixel * 2.54) / 96" and finally appending "cm" to the end of the expression.
This does not work. I've done some research and can't seem to find how to take the value from a dataset and translate it into a measurement.
Does anyone know how to do this?
Thanks,
Mikael
Solved!! Since we're developing the website in French we had previously set the culture to "fr-CA" and this causes the decimal character to be replaced by a comma character.
As such, when it came time for the reporting engine to evaluate the value (with the comma), it wasn't positioning my image as it simply didn't understand that the value was in fact numeric.

Updating an unshown field in a form based on another table's field

Using Access 2010. Fairly new to automation and macros.
I have two tables (tblProductReceived and tblBins) and a form (frmProductReceived).
A field in tblBins corresponds to a location the bin is at (named BinLocationID) and the tblProductReceived table tracks product that a specific bin has received.
What I need is for the tblProductReceived field PRLocationID ([tblProductReceived].[PRLocationID]) to be automatically populated with where the bin is at ([tblBins].[BinLocationID]) when selecting a specific bin in the form (frmProductReceived).
Is there an easy way I can do this? I'm really new at macros/vba and I would extremely be grateful for some tips/suggestions!
Also, there is no object in the form for the PRLocationID field. I want it to be updated behind the scenes based on the bin number field the user selects ([tbl.Bins].[BinID])
Here are images of tblBins, tblProductReceived, and frmProductReceived: http://imgur.com/a/0IUHm/ (can't post images quite yet without reputation)
See this is the structure i have:
tblProductReceived is a table that records items that were deposited into bins.
tblBins is a listing of physical drop locations (bins) that contain a field BinLocationID
BinLocationID actually corresponds to another table (tblLocations) that has all the locations.
But I can't simply link the field from tblBins to tblProductReceived's because sooner or later bins can move from location to location (whatever the reason is is unimportant). This is the reason why I need a copy of [tblBins].[BinLocationID] to be copied over to [tblProductReceived].[PRLocationID] because should a bin move, it would mess any analysis (as we want to keep track of where the product was dropped off at, not only the location of the bin).
Also, the form I set up does have the drop down to the various bins ([PRBinID] in [tblProductReceived] — (i use a lookup query on tblBins) but keep in mind there is no txtBox for the PRLocationID in the field as it's superfluous. The bins are at location already, all i need is for it to be copied over to the appropriate table.
Am i overlooking anything?
After picking at it for hours this is the most elegant solution I've come up with:
On the form, I have a hidden txtBox called txtPRLocationID whose row source is PRLocationID (in tblLocations)
After a bin is selected at txtPRBinID, i have an event scripted at Lose Focus:
'Private Sub txtPRBinID_LostFocus()'
'[txtPRLocationID].Value = DLookup("[BinLocationID]", "tblBins", "BinID = " & Nz(Me!txtPRBinID.Value, 1))'
'End Sub'
Basically what it does is everytime a value is selected for txtPRBinID and the user moves on (Loses Focus of the txtBox), a DLookup occurs for tblBins.BinLocationID for the value of BinID and changes the value of txtPRLocationID text box.
The 'Nz()' is to avoid Null errors (according to Google search). Not sure if necessary, if anyone can confirm, please do!
Thanks for reading!

How to deal with 2 TimeSerieses with the exact values?

I'm creating a TimeSeries chart with 2 TimeSerieses in it (i.e. A Dataset holding 2 TimeSeries objects.
It happens that both TimeSeries objects holds the same exact values and they are simply overlapping but that's not clear to the client as he only sees the result color or mixing the colors of both TimeSeries objects !
So he's seeing that the chart is displaying 2 sets of data, while only one line is drawn !
Is their a build-in way to deal with that ? How would you fix that ?
Personally I'm thinking of splitting this chart into 2 for it to be clear to the customer but I'm wondering if there is a way with less effort\more efficient to solve this situation.
EDIT: Final output should be images so this isn't a desktop application (i.e. Swing)
Thank you.
One approach is to let the user control series visibility using a suitable Action, a shown in this example.

Resources