Adding a new group in Crystal Reports causes all of my existing groups to disappear - crystal-reports

My problem in a nutshell: I create a new report, I insert a number of groups one at a time, and everything goes fine until I add the final group and suddenly I get zero results back for the entire report.
I'm new to Crystal Reports, so I'm not even sure I'm using the right vocabulary, and I'm sure this is one of the reasons I'm having such a hard time googling this. I have a book I'm going through (Pro VS 2005 Reporting Using SQL Server and Crystal Reports) but it's very specific about putting forth a set of steps to follow and it doesn't really explain the why of things.
I'm using VS 2005, C#, with built in Crystal Reports; I don't have a fancy stand alone version.
I am creating a DataSet and passing it into the report as the report Database. The DataSet has four tables: a user table (which includes a user Group ID), a course table with a list of courses that the user has taken, an exam details table with details about each exam in the course (including an exam score), and a topic details table, with information about exam topics (including a score for each topic on the exam).
I can add a user group group, a users group, a courses group, and an exam group, and return the details for each exam. But when I add a topic group everything disappears. If I add a topic group by itself I see a list of topics, but making the topic group an inner group of any other group only gives me a blank report.
I checked and I have relations defined between all my tables that should indicate which topic goes with which exam, etc.
Let me know if you need any additional information. I'm sure this is something simple that I'm overlooking because I don't have a dedicated Crystal Reports book.

Can you try and re-create the essential SQL that is being used, directly in the database? It sounds like you're getting data back until that last group is added, and that makes the query now return an empty set.

One of the remedies I found was removing underscore from sql fields, to keep the other tags from disappearing. I was initially having the field "abc_xyz" in sql, had to change it to "abcxyz" to make it work in crystal.

Related

Is it possible to set up a single Tableau workbook that pulls different data based on the user (or group)?

We use Tableau to create self-serve reports for various internal groups. The reports are identical in structure and style, but have different source data. As an example: European sales YTD and North American sales YTD.
For reasons we can't just have one workbook that each group then selects a dropdown for their data, they have to be separate workbooks. There are maybe a dozen of these.
We find ourselves constantly catching bugs or adding new components, and then having to go do it 10+ identical times in all the workbooks. Or worse, making a hot-fix and then not doing it for the others until it becomes an issue.
Ideally we'd make the change once in one master workbook and it'd cascade to all the others. Is something like that possible in Tableau?

Filemaker GetSummary from related table

I'm been using FM for the first time and have a need to use Get Summary on a financial information table. This generates various summaries of different income by customer, year and type. The layout generated from this table is good. The use of Get Summary allows me to do math with the various results, whereas sub summary totals by income type (as far as I know) cannot be added and divided by each other.
The problem I'm facing is that I wish now to create a layout based on customers and include some of the Get Summary detail from the financial table. Because my new layout is based on customers, I understand I cannot use Get Summary from financial as either a related field or in a portal.
The end game is simply to scroll through customer records, one after the other, and have key financial information show on their 'home' screen if you will, for years and type.
Any help gratefully appreciated. Thanks
I understand I cannot use Get Summary from financial as either a
related field or in a portal.
No, that's not quite correct. The GetSummary() function returns the sub-summary value by breakfield - if records are sorted by breakfield. Thus if the portal (or the underlying relationship) sorts the related records by type, you will see sub-summary values in the portal. However, you won't be able to see only sub-summary values, since a portal has no sub-summary parts.
There are other ways to show summarized related data. If you don't have (and don't expect to have) a large amount of records, considering filtering a (one-row) portal to show only a specific type of related records, then place the summary field inside it. Of course, this assumes the types are known in advance and unchanging.

Crystal Reports Sub reports repeating based on Parameter

