Resize varchar doesn't update crystal report - crystal-reports

I've got an existing report with quite a few fields on it.
I have just modified my database changing a varchar(10) to a varchar(20)
When I test it out with data '12345678901234567890' the query against my view works perfectly fine. However, even after I've completed a "Verify Database" it doesn't display the whole value.
I have attempted using a formula to display it, it still truncates it at 10 characters, I have also done a LEN({myfield}) and it displays 10.
I have also used the command "Update datasource location".
Somehow that field length information is stuck.

I have resolved it in a roundabout way.
I removed this field from my datasource,
I then verified the database and the field was removed from the report
I then re-added the field to the datasource
Then re-added the field to the report
Everything displayed properly.

Related

Adding second table field to report causes report to go blank - Crystal Reports 14.1.2.1121 using SQL Server Database source

I have a report pulling all fields from a single SQL Server table that works well. I need to add a second table to pull additional data, but doing so causes the entire report to go blank and number of records to drop to 0, from 242 without the added field from the second report. I have no grouping in the report either.
Reviewing Database Expert Links I see multiple links between the two tables, but the field in question, (CUSTPO_27, a String field), does not appear in the original table and therefore has no link. The field needs to be in the Details section of the report along with the data from the original table.
I have run Verify Database and get the "The database is up to date" message.
Running Dependency Checker finds no errors, even with the troublesome field added.
I am fairly new to Crystal Reports, but feel like I am missing a step to be able to see the second table field in the report, so any insight or direction would be greatly appreciated.
I would be happy to add code, but I don't see where to view the code in Crystal, (again, I am a newbie!)
Adding that field probably forced Crystal to join to a new table, and that join failed to find a matching record. So check your join logic.
Crystal doesn't update your database. It's Read Only.

All fields are not showing for Group and Sort Section

I have a report created in Crystal Report 7.
I have modified a view on which the report depends.
When I clicked Verify Database new fields are added in Field's list.
After modification of View now I need to change the Grouping Order of report. When I searched in Fields Explorer there were all the fields present, but in Group Box those fields are not coming. Am I missing something, please help.
Also In Visual Linking Expert tab Browse Field is disable and for rest are enable.
I have never worked with CR 7 but I suspect a field type/size/characteristics issue. Can you put these 'missing' fields in your detail section and have a look at the displayed values? If these look normal, what I would try are the following:
convert the missing fields into 'smaller' ones, by setting them in
the query the following way, just to check if the problem is linked to a field size
issue or something like that.
CONVERT(varchar(10), returnReason) as returnReason
Another try would be to create the grouping fields in the report, adding corresponding Formula Fields like
groupReturnreason = left(returnReason, 10)
No guarantee of course, just a trial.

Crystal Reports 2008: field shows as blank even when data is returned from the database?

Issue
I have a report in CR 2008 that I inherited from someone else
A sub-report in the report pulls its data from a database view
A field exists, "TRANSCBFLAG" in the view -- it's a string with values of "Y", "N", or "D"
The view has these values
The report displays every other value, but not this one field.
Attempted Resolutions
Suppression attribute? -- No, it's unchecked
Field type issue? -- No, it's a string
Font and background? -- No, it's black font / white background
Suppression / formatting formulas? -- no formulas on display or suppression in subreports or report
Space constraints? -- stretched the field out below all other fields -- still shows as blank
Check to make sure Crystal can see the data -- right-clicked field, select "Browse Field Data", and it came back with the three potential values. So, it can see them in the DB at least, and potentially even in the fields itself.
Just a local Crystal Issue? -- No; I uploaded the report to Business Objects XI for a test and all fields still display except that one.
Question
Where in the process could I be going wrong? It shows when I run the view directly from the database, and every other field shows perfectly in Crystal the first time.
I would assume you did 'Verify Database' but if not that's the first thing I would have tried.
And just a piece of advice... always, always, always run your reports off of a command you write yourself instead of using Crystal's GUI to let you select tables/views/procs. This allows you to make pretty much any kind of change to the query you want and even completely change the source from where your data is coming without wiping all your report controls away. If the modified query has the same field names it will always work seemlessly and if not it will give you a chance to redirect which fields are supposed to come from where. Otherwise... you will have to recreate everything as you just experienced.
There may be a more correct answer, but in a pinch, removing the view from my report (thus removing all fields), adding the view again, and redoing all fields caused the field to display correctly. Not sure how or why.
A further explanation would be appreciated, but for now, that's all I've got.
I had the same issue on a new report I'd created and finally found that the issue was in one of the parameters I used in my command SQL - it had double }} at the end. Eliminating one of the }s allowed the query to return data.
That said, go over the SQL in your database expert with a fine toothed comb, and you'll likely find the issue!

No data returned in Crystal Reports

I have a Crystal Report I'm working on; last week it was returning results but when I fired it up this morning I was no longer getting anything. Checking the SQL query, I show that the table name is listed twice, for some reason:
SELECT "WMS_TESTINFO"."RECORD_NAME"
FROM "TestEnv"."dbo"."WMS_TESTINFO" "WMS_TESTINFO"
Any thoughts on what could have broken? I've checked that the database is connected and my data is still there.
The table name is listed twice as Crystal Reports creates an alias for every table.
This Crystal generated SQL:
FROM "TestEnv"."dbo"."WMS_TESTINFO" "WMS_TESTINFO"
Is in the format of:
FROM DATABASE.OWNER.TABLENAME ALIAS
This is normal for Crystal.
I would run that SQL in SSMS (remembering to remove all of the " first) to check that the data really is still there.
If it is, check that a filter hasn't been added to the report, via the Select Expert menu opton, to filter out all the data.
Lastly, go to Database > Set Datasource Location and re-apply the connection to ensure that the report is definitely pointing at the right location.

Field text is being truncated inconsistently

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.