Merge cells after suppressing if duplicate - c#

I have this records in crystal report:
I tried suppress if duplicate and this is the result:
What I want to be the result is like this:
Is there anyway to make it like that? I tried this answer https://stackoverflow.com/a/9529255/5218582 but the result is just like the second pic. Please help me thanks in advance.

This requirement is certainly possible.
Easiest way is to use the cross tab to get this functionality.
There is one more way bit lenghty one but you can use a sub report to display the ID and country and in main report you display name and you need to play a bit with the lines to correclt view as per the requirement but in this case aswell you will get the name at the top not at the middle.

Related

Replacing Microsoft Word Content Control Dynamically At Runtime

I want to be able to bind content control fields to each others' values. Basically if you change a field at the top, all others in the document also update to that. I'm replacing hundreds of individual variables, each with 100 duplicates. There is a better way than the 'Find and Replace Tool'.
Here is a sample document directly from Microsoft's site that shows exactly what I would like to be able to do:
https://omextemplates.content.office.net/support/templates/en-us/tf03444179.dotx
When the '' value is changed, all others in the document update.
I've already looked at plenty of solutions like: c# word interop find and replace everything
But they do not dynamically respond during run-time. In other words you have to go in and change which string you want to replace for each value.
Been looking for a while now, thanks in advance if anyone else can figure this out.

When the user clicks on an UltraGrid cell that contains multiple lines of text, the selected text loses the CRLFs

I have a C# program that uses an Infragistics UltraWinGrid to display comments. A comment can be multiple lines. That is, it can contain carriage return/line feeds (CRLFs). (See the upper portion of the attached screenshot.) But when the user selects the text of the comment by clicking on the cell, it loses the CRLFs. (See lower portion.) This is a problem, because comments can be very long and the user may want to copy and paste a comment somewhere else without losing the formatting.
From what I understand, this problem results because the grid uses a Windows textbox as an editor when the user clicks on a cell. Is there some way that I can either make the textbox keep the CLRFs or replace the textbox with an editor that does? Thanks.
Turns out there are a few stars that need to align for this.
Of course CellMultiLine needs to be set for the column like wnvko pointed out.
But also, you must make sure your Column Style is NOT FormattedText or FormattedTextEdit. (If that's required for editing i think you are out of luck). Just use Default style.
And finally make sure you CRLFs are actually truly CRLFs. My best suggestion is to use Environment.NewLine. If you are pulling the data from the DB, make sure you use CHAR(13) + CHAR(10) in that specific order. See Differences Between vbLf, vbCrLf & vbCr Constants
Hope this helps 4 years later. :-) But wanted to share for others since i found no solution elsewhere.
My suggestion is to use Templates. Have a look at the official Infragistics UltraWebGrid help book that is explaining in depth how to configure features like Row and Column Templates.
Go to page 74 for more information regarding the templating.
You should set CellMultiLine of the column to True. Here is how it is working when I set it in my grid
I never found a real answer to this question, but I was able to do a workaround by capturing the click event and having it open a small dialog box containing the cell text. I had the dialog box open at the point the user clicked, so that it appeared over the cell. After a few minor adjustments to take care of border conditions, it worked surprisingly well, so I'm calling this one solved. Thanks, everyone, for your suggestions.

Split a textbox into 4 seperate ones but save in one EF field

The title doesn't really explain my scenario very well, so I will try to explain the best way I can.
I have recently learnt how to multi-bind using a listview to concatenate two fields and separate them with a "," which was relatively easy to achieve. But now, I want to achieve something a bit more advanced but not sure if it is quite possible to do and I am not too sure how to go about achieving it and therefore would like some help or advice or guidance to help me achieve this :).
I am using Entity framework to create an entity model and some of the tables are larger then I expected therefore, I do not wish to add more fields then required (which is in this case).
One of my requirements, I have a textbox, containing no more then 13 characters. But, I now have been asked to achieve something similar to the image below;
As you can see from the image, the textbox at the top is what I have currently, but I want to find a way of splitting that textbox like the one below (containing; 123 P A ...).
Leading back to my question, is there a way to concatenate a textbox within an application that contains a possible further 4 textboxes and than they all save within one field of an EF model to reduce the amount of fields in a table?
Is this a bit ambitious or am I over thinking the problem too much and there is a far similar way of achieving this?
Thanks in advance for the help.
EDIT:
In the end, I created a separate table to achieve this. Quick and easy fix. Albeit, still an interesting question and still curious of a way of achieving it.
I would write my own UserControl for that. It should be fairly simple.
Basically, you define a Grid or StackPanel and add w/e number of TextBox's you need to it. Then, in code behind you define a dependency property, e.g. Result, which will serve as concatenation of Text properties of those texboxes. After that all you need to do is do some event handling: update Result whenever either of TextBox.Text properties changes and swap keyboard focus between TextBox's as user fills them. When you are done, you can simply bind your view model property to Result porperty.

Gridview clean up and neatness asp.net

So my question is this, I have a gridview that filters data from a database when a search keyword is entered. The problem is, that I need it to show some 20 different fields, which is significantly too long for a web page. The gridview goes beyond my asp.net webpage width and off of it. I was wondering if there was any way I could make it neater and easier to read, or fit all the data fields on one page. I'm not too familiar with this, so excuse my lack of know-how in and thank you in advanced.
A few suggestions:
Show fewer fields.
Make your columns really narrow.
Make your grid a header row only (contains only minimal info for a record). Clicking a link in a row will display further details for that item.
Use a DataList, Repeater or ListView so you can layout the row yourself.
You can try something like this:
http://weblogs.asp.net/dwahlin/archive/2007/07/31/freeze-asp-net-gridview-headers-by-creating-client-side-extenders.aspx
I think this thread on another site addresses exactly what you're asking:
http://forums.asp.net/t/1277793.aspx/1

C# Web reportviewer create link to page with id

I have a reportviewer and i want a field to act as a hyperlink. The hyperlink must look like: page.aspx?id=1 But how do i achieve this?
I have entered in the properties window, navigation tab, radio "Jump to URL": page.aspx?id=sum(Field!field.value)
This doens't work :(
What do i have to do to get this work?
Thnx in advance
Martijn
PS: I also have EnableHyperlinks set to true;
Your expression under "Jump to URL" should be:
="page.aspx?id=" & sum(Fields!field.value)
Although I see 2 potential issues with that. First of all, if I remember correctly, the URL must be an absolute path (e.g. http://www.test.com/page.aspx). Secondly, I'm not sure why you're summing on a field. If you mean to only get the "current" value of some field, you don't need the aggregate function, but you have to be sure you are inside a control that repeats data for each row of a dataset, e.g. a detail row of a table.

Categories

Resources