How to sort prompt values in a Webi report? - sorting

I have prompt for Fiscal Month in my Webi Report. I want to custom sort it so that the month starts with April, May, June , etc.
How is this possible?
Thanks
Niki

I tried many ways like adding LOVs and managing to sort the values at prompt, etc. But in BO 4.1, How we should do is,
1.Click on Parameters and List of Values.
In Edit SQL write the query with order by so that we get the order. for eg. select distinct fiscal_month,fiscal_month_number from calender_table order by fiscal_month_number.
Validate the query.
In Properties tab, check for hiding fiscal_month_number and give a appropriate name for fiscal_month column.
Now in Business Layer, select the dimension we created for fiscal_month, in Advanced Tab, add the List of Value that is created.
Thanks
Niki

Related

show selected columns of table in QlikView

I am creating a Dashboard in QlikView, allowing the user to extract data based on the filters and selected columns. Requirments are below.
“Data Extract” table MUST be empty (even no column names are showed)at first!
Clicking the blue button shows the list of data available.
A table will then show those selected columns.
Does someone know how to do these?
Screenshot:
You need to set a conditional expression on each of your dimension and measures.
A simple example would be to have an ID for each measure, here the measure "NetSales" can be referenced by MeasureID "a".
Measure | MeasureID
NetSales | a
In the conditional expression for NetSales you can have:
=if(IsNull(GetFieldSelections(Measure)),0,SubStringCount(Concat(MeasureID, '|'), 'a'))
This will check the possible MeasureIDs and return 1 if NetSales is selected.
You need to create a "floating" tables with the dimensions & expressions you need to use in the table object:
Here is an example I made : https://ufile.io/j20am (just reload the file If you use personal edition)

SSRS sort not working

On a number of reports I have noticed that setting sort options through the tablix properties does not work. I choose the data I'd like to sort by (date) and set the option (Z to A), but the report still shows unsorted. Has anyone else seen this issue? I have read that updating the report xml to include the sort may be what needs to be done because the report builder does not preserve the changes made. Haven't gone down that road yet as I'm looking to see if there's a fix already identified.
Date Type Lead Name State distance Consultant ZIP State 1 Level Reason url
Those are the columns from the export with data filling each column. Can't give too much info because it shows phone numbers and addresses.
One option is to sort the data in your dataset. Then you can leave it and SSRS will honor that.
As the others mentioned, make sure you check the datatype so it's not trying to sort the dates as a string.
Set the sort priorities at the group level, not on the table or dataset properties.
You should never have to edit the XML to get this to work. This is a basic built-in feature that most reports use.
Do you have groups on your tablix? if yes, did you try sorting it with the Row Groups or Column Groups at bottom instead of the sorting properties of the tablix?

Crystal Reports group sorting

I have flight data records for each user. The table below shows an example for one user id. I need to group by user_id (show only one row for each user_id) that has the latest flight_date.
When I added grouping by user_id, the result report displays the right flight date, but the rest of the fields come from the last row for each user (highlighted fields).How do I make it show the entire row with the latest date (4th row in my example)? Thank you!
If you only want to see the most recent record, per userID, based on the flightdate, there are a few options. The most efficient way is to use a custom SQL command, but Crystal can do it by retrieving all of the records, and then suppressing the records you don't want to see.
1.Group the report by USERID (Report > Group Expert > Add the USERID field to the group section)
2. Sort the records by FlightDate ( Report > Sort Expert > Add FlightDate and select Descending NOTE: if FlightDate is not a date, we will need to create a formula to convert it into a date first, otherwise Crystal will treat it as a string and 12/2015 will be higher than 1/2016 (for example)
3.Create a running total to count the number of records within each group (This is how we will tell Crystal to suppress the records we don't want)
--Right click "running Total" on the right hand side, select New. Name it whatever you want; under Field To Summarize add FlightDate, change summary to COUNT
Leave Evaluate as "For Each Record"
Under Reset, select On Change of Group and select the group for USERID
The report should look like this
In the Section Expert, select Details and click the formula button next to "Suppress"
Enter the formula {#RecountCount} > 1 (Or whatever name your running total has)
Now you should only see one record for each user

Crystal Reports - Sorting two different date fields chronologically

I've got two date fields from two tables and I'm trying to show receipts of POs in line with work order consumption sorted chronologically.
Is there any way to sort two date fields together?
For instance:
1/1/14 work order date
1/5/14 work order date
1/7/14 PO receipt date
1/9/14 work order date
1/20/14 work order date
The two fields are 'duedate' from table 'porel' and 'reqdate' from table 'jobmtl'
Usually the simplest solution in such cases is to perform the ordering at the server side (e.g. using SQL Server stored procedure, Access query, etc.), and then use the stored procedure or query as the source for the data.
An alternative that I read about is to create global variables in the report, assign your dates values to these variables using 'WhilePrintingRecords;' in formula fields, and using these variables that then does the actual reporting for you.
Slightly complicated.
Another solution which I am not sure if applies to you is :
Click on the main menu > Report > Record Sort Expert
Select your date field in the box on the left and add it to the box on the right
Check the Ascending checkbox and click Ok
Let us know how it goes.
you should create a formula saying
if (table1.duedate = null) then
{table2.duedate}
else
{table1.duedate}
Then sort on this formula. Check the syntax yourself.

Passing more than 3 items in a reports column link

I have a report that is listing students and I want a column to edit a student. I've done so by following this answer:
How do you add an edit button to each row in a report in Oracle APEX?
However, I can only seem to pass 3 items and there's no option to add more. I took a screenshot to explain more:
I need to pass 8 values, how can I do that?
Thanks!
Normally, for this you would only pass the Primary Key columns (here looks like #RECORD_NUMBER# only). The page that you send the person to would then load the form based on the primary key lookup only. If multiple users were using this application, you would want the edit form to always retrieve the current values of the database, not what happened to be on the screen when a particular person ran a certain report.
Change the Target type to URL.
Apex will format what to already have into a URL text field which magically appears between Tem3 and Page Checksum.
All you need to do is to add your new items and values in the appropriate places in the URL.
I found a workaround, at least it was useful to my scenario.
I have an IR page, query returns 4 columns, lets say: ID, DESCRIPTION, SOME_NUMBER,SOME_NUMBER2.
ID NUMBER(9), DESCRIPTION VARCHAR2(30), SOME_NUMBER NUMBER(1), SOME_NUMBER2 NUMBER(3).
What I did was, to setup items this way:
P11_ITEM1-->#ID#
P11_ITEM2-->#DESCRIPTION#
P11_ITEM3-->#SOME_NUMBER##SOME_NUMBER2#
Previous data have been sent to page 11.
In page 11, all items are display only items.
And P11_ITEM3 actually received two concatenated values.
For example, the calling page has columns SOME_NUMER=4 and SOME_NUMBER2=150
so, in pag1 11, P11_ITEM3 shows 4150
In page 11 I created a Before Footer process (pl/sql expression)
to set up new items, for example P11_N1 as source SUBSTR(P11_ITEM3,1,1)
and item P11_N2 as source SUBSTR(P11_ITEM3,2,3)
So, I had those items with corresponding values from the calling IR page.
The reason I did not pass the primary key only for new lookup access, is because i do not want to stress database performing new queries since all data are already loaded into page items. I've been an oracle DBA for twenty years and I know there is no need to re execute queries if you already have the information somewhere else.
These workarounds are not very useful for a product that bills itself as a RAD tool.
Just include a single quoted word in the select statement (Select col1, 'Randomword', col2 from table 1;)
Then define that column as a link and bingo! More items than 3 to select.

Resources