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.
Related
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.
I am not a Crystal Reports developer.
In a legacy Crystal Report, I have been asked to find out why some Rows of data are being excluded from the Report Output at run time.
I copied the SQL behind the report and when I ran it in SQL Server Management Studio, those rows are not excluded. This is what leads me to conclude that there is a filter in the report itself that is excluding certain rows.
My question:
What are the different places in Crystal Reports 11 that I should look to find if any filtering is going on at run time?
I have looked at Formula fields, Selection formulas, Parameter Fields ... but though I have seen various code in those places, I have not found anything that looks like it will limit the output.
I would appreciate any pointers/suggestions.
Besides section suppression, look at:
Report, Selection Formula, Record...
Report, Selection Formula, Group...
Database joins
If the report SQL is the same as the one you checked in SSMS (including record selection formula , which will be the WHERE clause) , check report's details section suppression formula. A details row might be suppressed based on some row values
I want to save customer's page (space) and I'm sure each bill will not have more than 4-5 records in detail section. I'm having exactly same issue posted on below URL, can anybody help me on this?
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=14981
Note: I'm using crystal report for visual studio 2012.
The problem you will not solve easily since you will have the problem to enforce a fix height of this sections but having dynamic number of records. I guess you will need to work with fix-height detail bands in sub reports and you will need to ensure that all customers will have the same count of detail records. There fore, you may need to make a temporary print table that you use to insert empty-records.
You need to work with a sub report and you need to work with a multi-column layout (with two columns) in the main report.
The main report will only select the main record, not the detail records.
In the sub-report, you need to select the temporary detail table which ensures that all customers have the same detail record count and that the sub report will have the A6 height with that fix record count.
No good solution, but I guess any solution will require some temporary prepared data...
I'm trying to create a report using iReport-3.6.7 IDE. I've added a dataset which I used for filling the values into a Table in the report's Details section. Everything is fine with the report compilation. But problem is that when I run the report in the IDE, it displays entire values as much is the number of tuples in the source table. i.e. if my table in source database has 16 tuples, then in iRepoort IDE the table is repeated 16 times. Please, don't tell me I'd place it in other sections e.g. Table Header, Table Footer, etc.
The problem was caused due to my bad approach to report design. Since everything we put into the Detail band of iReport gets populated at run-time, my table (which I'd put in Detail band of report) got populated as many times as of the tuple returned by the report's query.
I had the same problem, I fix it, editing the query SQL in the subreport 1 in the header space, ande the supreport2 in the detail space, if your table is large and you put in the header space , then will give you an error like this "infinite loop creating new page due to column header overflow"
make false "print Repeated value" By Selecting particular Field
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.