I want to produce 2 pie charts in SSRS. One report on each page - ssrs-2008

I want to produce 2 pie charts in SSRS. One report on each page for each doctor.
Here is my query:
select booked, status, doctor from PieTest order by doctor
booked status doctor
------ ------ --------
Traditional OK Doe MD, John
Traditional OK Doe MD, John
Online No Show Doe MD, John
Online Cancel by Staff Doe MD, John
Online OK Doe MD, John
Traditional OK William MD, Liz
Online OK William MD, Liz
Online No Show William MD, Liz
Online Cancel by Online William MD, Liz
Online Cancel by Staff William MD, Liz

Create a matrix with Doctor as your row group, enlarge the 'data' textbox so the chart will fit into it and delete the column group.
Create your chart and then drag and drop it into the matrix.

Related

Crystal Reports: multiple columns by group

I am working on a report that and by using Format with multiple columns and Format groups with multiple columns, the report displays data like this.
station 1 Station 4
Mike Barry
Sam Jim
Abe Gary
Station 2
Ruth
Ben
Karim
Station 3
Cat
Billy
Erin
And so on. The report is grouped by the station and I want the report to display data like this.
Station 1 Station 2 Station 3 Station 4
Mike Ruth Cat Barry
sam Ben Billy Jim
Abe Karim Erin Gary
I looked through the search information but did not find a way for me to list the group and the data side by side.
Open the section expert, layout, print direction, set "Across then Down".
Adjust the width of the section to fit 4 columns.
I figured it out. I needed to insert a group footer (not suppress it), and have it set to "print at bottom of page."

How to build a 'negative list' with crystal report

I just started to use crystal report and struggling about some kind of negative list building.
I am getting two input lists into crystal report and as a result I like to output a list of items, which are not included in both lists.
Example:
List 1 contains Peter, John, Alice, Mary and Tom
List 2 contains Peter and Mary
My result list should show John, Alice and Tom
How can I do this with crystal report?
If by LIST you mean database table, use an Outer Join from A to B and apply a record selection criterion of: IsNull(B.some_column)

Sphins Regexp maps to only single words

I am trying to map regexp so when a user enters a specific word I force them to choose a specific other term in the table.
For instance I have as simple example fields:
Bob
Bob Smith
Bob Jones
Sally
Sally Smith
Sally Jones
If I do
regexp_filter=Bob>Bob Smith to make sure when a user simply enters Bob I push Bob Smith instead and then do a sphinql search:
Select * from Index where MATCH('Bob')
I still get all the Bob records (in other words it did not interpret as Bob Smith
However if I dod
regexp_filter=Bob=>Sally
Then Select * from Index where MATCH('Bob') returns all the Sally records.
I am "simply" trying to force the index to return the Bob Jones record should a user simply search on Bob.
FYI I did try
Select * from Index where MATCH('^Bob$')
and that returned NULL
I still get all the Bob records (in other words it did not interpret as Bob Smith
Because the regex is applied to BOTH the query text and document text during indexing. So becomes MATCH('Bob Smith'), but your documents also become
Bob Smith
Bob Smith Smith
Bob Smith Jones
... so your query, matches all three documents, same if didnt have the regex!
I am "simply" trying to force the index to return the Bob Jones record should a user simply search on Bob.
Wonder if you meaning should NOT return ?
... in which case can use MATCH('^Bob$') but rememeber to remove the regex. Or could perhaps use MATCH('"^Bob$"') an extra set of quotes to use phrase mode.
Try also MATCH('^Bob$ ') with a space! some versions of sphinx has a bug unless a space after the $!

Crystal Reports Rows in Group

I have a report grouped by Supplier. In the details section for this group, there are customer names with other fields of information. The problem is that a customer may be listed several times, but I only want one record to show per customer.
Supplier
John Doe 10/15 $25.00 Eggs
John Doe 10/15 $29.00 Milk
Susan Weva 10/12 $15.00 Corn
Susan Weva 10/18 $11.00 Bread
What I want is one complete row for John Doe and one for Susan Weva. Any idea as to how I can do this? I tried to suppress each field, but that did not seem to work.
There is one way (which i use in this situations) and it work.
So your data looks like this
John Doe 10/15 $25.00 Eggs
John Doe 10/15 $29.00 Milk
Susan Weva 10/12 $15.00 Corn
Susan Weva 10/18 $11.00 Bread
From what i have understand you want to have your output like
John Doe some columns
Susan Weva some columns
To show it only once per group put fields in group header or group footer. In your case all other columns are different and you should "summarize" those fields. For field price is easy, just do summarize by group and you have for each person amount. But dates and last columns makes a problem. So you should learn about using Cross-tab to solve this problem. If you need only sum of price, then put fields in group header or group footer and it will be show only once per group.
Hope it helps

Transposing Row Data as Columns in Crystal Reports

I have the following data returned from a stored procedure
Staff Category Amount
----- ------- ------
Bob Art 123
Bob Sport 777
Bob Music 342
Jeff Art 0
Jeff Sport 11
Jeff Music 27
All Categories will always be returned for all Staff even is the Amount is zero
What I want to do on my Crystal Report is output this:-
Staff Art Sport Music
----- --- ----- -----
Bob 123 777 342
Jeff 0 11 27
I effectively want to Transpose the data in the Category rows as headers or columns in my report.
I do not want to use a Cross Tab as I have other things I need to add which will not fit nicely into a Cross Tab
Any thoughts on how I can do this in Crystal? I'm using version 11
Should be able to achive this in your sproc with a PIVOT Table. A helpfile on PIVOT tables can be found here
Group the report by staff and place staff, Art, Sport, Music as text fields in Group header.
now in details section place data as
Staff, formula 1 (If Category='Art' then Amount), formula 2 (If Category='Sport' then Amount), formula 3 (If Category='Music' then Amount)
If Staff has only one value then its ok else place Staff in Group footer and take sum of all values in group footer (Don't remove Formula 1,2,3 from details)