Crystal Reports: ? Possible to show Full Set in one chart, and subsets in separate charts? - crystal-reports

In Crystal Reports, is there a way to get both full set charting and subset charting, in the report headers?
I'm working on a report from an erstwhile co-worker and I'm still trying to make things "better".
While I haven't found the solution to accruing time
( see Accruing over time (non-overlapping) - technique? )
I'll press on with how to use the resulting data once I retrieve it.
The report is a Global Availability report for network technologies, and part of the report is graphic:
Chart availability for different
network types for last "n" months'
time.
Charts availability for each region
(for each network type for "n"
months' time).
She (co-worker) had a global chart, but for each region, she did a separate sub-report containing just the chart for that region. The query isn't optimal, and using the sub-reports, the query is repeated each time.
If there a way to use a single data-set in one report for all five charts, forcing the four regional charts to display only that region's data?
Additional info:
The charts are all Bar charts, design is
y-axis: calculated availability
x-axis: Group by network type (Switches, Trunks, "Network)
sub group by month
Bad Example:

Let me see if I understand this. In your Report Header, you have 5 Subreports for the 4 regional graphs and the global graph. And you want to collapse this all into 1 Subreport if possible?
Yes, but you can't do it like in your image where United States & Europe are side-by-side. They would have to be 1 per row. Also, the datasource also has to be formatted correctly. To do this,
Make a new subreport. Group it by the Region.
In this subreport, make your regional graph in the Group Header section.
In this subreport, also make your global graph in the Report Header section.
Insert this subreport into your main report and you should be done.

Sometimes, the only way out of the fire is through it.
After lots of un-satisfactory refactoring, I spoke with the original (years ago) requestor and got some good information. I have yet to speak to the most recent requestor again (who didn't have any knowledge of the technical requirements the last several times).
Spoke w/ the guy who is tending a related db, and I get permission to add come functions, views, store procedures, etc. to THAT db... Within reason and after code/perf review -- something that isn't normally conducted, so I welcome it. I WILL have the ability to do the procedural stuff through... a procedure. Written as a stand-alone, I should be able to re-use it for any of the queries against future needs.
And... Yes, I am pretty much going to have to (read "get to") re-design, and hopefully get rid of most of the sub-reports. Yeay, me.
Thanks for coming along for the ride.

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?

Display multiple columns in a group header with charts

I want charts generated for each group to appear in a multi-column format in one group header. I could do it with subreports, but I'm looking for a solution that doesn't require me to load the data set multiple times. How can I achieve this?
Long story short, Crystal isn't a good fit for this.
Even if the number of groups wasn't variable, Crystal reports is fixated on delivering and iterating your records from top to bottom. It's not impossible to structure that, but it would be way more work than it's worth. Plus you'd waste too much time handling the variable number of charts and ensuring unused ones were suppressed. And even then, you'd probably need to use subreports.
You'd have better luck using something other than Crystal for generating this behavior. Even if it meant creating a subreport for the chart and writing a VS program that displayed that report multiple times for each "Group".

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.

Composite reporting, Crystal Reports difficult to manage

I was wondering if someone had a suggestion on how to best do composite reporting.
I have tried to accomplish this with Crystal Reports [CR] (The one that comes with VS2k8) but for a codemonkey like me, it's hard to grasp the design part...
I have found that CR works nicely for reporting on tabular and repeatable data, but I can't grasp how to do what I want it to do.
What I want is a nice front-page, with title, subtitle and possibly some other text.
Maybe a TOC.
A summary report, consisting of some calculations and text-summaries calculated beforehand (not using the reporting tool).
Then a listing of one type of data, normal tabular.
Then another type of data, also tabular.
Then a drill-down on the first type of data. (Every "line" in the first type has 1..* associated items).
It looks to me like I have to do them all in separate reports, then "concatenate" the resulting reports to one another to get one report. And the front-page and the summary page I have no idea how to do at all.
Is there a better tool for doing this? Or does anyone have a good "quick-start" on composite reporting with CR? :)
EDIT: Oh, and these will only be used in printed-form. So no dynamic drill-down and such are necessary.
I create sub-reports and insert them into a footer section of the main report to create composite reports, using seperate reports as you suggest. I've searched myself, and failed to find any reasonable alternative. This approach works well enough and results in a single report file when done.
In my experience, Crystal is a pain in the butt for doing anything like a fixed page layout (ie: the title page). I usually put the title page in the report header (make sure to select "new page after" in the section options). Everything else pretty much has to go into subreports.
If you need to share totals and such between subreports, you need to use a shared variable in a formula field:
shared numbervar whateverTotal:= sum({whatever});
and then in the following reports, just use:
shared numbervar whateverTotal;

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