Crystal Reports 10 - Adding new fields to a report causes all the fields in my report to disappear - crystal-reports

I added 2 additional databases to my report(Emp and Unemp). I verified all the links and they were correct. The problem is "when I add the new fields (from the new databases) to the report, all of the fields in my report disappear." This disappearing occurs in while in preview. Also, when I remove the newly added fields all of the fields in the report reappear. Can someone please help?

So, you had a working Crystal Report that originally pulled from 1 table. Then you added 2 new tables and all your records disappear. Are you sure that the new tables (Emp and Unemp) are populated? Are they joined correctly to your main table?
Just because Crystal tries to auto-link tables for you when you add them doesn't mean you should trust it to do the job correctly. It might have added some extra joins that don't belong there.

Check your joins and record selection criteria. Something there is causing zero records to be pulled (look at lower right portion of window for Records Read).
You might also do a Database, Verify Database to verify the database is "synced" with the report.

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.

List all records in crystal reports, even if missing fields

I really need to make a full list of every record in our database. The problem is that if the record is missing a phone number or an address, crystal reports doesn't print it.
Phone number and address aren't necessarily always inputted in our database, but I definitly need all records included on this report, even if those fields are missing.
I really have no idea how to get these missing records included in the report, but when I delete the Phone column I see a lot of the missing records appear.
Check your joins first. Make sure that you are not linking by either of those 2 fields.
Also check your format session to see if there is any suppression condition. Sometimes when copying behavior between reports, those conditions are left behind from the previous report.
Looks like you are making inner joins for the tables which populate that data.. for these type of requirements it is suggested to use outer joins on the tables that have all data... so that you can get all records if some other tables doesn't have the required information

Crystal report not showing all data

Created a stored procedure which i pushed to my crystal report. The thing is some fields are showing blank even though data is returned in the query. I have retested the query, Verify the database over and over but nothing
Thanks for all the help but I figured out the problem. I had a join on 2 tables that have the same field names which I did not rename in the query. The 2 fields that weren't showing were the ones that are similar. I renamed those fields in the select statement and my data is now showing [silly me :)]

Items in details repeating itself in Crystal Reports

Situation
I got stucked to some weirdo in Crystal reports. See the image below of my RAW RPT.
Everything in my report is coming fine except the details part. You can see there DetailsSection6, in which i have few columns(10-15). This rpt is binded with the XSD file and that XSD is then binded with its concerned dataset at runtime. Dataset has around 10 tables from which two tables are concerned here.
PROC_CONS_SUBBILL_REPORT - Header Table with single row.
CON_T_SUBBILL_DTL - Detail table having multiple rows based on the VoucherNo of above table.
What I want
I need to display all records of detail table in tablular format based upon the VoucherNo. Say in detail table (SUBBILL_DTL), I am having 25 records, but when table is rendered on the rpt, its starts repeating itself, sometimes twice sometimes thrice.
Kindly note:
My SP is returning the expected and correct data
RPT has 5-6 SubReports and in one report PROC_CONS_SUBBILL_REPORT table is used.
There is no Relationships in the report in the form of keys.
What I did
Tried removing all keys between the tables.
Suppressed the Detail Section but it suppresses the entire data.
Suppress the detail section with formula
{CON_T_SUBBILL_REPORT.CODE}=previous( {CON_T_SUBBILL_REPORT.CODE})
but still its not working.
I am totally lost. Kindly help.
Normally records are duplicated when the linking is wrong, In your case instead of formula try to use the option Select Distinct Records under Database tab.
This is a little late, but in case somebody else is looking for an answer.
I tried all the things above and nothing worked. Crystal reports was changing my query.
It worked in SQL Server but not in Crystal Reports.
The way I fixed it was by creating a view of my query on Sql Server and using the view
in my Crystal Report. It fixed everything.

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!