Is it possible to convert three row in section details of a crystal report to three column - crystal-reports

Is it possible to convert three row of section details in crystal report to three column?

If i understand your question correctly, Yes it is possible. There are 2 ways:
1) Using CrossTabs.
2) At data level using SQL Pivot.
1) Using Crosstabs:
http://reportsyouneed.com/understanding-crystal-cross-tabs-part-1/
Cross tab 2
Cross tab 3
2) Using SQL Pivot:
Pivot 1
Pivot 2
Almost what you want
There are may other resources.
Hope it helps

Related

Crystal report Cross-Tab order by another column

I've made a crosstab in crystal report like below:
However, as you can see, the ordering is weirld (i.e. the correct one should be like below:)
And the ordering is stored in another field called order, I took a look in the crystal report's cross-tab expert sorting option, it doesn't allow me to order by another column, it only allows me to sort either ascending or descending, how can I set the ordering by another column?
Crosstab's sorting is based on the rows order, if you want to sort it in your on you have to add some extra rows and have to suppress subtotal and Label in Customize Style of Crosstab Expert
Example:
If you have 3 rows(A,B,C) to display and you have to sort it in order like B,C,A then you have to add 2 new rows(B,C) now your Crosstab looks like (B,C,A,B,C) now you have to suppress Rows B and C you meet your both requirements for sorting and display order
But This solution have some limitations like
if you want to export the report in Excel then it will add extra cells in grand total.
otherwise you are good to go.
Example:
If you have 3 rows(A,B,C) to display and you added one row and you suppress it to solve your sorting issue then in Excel its grand total looks like
A B C
a 1 3
b 2 2
---------------------------
Total: 3 5
Yes, you can not sort on another column. You must use any of one column as a header.
In Crystal report, sorting happened based on header column's value (That's why you see as per alphabetic).
I also face this issue and how I solved, that I am explain. You have to use a formula which have order, but either hide it or use a value like in this link.
https://scn.sap.com/thread/3341846
Second option as per this link. (I think first you check this)
http://www.codeproject.com/Tips/493334/Custom-sorting-for-Crystal-Report-Cross-Tab
https://scn.sap.com/thread/1172741
open crosstab expert, highlight the column that you want to reorder, go to Group Options and select in specified order. This will open another tab where you will have your available values listed there. Using the arrows on the right side you can move up or down your values and accommodate them in the order you want them to be displayed.
Simple way would be take order column from stored procedure to cross tab and set the order according to that column.
Then supress the order column and reduce the width of that column to minimum pixel so that it doesn't appear in cross tab.
Make the field you want to sort by a group field and hide it. To hide it, in the Crosstab Expert > Customize Style dialog select this group then use the Group Options area to Suppress Subtotal and Supress Label. Worked for me.
Use the order field as the grouping column and change the label for said column to show the actual sizes. The labels can be changed in Crosstab Expert, Grouping Options and then the tab Options.

Crosstab two columns under one column header Crystal Report

I want to create a report like
in crystal report cross tab.
The Table has the following data .
I can get the report with three expected columns like SELF, 50% and 75%.
and their output look like
But my requirement is to use Increases and NPCalculated Columns under Main Column as mentioned in pic 1 above.
Note: I used the NPCalculated in Summarized Fields but It gives me out like NPCalculated Value comes under Increases Value but It should be side by side as per my requirement.
First I add NPCalculated column in Summarized field and now I have two summarized fields. Next, right-click one of the summary cells > Summarized Field lables > Summarize horizontally.

IBM Cognos - How can I place 2 crosstabs under 1 section?

I'd like to have two crosstabs grouped with 1 section similar to this
Region A
Crosstab1
Crosstab2
Region B
Crosstab 1
Crosstab 2
Region c.... etc..
How can I accomplish this?
Thanks!
Create Crosstab 1
Section on Region
Unlock the report
Create Crosstab 2 underneath Crosstab 1, but within the "Section" container
Create a Master-Detail relationship in Crosstab 2 to match Crosstab 1 (I find it's useful to turn the icon for these on via Tools->Visual Aids
Note the Crosstabs will format separately; you may find adding fixed widths on the columns may help presentation

Crystal Reports 7 CrossTab Suppress Column

I'm trying to modify a report created in Crystal Reports 7 (which I know almost nothing about). I want to use a CrossTab, as this seems to be the best way to accomplish what I want. I have a column with three possible values: A, B, C. The cross tab creates three columns. I want to suppress C. How can I do this?
Also, is there anyway to create rows based on one field (i.e. a PK value), but display another - like a description? For example, if a list of states have a PK value of 1-50, I want them ordered by PK, but I want to display the state name.
All you ask is possible;
i suggest not to use cross tab: cross tab is intended for an uknown number of rows and columns (varying on data) ad for summarizing (max value, sum of values) results on a grid.
you should, instead:
Create a blank report
Drop the fields from the Field explrorer into the Details Section (just A and B columns)
Use Report Sort Expert to sort elements no the PK value

Japerreport/ireport how to pass parameter from main report to dataset

I have a problem to pass parameter to dataset. My report is following:
MAIN REPORT query:
select distinct id_satellite from report.t_tmp_report_param where id_session = $P{id_session} order by id_satellite
(id_satellite is integer)
this query extracts at least two values: (i.e.) 3 and 4. I need these values to build details band (in this case 2 bands).
DATASET query:
select cn0 as x, elevation as y from mytable where id_satellite = ????
I should replace the question marks with the value extracted from MAIN REPORT query, and so before 3 and after 4.
How can I fix this problem?
Thanks for reply. My problem is on XY Line Chart, because, jasper builds two detail band, but in the two graphs, there is only one satellite (last satellite, in my example=4). I have in detail band a table too. The values on table are correct. It's very strange...
I've only tried it with subreports. But this article describes the solution to your question.