Default Crystal Text Field Height - crystal-reports

In Crystal Reports 2011 when I create a new text field and add it in design view the height is 0.13. Other instances of Crystal I've seen always create these fields at a height of 0.16. How do I set my instance of Crystal to create fields at this height?

you have to change the hight or width your self, and if you want to change more than one textboxes, select them and then right click on them move cursor on "align" and select your choice or you can choose same size for all.

I don't know if you can change the default height of a text object. I've never tried this before but you might be able to use CSS to accomplish this.

I'm not exactly sure how you got into this situation - I've looked all over and can't find a way to modify the default height of a text object in the version you're using (and it is 0.16 inches for my install).
Assuming reinstalling is out of the question (this would be drastic but is probably your best bet), an alternative workaround may be to create an empty text object at the top of a report, manually set it to the correct height, then copy-pasting it anywhere you want a new one instead of using the insert menu.

Related

How can I change the number of displayed suggestions with Antd Autocomplete?

By default Autocomplete seems to show 8 suggestions at a time, the rest you will have to scroll down to see it. There are no component property related to this number in Antd documentations. Is there any way to change that to another fixed number? How about making it display all?
Internally Autocomplete use the component Select and make all Select properties available, even internal props. listHeight can be used to increase the height of the suggestion dropdrown list. As note in Antd's Select documentation:
Virtual scroll internal set item height as 32px
To make Autocomplete display 10 items for example, set listHeight={320} to Autocomplete. To make it display all items, pass an arbitrary large number to listHeight like 999999 or Number.MAX_SAFE_INTEGER

Adding fielddata to fixed text in report designer

Using the report-designer of Reportbuilder i want to add a long fixed text to my report with one or more included fields inside the text. Of course these fields should be filled with actual data, adjusting the text.
I remember I have done such a thing in the past, but cannot remember how. I thought you could accomplish this with a Text-field and something like 'This is the text and here {fieldname} fielddata is inserted', but that doesnt seem to work
Can anybody help?
Using reportbuilder 15.04
Response from Digital Metaphores:
Use the RichtText component! By setting MailMerge to true, you can add
datafields to text in the richtext editor
This adds the reference to the fielddata as a xml tag. Adding the fields Name from pipeline plData can be done like this:
<dbtext datapipeline='plData'>Name</dbtext>
Fill in the fixed text, then (making sure the focus is set to the text box, I.E. you have the flashing pipe cursor) right click in the place you want the data field to go, and click Create Placeholder.
In the Placeholder properties window give it a Label so you know what it is, then use the "Value" field to define what data from your datasets you want to be brought through.
You should end up with the Label you set in square brackets, like [Example] within the set text.

stretch a textField to a max height in jasper reports

I think this is more of a general issue. I would like to use a textfield that gets dynamic data and doesn't stretch more than a given max height. For instance, I have a textfield that, if it gets text that fits in one line, the textfield will be one line height, and i have other elements under it, that will move up with float positioning. Or, if I want a 3 line max height and if the text exceeds that space, then the rest will be trimmed.
I don't want to use java expressions to trim that text, as it is not always accurate. I am new to jasper and I am trying to know if there is any way to do this. I did a lot of searches, but maybe there is something that i missed, and i hope someone can help me. Thank you
I managed to solve this by extending net.sf.jasperreports.engine.fill.TextMeasurer and overriding initialize() method; also I had to extend net.sf.jasperreports.engine.util.AbstractTextMeasurerFactory and override the createMeasurer() method.
Now, whenever I want to have max # of lines, with no overflow, I add a property to that text field (e.g. maxLines) which is being passed to my custom TextMeasurerFactory. I hope this helped you.
We had a similar problem at work with JASPER Reports 4.5, where we had an invoice with a header and a table. We wanted the header to have dynamic height based on the lengths of certain fields (like address, partner name, etc,), but not more than a critical limit, otherwise the header will push the table and thus making a mess by splitting it across multiple pages. Also, the invoice shouldn't exceed 1 page.
We eventually had to move the header in the background section, where we also put a background for the table consisting of vertical lines (so it will extend to the end of an A4 page) and a white opaque square.
This way, if the header exceeds the max height it will go underneath the table's background, cropping the text. This was the desired effect we were looking for.
Sounds crazy, but it worked ...

iReport: how to hard fix a detail band's height, independent of it's content

I use iReport and I try to fix a detail band's height independently of its content. My problem is that if one of my text fields has more than one line, the band "grows" and because of this I get a second page.
So is there any possibility to hard fix the height of a detail band?
Try setting the stretch type for the text field to "No Stretch" and the split type (see the properties menu) for the detail band to "Prevent".
Since we could not find any direct options, We are doing this in an indirect method, having PLSQL Procedure for data fetching, different sub-datasets are used for filling fixed height detail areas, so each fixed datasets are filled with max.rows which it can accomodate (within sub procedures). Hope it helps someone.

Text not fitting into form fields (iTextSharp)

I created a .PDF file using Adobe Acrobat Pro. The file has several text fields. Using iTextSharp, I'm able to populate all the fields and mail out the .PDF.
One thing is bugging me - some of the next will not "fit" in the textbox. In Adobe, if I type more that the allocated height, the scroll bar kicks in - this happens when font size is NOT set to auto and multi-line is allowed.
However, when I attempt to set the following properties:
//qSize is float and set to 15;
//auto size of font is not being set here.
pdfFormFields.SetFieldProperty("notification_desc", "textsize", qSize, null);
// set multiline
pdfFormFields.SetFieldProperty("notification_desc", "setfflags", PdfFormField.FF_MULTILINE, null);
//fill the field
pdfFormFields.SetField("notification_desc", complaintinfo.OWNER_DESC);
However upon compilation and after stamping, the scroll bar does not appear in the final .PDF.
I'm not sure if this is the right thing to do. I'm thinking that perhaps I should create a table and flood it with the the text but the documentation makes little or no reference to scroll bars....
When you flatten a document, you remove all interactivity. Expecting working scroll bars on a flattened form, is similar to expecting working scroll bars on printed paper. That's why you don't get a lot of response to your question: it's kind of absurd.
When you fill out a rectangle with text, all text that doesn't fit will be omitted. That's why some people set the font size to 0. In this case, the font size will be adapted to make the text fit. I don't know if that's an option for you as you clearly state that the font size must be 15 pt.
If you can't change the font size, you shouldn't expect the AcroForm form field to adapt itself to the content. ISO-32000-1 is clear about that: the coordinates of a text field are fixed.
Your only alternative is to take control over how iText should fill the field. I made an example showing how to do this in the context of my book: MovieAds.java/MovieAds.cs. In this example, I ask the field for its coordinates:
AcroFields.FieldPosition f = form.GetFieldPositions(TEXT)[0];
This object gives you the page number f.page and a Rectangle f.position. You can use these variables in combination with ColumnText to add the content exactly the way you want to (and to check if all content has been added).
I hope you understand that:
it's only normal that there are no scroll bars on a flattened form,
the standard way of filling out fields clips content that doesn't fit,
you need to do more programming if you want a custom result.
For more info: please consult "iText in Action - Second Edition".