I have a report with 4 seperate sub-reports embedded into it.
On the main report, I have a parameter to filter by group and I have it set to filter by group unless you choose All for the parameter, then it shows all groups.
If {?Main Group Name} = "ALL" then {Incident.Group Name} like "*"
else {Incident.Group Name} = {?Main Group Name}
This filter setup works fine on the individual sub reports, however if I run it selecting "all" as part of the main group, it causes the sheet to loop indefinitely and doesn't show the data properly.
The data is in all Group header 1 and group footer 1, so ideally the same page(as below) should repeat for every group.
When I run it for all, It runs for an abnormally long time, and has to be manually stopped, otherwise it just keeps going. After manually stopping, I get the following. It almost looks like it's trying to render all the groups on top of each other.
Anyone have a clue what could cause this?
Where are your subreports located in the main report (group header)? What are you doing with the record details of the main report (suppressing, I'm guessing)? What do the record selection formulas look like, FROM the subreports? How many tables are in the subreports? If multi-table, are your joins correct?
I have seen occurrences when subreports have a given Record Selection, and then have links added from the main report, where the resulting subreport query is totally hosed as Crystal Reports "helps" by modifying the subreport record selection on top of what the developer intended. True Story (a 17 second report was updated and ran for 20 hours before anyone noticed it had never finished a scheduled run). It sounds (heh, in inter-text) like you don't have correct relationships set up in the subreports, and may actually have cartesean products being formed.
Where are you using your code shown in your question? In the Record Selection? In an #Formula? What kind of link are you using to the subreport? What "should" be linked to the subreports is the {Incident.Group Name} -- as that is what changes in the main report group.
If you break out the subreports, and run them individually, manually setting the {?Main Group Name} to "ALL" and then to sample group names, what is the result? If the individual subreports still run on, you can at least watch the record counts (status bar) and when you manually kill the report, you can look at the performance information, and at the subreport Show Query.
Lastly, if you try running the main as "ALL" using a Top 10 (or 2, or whatever number you want) and then watch the subreport performance, that might give some clues. If there are selection-hosation byproducts, this would at least limit the effects a bit. You'd still be passing "*" to the subreport, but only doing it "N" cycles.
Sigh, and one last: If you really want "all", you might be better served if you use something like:
If {?Main Group Name} = "ALL" then TRUE
else {Incident.Group Name} = {?Main Group Name}
Sorry to be so long... I didn't have enough time to shorten it.
OK, really, really LAST one: If I have misunderstood your post, assumed too many disparate themes, or am just talking out of my hat: Sorry. Missed a meal, picked up several interruptions, and doubled up on the coffee. I'm sure there's a smiley for that, somewhere.
[Inserting add'l answer, as it is distinct enough to warrant it's own entry.]
I think I understand the Group Header/Foot Charts.
Did you try running Main as a Top 10 to limit the # groups?
How big is the (chart) record set?
AND, is the report set up for asynchronous queries?
What IS going on in the subreports:
Complex query?
Simple query?
Suppressing all Details and just showing the Chart?
Going to a different table/database?
Table joins?
Run for "Top 10" Groups in main, wait until it ends, then check for the Main and each chart sub (for at least a few groups):
Report / Performance Information:
Total Number of Records -- (Main should be "Top 10" )
Performance Timing:
Run the Query,
Read Database Records,
Time to Format All Charts
or
Time to Format 1st Page.
If you have several millions of records, even with "top", it could take a while to read and calculate the top. If you are calling charting, even tho' it is for a single Group per chart, if the subreport still has to apply a linked query, parse millions of records, perform add'l calculations, create a chart (that still accounts for all records), etc., it can just be a long time running.
You may find that a small "All" Top "n" will show a lot of time being spent behind the scenes, and that allowing the whole report to run that the add'l Comparison of Ticket Counts is displayed. And if not, we can look at that later (mainly by opening up the corpse and looking inside).
I am trying to ascertain regular behaviour, and I can't get a requirements doc for review. I can only make assumptions and ask questions and make suggestions.

CRM 2011 and SSRS - Generating a report for a single record

Is it at all possible using CRM 2011 and SSRS to generate a report on a single record, and only get results for that one record?
EDIT
Additional Info - Must Use:
Custom SSRS report
Custom entity in CRM
Here's a more specific link to your question: link. You're probably looking for pre-filtering (look for "3. Pre-filtering Element" in the link provided) if you want the report to be record specific (context sensitive).
Here's a link describing the 2 types of pre-filters (CRM 4.0 but the theory applies to CRM 2011): link. And here's an example of prefiltering in CRM 2011: link
I have done this successfully in CRM 2011 with a completely custom report made in BIDS, on a custom entity, with full context sensitivity.
Make sure to learn fetchXML as it's going to be the going forward technology for these reports. The existing reports are using SQL which make them bad examples to copy off of.
Here's an example on how to extract fetchXML from an advanced find: link It also has more information on pre-filtering.
Take a look a the report Account Overview.rdl. It could be executed for a single account record or multiple records.
See Reporting for Microsoft Dynamics CRM Using Microsoft SQL Server Reporting Services
Create an embedded connection to the CRM database engine for the environment you want to target.
Create an embedded dataset to query the current record. This going to be kind of weird since experience will tell you that you are going to get tons of records, but because of the clunkiness behind CRM it will actually only get the current record. For example, if you wanted to get the current quote you would use "SELECT quoteid FROM FilteredQuote AS CRMAF_Quote"
Add a parameter to store the reference to the entity you just queried. In keeping with this example I created #QuoteFilter which is type text, could store multiple values (even though that's not what we're using it for), and gets its default value from the dataset in step 2. Also, probably ought to make this hidden since GUIDs aren't end user friendly.
Finally, use the parameter discovered in the where clause of the other datasets. For example, a search on quote products for the current quote would look something like SELECT * FROM FilteredQuoteDetail WHERE (quoteid = #QuoteFilter)
As a final note, you should keep in mind that CRM loves to remember everything even when you don't want it, too. On one of my reports I messed up my datasource and CRM was forever convinced that the report should run against all records. I fixed my datasource, but uploading the report did not trigger a refresh and correct the problem. In the end, I deleted the report from CRM, created a new one, uploaded the same exact file with no changes, and everything worked. Go figure.

Crystal Reports - No rowset was returned for this table, query or procedure - Crash!

I am using Crystal Reports 8.0.1.0 and have an OLEDB connection set as "favourite".
We have several reports being run against a few stored procedures on the database.
Our database is an SQLExpress 2005 named instance.
One of the reports deals with balance, i.e. we have to provide a balance report for a specific company or set of companies.
The customer, however, has specifically asked us to have a separate section to be the last one for a specific economic account typology and in order to do this, we have to separate this one from the others which are instead displayed using two parallel subreports.
Hence our structure should be like follows:
GENERAL HEADING
PATRIMONIAL STATE
...data...
ECONOMIC COUNTS
...data...
THIRD-PARTY EFFECTS
...data...
The first two sections below the general heading are achieved with two parallel subreports, so now we have to display the third section.
Is it clear up to now? Well, as you may well be aware, CR subreports require you to set the database location, regardless if you have set one up already for main report.
The problem, however, is that if I try to set the location pointing to our stored procedure(which returns ALL the data for the balance report), the first time it will display the message in subject, and the second time again, but this time it'll also crash.
Our stored procedure has a parameter and both previous subreports(the ones in parallel) are set to the same SP and are working flawlessly.
This crash makes it impossible for me to work on the third section and I'm pretty much at loss as to what would be the best approach to solve the issue at hand.
Any ideas/suggestions?
I would love to receive your answers and I hope my problem was clear enough(I'm very willing to further delve into it for clarification if ever needed).
Thank you so much for your time,
Andrea Raimondi
Geez... changing the connection from OLEDB to SQLServer it correctly fetches the rowset and doesn't crash!
I am speechless.
Andrew