Issue in Conditional hiding in cognos report ver 10 - report

I already have a conditional block which controls 10 charts like chart 1 .....chart 10 based on block variable called 'Chart' now I have to conditionally hide chart 3 , bcoz the design of chart 3 differs based on prompt value = complex.
So I tried using style variable and render variables to hide chart 3, I noticed the conditions works only if click on the submit button second time. during the first run its not rendering properly.
case when paramvalue='complex'
then 'Y'
else 'N'
end
If I try to pull the data item from query it throws error as its not referenced in the layout.
I tried many combinations but not working. Quick help is appreciated.

it throws error as its not referenced in the layout.
Normally you use the 'properties' property of the rendering object (i.e. list, singleton) to define query items that aren't in your list but need to be referenced.
This works for lists but generally does not work for charts or crosstabs. If you can somehow squeeze your query item on to the chart then this error will go away.

Related

Passing multiple parameters to single stored procedure - DevExpress Dashboard Module

We are using DevExpress controls for our DNN website since long time.
Now based on user requests, we are in process of creating Dashboard using DevExpress Dashboard module.
To make illustration, we created dashboard using
Combobox (multi select)
Grid
BarChart
We also created a stored procedure with 2 parameters (from combobox and grid) and returning data for BarChart.
The issue is, we can't pass 2 parameters. Seems parameters are mismatching and one parameter is always 0.
As shown in above image,
SelectedActivityTypeID is passed as SelectedSerial (which supposed to string type with actual data), and SelectedActivityTypeID is always 0.
Can you please help us to understand how we can overcome this issue?
Any reference link or URL to documentation will be appreciated.

Display label based on, field on one data-source (singular) being within another data-source fields many

I am still learning, and looking for help on how to display a label based on one data-sources field value, being within another data-sources field value list.
I have one calculated table, displaying rows of documents within a folder, and wish to use a field representing the document number in that data-source, so that if it's ANYWHERE within another tables field it displays my label.
I've been trying to use projection as I think this is how to achieve it.
I can get it working based on both the current #datasouce.item.fieldnames but need it to base the calculation on all possible numbers in that tables field (Image below should make it easier to understand).
I expect that it has something to do with projections, but can't find anything within the learning templates or anywhere else to resolve the issue.
I think the following should work for you. For the 'Reserved' label have the following binding for the text property:
(#datasources.project_quotes.items..quotenumber).indexOf(#widget.datasource.item.Qnumber) !== -1 ? 'Reserved' : ''
I would suggest alternatively just to include a field in your calculated datasource and making the determination in your server script.

How to make a row in a grid not appear if it's value is 0?

I only have two fields in my grid. Just need the entire row to not appear, if the value in one of the fields is 0.
There are multiple solutions for your need, but this one is working for me in a similar setup.
Following code is in the PostBuild event of the component:
Local Rowset &rs;
&rs = GetLevel0()(1).GetRowset(Scroll.MainRecordOfTheGrid);
&rs.Flush();
&rs.Select(Record.MainRecordOfTheGrid, "WHERE FieldA<>0 and FieldB<>0");

Javafx table view multiple selection sometimes skips one of the items

I have created a table view in javafx for my custom object. I have enabled multiple selection in the code by doing:
table.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
Randomly I observe that when I select all the items by pressing Ctrl+A, one of the items is returned as null among all the selected items. Not sure why this happens.
I use below line to fetch all items:
ObservableList<MyObj> selectedItems = table.getSelectionModel().getSelectedItems();
Any suggestions?
Apparently it's a bug, already fixed for version 9 (and also 8u112, if I understand correctly): https://bugs.openjdk.java.net/browse/JDK-8144501
A workaround for now is to use getSelectedIndices(), then get the items corresponding to these instances from table.getItems()

Odd paging problem with DataGrid and sorting

I have a data table that is being filled by a stored procedure. I need to filter down the results some, so I get a data view from the default view and apply a row filter to it. I then bind this to my DataGrid. All is fine at this point. I see two pages (17 records with 10 per page). If i apply a sort to the grid though, it now shows 5 pages (58 records without the filter). I stepped through the code and it repopulates the data prior to running the sort. The repopulation is with with the filter in place and it counts 17 records, but shows 5 pages.
To make it even weirder, if I click on a page i know will be invalid, it runs the page change (which also repopulates the data) and this time it limits the pages to 2 and tells me i have an invalid page number!
Any ideas?
It was the custom control causing the problem. We have an AutoDataSource function that automatically pulls the data tables out of my view and sorts on them. I found a filter function in my grid that apply the filter, but only if applied before setting the datasource
Make sure to apply the sort to the default view and not the grid column directly.

Resources