I'm working vb.net2010 and Crystal Reports for. NET Framework 4.0.
I have a text field in mysql db with RTF data, output the data to the report assigns by default a text field (IFieldObject).
The problem is that when the data exceed 4,922 words (with respect to microsoft Word) does not show the other data, I have activated the property can grow.
Could someone please tell me how I can show the rest of data are like a 2000 or 3000 words. Or Crystal Reports can not display more data.
Thanks in advance.
If you don't want to set a limit as to how many lines (not words) the report displays, make sure that when you set the "Can Grow" property to set the "Maximum Number of Lines" value to zero, which means there is no limit.
Cheers,
Chris
Since that doesn't seem to work, try right-clicking on the field, click on Format Field -> Paragraph tab -> Text Interpretation -> RTF text.
Related
I'm currently creating a report in Crystal Reports and each item has a border. The problem is that some of the fields can have a NULL value. When a field has a value of NULL the border doesn't show up, leaving an unsightly gap in the data.
The only solution I was able to come up with is that I create a formula for each column that displays the value if it's not null or displays a blank space when it's not null to trick crystal into thinking there is a value. This would be a major pain and definitely be confusing to anyone trying to modify the report. Is there a better solution to this problem that I might have missed?
Note: I'm unable to modify the SQL.
You can change the report options to give the default value to the null fields. But it may be not desirable for other cases.
If you wanna try it, right click the report and select "report options". Check the options "convert database null values to default" and/or "convert other null values to default".
You can insert a textbox on the report, then place the field inside that textbox. The borders would be placed on the textbox and would always appear regardless of the field value.
A few drawbacks to this,
Formatting cannot be done on the field any more (e.g. if you needed to display 123 as $123.00 you'd need to create a formula to perform the formatting then insert that formula into the textbox)
Export the data to Excel would not respect the data type - any numbers would come over formatted as text (though displayed exactly as you formatted them on the report) with that little green arrow in the cell
I found that method from https://archive.sap.com/discussions/message/9923668#9923668
I`m using Crystal Reports Version 14.1.1.1036 to show an RTF Field stored in my SQL server as nvarchar(max), the problem is that my nvarchar(max) is interpreted as a Memo Field in Crystal Reports, only part of my data is being previewed (text is being truncated). Field's property is set to "Can Grow" with 0 as a Maximum number of lines. thanks for any help.
After some research, it turned out that Crystal Report have this fault by design, and there is no means to fix it. The maximum size of a text field is set to 64KB at maximum, and the only way to resolve this is by String Splitting very large fields.
Check this post for more information.
Requirement:
I have one new requirement in Crystal Reports.
I need to show 100 columns in the report. I have tried using Landscape option but maximum I am able to accommodate are 20 columns.
Can someone have any idea on how can I accommodate 100 columns. Thanks in advance.
Practically it is not suggested to take 100 columns..as this can create an issue while monitoring the data in crystal reports
But if you still need to accompdate the 100 columns then follow below process.
go to File --> Page Setup --> there go to Unit --> for selected option give maximun size for Horizontal Component
This will increase the size of the report and now can insert required number of columns
Since this report is not for print and will be exported into an Excel format, just make your page as big as you need it. This can be done by going to "File" → "Page Setup" and adjusting the following things:
Check "Dissociate Formatting Page Size and Printer Paper Size"
Might as well flip the page to "Landscape"
Enter a large number in "Horizontal"
You should also note that because you're exporting this data (especially as "Excel - Data Only"), you don't need to make the columns wide enough to display; as long as the field is on the canvas they should show up as a column.
The size of the columns doesn't matter if you are going to export to Excel data only. So you can make the columns as small as you want, even if the report is not readable it will be exported OK.
If you want just to export some data and your report does not include subreports you can go without Crystal reports. Will be much simpler to set the SQL and preview data in a grid (which is scrollable) and then export it to Excel. It will look better too.
There are some tools that can do this and I guess you can easily find something on Google. I am using R-Tag (www.r-tag.com), which is free. You can see it in action here: http://www.r-tag.com/Pages/Preview_Demo.aspx
I created a label report (2 columns). The fields used are, Suffix, Contact Name, Company Name, Job Title and Department – simple contact data.
The Department field is the last one and in the report of 78 records the Department field decided not to display the entire field text twice.
I have "Can Grow" set as default on all fields, I checked the margins and label width to ensure the text is not being truncated because of the labels being too wide for the margins. I modified the data in the database by abbreviating certain words and it shows the change but it still truncates after 50 characters. Other times the Department name is 80+ characters and it displays all of the data.
This problem is happening onscreen when I preview the report and also when various users print it. The default printers have not changed.
This one has me stumped. Is this an application bug (if so is there a Service Pack for CR 11.5?) or does it have anything to do with printer drivers in need of update?
Thanks in advance for your help on this puzzle.
Update
I did specify data source
The text in the database is without any special characters or anythig else that might be out of place
No I am not using Underlaying Following sections anywhere in the document
11.5.8.998 is my version of CR (lloks like I am behind - however, when I click on verify for updates it tells me there aren't any. Do you ahve a link to the SP2 download?)
No formula in the Custom string option
Mine worked by simply going to the Database Menu option: Database-->Verify Database, and the field sizes were updated
It could happen if the length of the field in the Data Source is less than your string. To check this:
In the Field Explorer right click on the data source name and choose "Show Field Type"
The length of the field is written between ( ). If it is less than your string length, you have to re-build your data source. For example, if your data source is a view, you have to drop and create it again and then verify your data base in crystal report.
Hope it helps.
Random troubleshooting thoughts. One of these could even work :)
You didn't specify your datasource, but can you preview your data before it goes into Crystal? If the actual data is randomly truncated, then the problem isn't Crystal, it's the data.
Does this data have any special characters, i.e. accents, foreign currencies, etc? That could be a problem (I don't know if this could even create problems, never used them in Crystal)
In the Section Expert, are you using the Underlaying Following Sections option for fancy formatting? If so, your 'grown' fields may be hidden by some other field in the following section.
My Crystal Reports XI Developer Edition is 11.5.12.1838 (that's service pack 2). Is your Crystal up to date?
In the Format Field pane, there is an option to make a custom Display String. Sometimes I forget I have a formula and then don't understand why it's not doing what i want.
I have a crystal report, which takes data from an XML template. For a particular field of report, say 'Cost' the database stored procedure send data to XSD file in decimal format , but when the crystal report displays data picking from XSD, it is rounded off.
When i right click on other data fields of report, I can see 'Field:table1.columnname',. But when i click on 'Cost' field, it shows 'Text:'.
To my understanding, this is a text field which is mapped to pick data from XSD and since the type is text, it gives result in text hence truncating the decimal.
Please suggest how can I get decimals here.
P.S: This code was created by someone else, so i have no idea on what they had set at that time. I have to fix it and i have no clue about it.
(This sounds like one of those problems which is probably fixable in 20 seconds if I stood over your shoulder. Or not. Since that's not possible, let's do some background first:)
When you right-click on a field and see Text:, that means it's just a Text Object which may or may not display data from the database (if you just roll your mouse over it, it should say Text Object). When you want a report to say something generic like "Hello, my name is", this is how you'd do it. But you can also drag & drop data fields into it as well.
The other data fields that say 'Field:table1.columnname' when you right-click are indeed pulled (almost) directly from the database
Try this:
Go into your Field Explorer (If it's not open already, from the menu bar, choose View->Field Explorer). Check the Field Type of your field of interest. If it's a number field, then that's how it's being pulled from the database, which is good.
Try deleting the original field in the report and drag&dropping your field directly from the field explorer. Preview the report. Right click to Format Field. There, you'll see display options to add/remove decimals, insert currency symbols, etc.
That's enough for now. Let us know how it goes.