Use two font in one expression in rdlc report - c#

I have a report that it has one expression.In this expression I want to use two different font. For example I want to write "Hello. My name is Tavousi.". That Tavousi is in other font.
Note that I want to use ONE expression.
How to I can do this?

with Report Viewer 2010, AFAIK a TextBox with one expression, can only have one text format.
An alternative is to use a Table from the Toolbox.
each cell in the table can have its own expression, and also its own text formatting.
Tip: if a row is empty, then set the Visibility condition for the whole row, to make sure that it does not take up whitespace.

Related

RDLC report TextBox shifts if adjacent TextBox is not visible (I.E. Hidden)

I am using Visual Studio 2012 C# to create reports using the RDLC framework. My report contains columns of TextBoxes fields. Under certain conditions I need to hide the 2nd to last column. When I do this (set hidden property to True) the far right column for those rows with a hidden row slides over to the left rather than being aligned with others in that column. I am not using any properties that I can tell that would cause this. My current workaround is to make the text color for the column to hide White, but this is really a hack in my opinion and won't work if the back color is to change. Does anybody have any thoughts on how I can do this the right way, I.E. using a formula on the Hidden property of the TextBox rather than on the Color one?
Any help regarding this would be very appreciated!
You simply need to define an expression for the Value of the TextbBox that prints nothing when the condition is met.
=Iif(YourCondition = True, "", Fields!YourColumn.Value)

RDL report to show sort selection

Is there any way I can print the sorting option in a text box? For example, if my table has a "Status" column and I chose to sort by "Status", then I can print the word "Status" in a text box. This is the RDL report.
hopefully this is what you're trying to achieve?
Indicate parameter sort option with default values:
Then create a textbox and simply drag the parameter inside the textbox that should look like this:
Then when you try to preview the report and select a sort option, something like below should appear:
Hopefully this helps.
IF you are using a parameterized report where the sorting can change simply capture the the parameter in a text box or often what I do is create another dataset that is
Select #parameter1
Union select #parameter2
Union Select #parameterN
Then display that in another tablix (or cell depending on how many you have)

Generate RDLC Report with two columns

I need to build a report (.RDLC in visual studio 2012) that contais a long text in two columns by page.
I can't just add a new column in the report, because the content above of this long text will be dynamically, so, this control (to fill the text in the second column) must be dynamically too.
Also, i need to add others parts of the report after the text ends.
Somebody knows how to do this?

Minus sign on DataGridView on RTL language

Whenever I use a DataGridView negative values in it display the minus sign to the right of the number and not to the left: e.g.: 4.5- instead of -4.5. My DataGridview is set to "right to left" mode because the language is Hebrew.
How can I sort it out?
Edit DataGridView Columns and DataGridViewCellStyle:
Format=#,##0.00;#,##0.00-, Alignment=MiddleCenter
If you have no luck with format strings (see Creating a custom format string in a dataGridView) have you tried explicitly rendering the numbers as strings and then displaying them? I believe that might be the quickest and easiest answer.

hide columns in crystal report at run time?

how to hide columns in crystal report at run time?
thanks for any suggistions.
Option 1: use conditional-suppression logic to hide/show redundant fields
Use a parameter field to drive the suppression formulae for the desired fields.
If you want to eliminate blank spaces between fields, then you'll need to stack the fields on top of each other and suppress them appropriately. In your example, column 2 would contain field2 and field3 (both suppressed) and column 3 would contain field2 and field3 (both suppressed). The suppression logic, in your example, would continue to suppress both fields in column 2, but would show field3 in column 2 (field2 in column 2 would still be suppressed).
Option 2: use 'placeholder' formula field
Each column of data that could be suppressed would be a formula field. Each formula field would use SELECT CASE logic to choose the desired field to display. A 'hidden' field would simply return a null value. Your SELECT CASE logic would be written to ensure that values are filled from left to right. The formatting will need to be done in the formula rather than on the formula field itself.
Option 3: use the SDK to dynamically-change the report.
Use the CR .Net SDK or the older CRAXDRT API to dynamically-modify the columns' visibility and positioning.
If you use this option, however, your deployment options will be more restricted.
You could use parameters (which values can be set during runtime) and use them on the objects' suppress formula.
just for sharing I found a great and simple article at
http://www.codeproject.com/KB/cs/Dynamic_Crystal_Report.aspx
that using parameters in crystal report to dynamically load data from a database into Crystal Report and show specifying which field (Columns of a particular table) should be displayed in the repor according to user choice.
Dani.

Categories

Resources