Crystal Report- How can i count records of users from different related tables? - crystal-reports

I am using Crystal Report2008.I have user table, this table is linked with other table such as devises, photos, videos, emails, notes, texts by its Uid and users have record in all different tables. I want a report which shows that how many record each user has in each table.
I am also getting this error: "More than one data source or a stored procedure has been used in this report. please make sure that no SQL Expression is added an no server-side group-by is performed."
Thank You

With the tables linked, it is not possible to get an accurate count. Your joins will affect how many records are returned.
You need to write one report for each table. If there's a need to see the numbers all on one page, you could write a subreport for each table then put the subreports all together on one page.

Related

Crystal Reports Filtering and Organizing data

I am writing a small Crystal Report using 2 tables (TICKET,HISTORY,CUSTOMER) from a database I was given access to. I do not have access to modify the database tables to correct the issue and I am looking to see if this is possible.
The TICKET table is my main table and has a 1 to Many relation to HISTORY table.
The CUSTOMER table has 1 to Many relation to the TICKET table.
Inside the HISTORY table, there is column called Version. Every time a HISTORY entry is added on a TICKET, the Version number is written into this field, ie 21.4, 19.7, etc.
Ideally, the version would be better suited attached to the CUSTOMER table once the entry was added into the HISTORY table, but that change has not been made.
What I am trying to do with my report is group and display my results as follows:
Version Number
Customer Name
I can get this far, but the issue I am running into is, I only want to show the customer on their latest version number and suppress all previous records so I can get an accurate count of how many and which customers are on each version. Is this possible to do?
If you are allowed to create a VIEW in the database, create one that joins Ticket to History, groups on Ticket ID, and returns the Ticket ID and the Max of the Version.
In Crystal, you can then simply joint to that View.

Linking tables where record in one table has a prefix and other does not

I am creating a report which will allow me to reprint invoices using information from two different tables from Sage 300 accounting/job costing sofware.
I have one table that has an invoice number of "123456" and another table that has an invoice number of "SM123456" referring to the same invoice. The second tables adds the "SM" so that it knows that the invoices was sourced from a particular module. Is there any way to link these?
I have tried creating a report with a formula to remove the SM from one of the tables so that it can be linked to a subreport. However the subreport that I want to print is already using subreports and the second tier subreports are not printing data that is needed.
I am open to any other suggestions.
Thank you,

Removing duplicate record text but keeping unique values

In our system, it shows each charge as a record, despite the account being the same.
Crystal reports image
How would I go about doing this?
Also, is there a way to show it like this even though they are all seperate records?
Option 2
You can solve this using sub reports.
In main report take distinct record and place the fields Account and city in detail section.
Now take sub report and place it after the first 2 columns in detail section but take care that you won't select the option distinct records that means you retrieve all records. In sub report place Charge type, charge fields

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

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.