Oracle APEX calculated field is not shown on the report - apex

In my report I am pulling data from 2 tables and I want to display a calculated column. If I run the query in SQL Workshop, it works as desired but in the report calculated column does not get displayed.
Can annyone tell me what am I doing wrong? Perhaps there is a better way to accomplish what I want?
select "T1"."Table2_ID",
"T2"."Title",
"T1"."PRICE",
"T1"."QTY",
TO_CHAR("T1"."QTY" * "T1"."PRICE", '$999.99') AS TOTAL_PRICE
from "Table1" "T1",
"Table2" "T2"
where "T1"."Table2_ID" = "T2"."ID"
Column type on the report is listed as plain text.

Is it an interactive report? If so,
run the report
go to "Actions" menu
Columns
include the newly added column into the displayed column list
If not, what is it?

Related

jasper report show count on footer of a specific query

am very new to jasper report
also I have tried looking at videos but can not seem to get this one concept
basically there is this main query which i have
select * from table
which is populated in the details area
however i want a second query
select count(*) from table where name = "tim"
and put the count on the footer
can this be done using jasper
any tutorial to this concept or guidance would be helpful
to sum up the details area should show all the data where as the footer should only show counts of a few things.
You can only have one DataSet (therefore query) for the report. In your case this is your main report select * from table, which seems to be working well.
You have two options for adding the information you want:
(and I would say the better option) is to add a variable $V{tim_count} which is configured as:
initial value 0
expression value "tim".equals($F{name}) ? 1 : 0"
calculation function sum
there are multiple ways to increment this variable, so I'll leave that with you. In the footer you would then add a text field with the $V{tim_count} variable as it's contents.
You can read about variables here https://community.jaspersoft.com/wiki/variables
You can add an object that has it's own DataSet:
Table
List
Subreport
You would then be able to add your query to that object and display it appropriately. As you can see, displaying a COUNT is not really the most appropriate way to do this.
Note - I don't suggest this way

Can't select command field which type is memo

I'm working on a crystal report and I want to insert a pie chart that shows percentages. I have a view that contains the field that I'm interested in : Descr(descrtiption) (NVARCHAR), I successfully added a command that gets the number of occurences of each Description. The problem is that when I try to add that field to the chart I can't see it,
here is the query that gets the values
here is the chart expert window I get
and as you can see the field is not checked in the field explorer
You will need to shorten the memo field to be able to use it in this manner. Try:
CAST(Desc AS NVARCHAR(2000))
Use Having clause instead of where condition in query.
Select count(*) as NBoccurrence,descr
From tbl_nm
Group by descr
Having your condition

SSRS Report Group

I want to get a tabular result like below
My query is returning the result like below
Can anyone suggest me a way to do this using SSRS?
I have tried grouping, but couldn't get the expected output. I am new to ssrs reporting. Please provide a detailed solution for this
Set up a Tablix, grouped by Doctor Code, and add a Group Header row based on this group. Display all fields in this row except Product Sampled.
In the Product Sampled Textbox, insert a Tablix directly into the Textbox. Set this Tablix up to show only one detail row, set to display Product Sampled.
What this achieves is that you have one row per Doctor Code, but within each of these group rows you will have a table embedded to display each of the Product Sampled rows. Because the Product Sampled Tablix is embedded in a Group scope, it will display the Product Sampled details for each Doctor Code as required.
Edit after comment:
I will demonstrate with a simplified example. First generate some sample data:
Next, set up a table with a group based on DoctorCode, which will look something like this:
Note we haven't filled in ProductSampled yet.
Next, go to Toolbox and drag a table object into the blank ProductSampled cell. Remove the header and all but one of the columns, then set the column in the table to the ProductSampled field. It should look something like this:
When you run this report with the sample data, it works as required:

Is there a way to select records from text parameters after run time in Crystal Reports?

I need to design a crystal report with 3 columns. Column 1 is a text box in the report, and column 2 and column 3 are datafields from a particular table.
Is it possible for me to use column1 as a parameter that would help me to fetch the other columns from the database??
col1 col2 col3
TextBox value1 value2
so when a user changes the value in TextBox, col2 and col3 value should reflect based on textbox value.
Or is there any other way in which i can achieve this??
There is no way to interact with a report the way you want via text boxes after the report has run. Since you can't select records on the fly, you'll have to create a report parameter of the same type as your primary keys (column A) and then set it to "Allow multiple values". You'll be able to select only the records you're looking for at run time by adding {table.colA} in {?Parameter1} into your Record Selection formula.
Drop {table.colA} and {table.ColB} into the Details section of the report. Now when you run it you can just add your 15 items as the parameter and you'll get what you're looking for.
Alternatively, if its important for the user to interact with the report after it's presented, you could accomplish this using (1) sections/grouping and Crystal's Hide option or (2) an on-demand subreport.
For example, you could group by column1, and then print a detail section for all the values. Mark the detail section Hide. Then, when you click on the value, that section will expand.
Or instead of marking it Hide, mark the group footer (for column1) New Page After Section. Then you can use the document tree along the left side to navigate to the page containing the values you're interested in seeing.

Hide row in Crystal Reports Crosstab

Is it possible to hide a row in a crystal reports crosstab?
I have two rows that are only used to calculate a third row and I would like to hide them so only the result is visible to the user.
I have similar problem. I want to display only rows that have specific values and ignore all others.
Here was my solution:
Open Cross-Tab Expert. In Cross-Tab under Rows select your row which should be conditional suppressed. Then select Group Options. This will open Cross-Tab Group Options dialog. Go to Specified Order and add filter. In this case, rows that match your criteria will be displayed in your cross-table all other rows will be placed in one row "Others". Then select tab Others and check Discard all others.
Not directly. I recommend grouping by a custom formula.
For example, let's say you have a crosstab that is grouped by StoreName. StoreName has values groups "A", "B", and "C". You want to combine "B" and "C".
Make a new formula field. Call it StoreName_Combined. In your new formula, enter:
If {StoreName}="B" or {StoreName}="C" then "B+C" else {StoreName}
In your crosstab, use StoreName_Combined instead of StoreName.
Edit
If you look around a little, you may also think about using Cross-Tab Expert->Group Options->Options->Use a Formula as a Group Name, but I couldn't get it to work. The rows stay separate, they just have the same name, which doesn't really help.