Text alignment in Crystal Reports - c#-4.0

I am developing a crystal report and data is also coming fine but I am unable to format the fields in the same, just like a comment field must be multiline but when I select the "can Grow" in Format object section, the display is vague.

Can Grow with a value zero stands for the display will grow to multiple lines till it is displayed fully.
As the grow can happen multiple lines, you can adjust the width of the item so that it will not overlap with other item.
What should You do:
Set can grow property to zero
Resize the item (for which you set cangrow 0) so that it will not overlap the item of the next column.

Related

restrict table dimensions to the table placeholder dimensions in python-pptx

i am trying to add a table to a presentation using python-pptx with a specific dimensions
i created a slide layout from power-point which contains the table placeholder in the area i want and loaded it using python-pptx.
slide_layout
but regardless of the placeholder dimensions, the table itself after creation is exceeding the placeholder are.
mainly it is dependent on the number of rows as per the documentation "The table's height is determined by the number of rows."
shape_id, name, height = self.shape_id, self.name, Emu(rows * 370840)
i tried to update the placeholder.py file manually and change the row height but the same output appears.
shape_id, name, height = self.shape_id, self.name, Emu(rows * 18429)
the table is insisting on exceeding the placeholder area as per the below image
output
below is my code, any clues ?
from pptx import Presentation
# the presentation including the table placeholder
prs = Presentation('Presentation2.pptx')
slide1 = prs.slides.add_slide(prs.slide_layouts[11])
table_placeholder = slide1.shapes[0]
shape = table_placeholder.insert_table(rows=22,cols=2)
prs.save('test.pptx')
Tables in PowerPoint expand vertically to accommodate new rows; that's just the way they work. You will need to do any resizing yourself, which you may find is a challenging problem. This isn't the same kind of problem when a user is creating a table in the application because they will just make adjustments for fit until it looks best for their purposes.
You'll need to adjust font-size and row-height and perhaps other attributes like column-width etc. based on your application and whatever heuristics you can resolve, perhaps related to the row count and length of text in certain cells and so on.
A table placeholder really just gives a starting position and width.

How to increase set of data by increment of 1 in excel?

I have a set of data in excel, which varies in size, that I need to increment the final number by 1 each time I duplicate it. For example:
100065202-TR01
100065204-TR01
100018998-TR01
100065202-TR01
100065204-TR01
100018998-TR01
100065202-TR01
100065204-TR01
IB500-TR01
100005693-TR01
100065202-TR02
100065204-TR02
100018998-TR02
100065202-TR02
100065204-TR02
100018998-TR02
100065202-TR02
100065204-TR02
IB500-TR02
100005693-TR02
I need a way that I can increment TR01,TR02,TR03... up to TR20. The text before the -TR** will remain the same every time, I will simply be duplicating a (sometimes very large) block of data but want to change the final number each time.
If you select the data you need and then "pull" to the right by clicking on the bottom right corner, where the black square is, it is done automatically by Excel.
See result

Tabular Sub-report Property

I have a sub-report that retrieves ONLY one field, but it retrieves n values. This means it will be displayed in many rows.
I want to display the sub-report result in a master report in ONLY one row (comma separated or Tabular). Is this applicable?
I tried to make the sub-report Tabular = True, but it displays the results in the master report like
(1 2 3)
(space 2 space)
(space space 3)
Thanks
First of all, the tabular report must have at least one group.
Try to set a property TabularFreeze to value that cuts off a tabular region.
It is necessary that the red line was directly to the right of your TextBox.
Tabular region will be moved from rows to columns.

RDLC Report + shipping labels

I am having some tremendous trouble with formatting shipping labels using RDLC. The conundrum entails formatting the HEIGHT of my report so that the report will grow as needed (for detail items), but it will only grow within the remaining space of a 4"x3.33" shipping label (3.33" is the height).
The shipping labels I am creating are grouped on a main grouping (the recipient), with a detail of the items going to the recipient as a list of items. In this case, the "recipient" is a piece of heavy machinery, and the detail is a list of maintenance parts for that particular machine.
The data set consists of rows of data, where each row is a part, and contains the machine's name. I group on the machine's name, and in the detail, the parts are listed. There is no problem in this regard, and I have made similar reports (such as a packing list type of report), with these groupings, with no problems at all.
The problem I am having is that I can't seem to force the size of the table to max out at 3.33" tall. If the label is less than that, the next instance (the next machine) begins printing immediately after, without skipping down to where the next label is on the sheet. If I put in a gap, the gap is repeated for each detail item...
What I need is to know how to "wrap" the entire tablix table, such that it has a MAXIMUM height of 3.33", a MINIMUM height of 3.33", but within those boundaries, the detail list will grow or shrink to display all of the detail items.
I have split the overall report to match the specifications of the labels I am using (standard 4x3.33 shipping labels)
Margins: 0.15625in, 0.15625in, 0.5in, 0.5in
Columns: 2, with a 0.1875in spacer
Total page size: 8.5in x 11in
Here is what I have in the designer (very basic)
And here is what the result of that is...
Note that there is no 2nd column for some reason... and each instance is butted up against each other vertically even though there is a 3.33" "play area" in the designer.
How do I make this thing give me what I need?
I was able to solve the problem by separating the data in to "all those machines that have orders in this orderID", and using that to create a simple list that is defined as 3.33" high for each item. Within that, I had to create a subreport, pass in the parameter of the MachineID, generate the data of all parts for that OrderID under that MachineID, and list them.
This is the final result:

How to tell if ultragrid text has been truncated

We are using infragistics ultragrid to present data to the user. if the user modifies the width of a column, I need to be able to tell if the data is truncated so that I can adjust the output properly when exporting the data into pdf. We want to truncate the data when exporting to other formats to match what the user sees after the column width adjustment.
Thanks,
Currie
Whether the text is cut off or not is done automatically when drawing the string so you would need to get the available space and the string and then determine how much of it fits into the space when drawn.
Within the CellExporting event of the UltraDocumentExporter, you can get the text and the size with the following:
Size size = e.GridRow.GetCellSizeResolved(e.GridColumn);
string text = e.GridRow.GetCellText(e.GridColumn);
You can also change the value that is being exported by setting e.ExportValue to the string that you want to put in the PDF document.
What remains to be done is to determine the amount of characters that fit into the rectangle and the following should help you with that:
How to determine maximum number of characters given a fixed width font and a maximum width in pixels

Resources