SSRS expression display custom text - ssrs-tablix

Can i make field value hidden within Expression in SSRS because i don't want to display this integer value?
For instance: I placed text box where I created simple Expression:
="Click for Details" & Fields!LocationId.Value
Fields!LocationId.Value is my specified parameter where I link Main report ID and Details report ID
I use Action within cell column to redirect to subreport based on unique LocationId.Value where user will click on the line with wording "Click for Details".
When report runs I have in each cell :Click for Details3636
Click for Details7239
and so on..
is mission impossible here??!!
Angelika

Related

Oracle Apex 19.2 - Create Radio Buttons in Classic Report

Is there a good visual tutorial that takes through the various steps on how to create radio buttons in Apex 19.2? This tutorial Creating a Classic Report having radio button on each row helped me and I’m looking for a similar one..
In my case, I would like to add a radio button to each row of my classic report which when selected would add some of the informations selected by the radio button in a text field in the same page.
Any advice is much appreciated.
Thank you
Install Sample Reporting application on your APEX instance (preferably on apex.oracle.com as Dan suggested).
Navigate to the Classic Report page.
Change the query to the report to the following:
select rowid,
ID,
PROJECT,
TASK_NAME,
START_DATE,
END_DATE,
STATUS,
ASSIGNED_TO,
COST,
BUDGET,
apex_item.radiogroup(1,TASK_NAME) ACTION
from EBA_DEMO_IR_PROJECTS
where (nvl(:P3_STATUS,'0') = '0' or :P3_STATUS = status)
Note the added column "ACTION" which consists of the apex_item.radiogroup with TASK_NAME value. Let's assume that this is the value that you want to pass to another page item.
Open that column's attribute under Page Designer and disable "Escape special characters" attribute and add a CSS Class (e.g. mycolumn)
Create a Page Item (e.g. P3_NEW).
Now add the following Dynamic Action
Event > Click
Selection Type > jQuery Selector
jQuery Selector > #classic_report .mycolumn input
Your true action will be of the type Set Value and the Set Type is JavaScript Expression with the following code:
this.triggeringElement.value
Your affected element is P3_NEW and disable Fire on Initialization

SSRS passing parameters to a second tablix in the same report making it visible

I need to pass parameters to a second tablix in the same report from clicking in a cell on the first tablix a bit like adding an action to a text box that passes parameters to a second report. The second tablix needs to be hidden until the row in the details column on the first tablix is clicked.
I'm not sure if this can be achieved?
Have just tried SQL Dan's method and that also has worked for me. Pointing the Action of a cell in the details row of tablix in the parent report back to the parent report and including the extra parameters (Hidden) that the subreport requires.
On first running the report I get an error for the subreport " One or more parameters were not specified for the subreport 'Report Name', located at: / Report Name', but that's fine as on first running the report I wanted the subreport hidden so expression in visibility of subreport for show / hide which is based on the parameters that are not passed on first running the report. So when first running the report you don't get the error as the subreport is not visible until the on click event.
When clicking on a row in the main tablix the report reloads as in action points back on itself and the parameters are passed for the subreport.

How do you reference value of column from a different column attributes page in Oracle Apex?

I am in a report page in APEX. I went to the report attributes page and inside that are columns which each have their own column attributes. I needed to know how to use the value of one column while I am in a separate column's attribute page. With the picture attached, I try to do above using #COLUMNNAME# to get the value, but the correct value is not being used. You use hashtags to reference column values in the column formatting section.
Javascript/Dynamic Action:
$('.dis_flag:contains(disabled="true")').parents('td[headers="DIS"]').siblings('td[headers="PHONE"]').children('input:text').attr('disabled', true);
where:
DIS - alias of my column, indicating disable editing or no (if disable it contains value disabled="true". But it can have any another value).
dis_flag - class name, i added for this column in "Column Formatting" -> "CSS Class". I added this class to refer this value more easy.
PHONE - alias of column, that must be disabled.
You can add this javascript code to the
"Page Load" Dynamic Action
"Page Attributes" -> "JavaScript" -> "Execute when Page Loads".
Report template. Making your own report template is more difficult, and hard to explain in two words. Just go to the templates list, find report template named Two Column Portlet, type Named Column (row template) and maybe you will understand what i mean.

Displaying Popup alert for SSRS Parameter validations

I am working on a SSRS report which has From & To date as input parameters and it has to be validated such that From date can't be more than To date.
I was successful in creating a custom VB code which takes care of validation but the problem is when the validation fails i need to display a user friendly pop up alert which i am not able to do. I tried giving the alert using MsgBox (VB.NET) and also tried calling Response.Write inside javascript, but none of these works.
Help me in getting this done.
Following are the steps that you can follow to achieve this.
In the code section of the report add the following code.
Public Function SelectedMore( ParamCnt As Integer ) As Boolean
Dim Cnt As Boolean
Cnt = IIf(ParamCnt < 4 , 1, 0)
Return Cnt
End Function
Add a text box on the report layout page and add contents to it saying user has selected more than 3 parameter values. You can make this bold and red if you want.
Then go to the properties of the above text box and go to ‘visibility’ tab. Select ‘Show or hide based on the expression’ and add the following expression in the box ‘=Code.SelectedMore(Parameters!HeatMapList.Count)’. This will make this textbox visible only when more than 3 values are selected.
Now go to the parameters of the main dataset ( the onw which fetches the results for you), go to the parameters tab and next to parameter HeatList, click the expression button (fx). In the expression box type in the following code, =IIf(Parameters!HeatMapList.Count > 3, Nothing, Parameters!HeatMapList.Value). This will not pass any value to your main dataset for the parameter and results would return empty. You can alternately add the visibility expression inverse to that of the above textbox, for the main tablix. This will hide the table when textbox is displayed and vise-versa.

How do I change the top value name in a text box on a Cognos Report?

The default value for the first item in a drop down list is the name of the database field. I need to change it to a more user friendly name. How do I change the value?
add a HTML Item onto the prompt page and add the following as an HTML item:
Example:
<script>
document.formWarpRequest._oLstChoicesMyList[0].text = '--SELECT A CITY--';
</script>
Replace 'MyList' with the name of the component.
from: link text
In Cognos 10, you can specify prompt text of your choice in Report Studio.
Select the value prompt
In Properties pane, under 'Prompt Text' section, the 'Header Text' property will be set to Automatic. Click the ellipsis button next to it and Header Text Dialogue opens.
Select 'Specified Text' choice. Click ellipsis.
Provide the text of your choice and click ok.
Run the report and you will see text that you provided will appear as first item in the drop down list.
I have provided a Screen shot for a better understanding.
You have a couple of options. First, you can rename the data item's name from database field name to a more friendly name in the Framework Manager metadata.
Second, you can rename the item in Report Studio. However, if you do this you will notice that it is still using the database name. You actually need to perform a calculation in the item expression for it to use your name instead of the default name. So say you are pulling in the string field [Namespace].[Unfriendly Name] and you named your report data item "Friendly Name." The top selection will still read "Unfriendly Name." However, if you replace the data item with the following:
[Namespace].[Unfriendly Name] || ''
It will see that there is a calculation involved and use your friendly name. In the case of a number field you have to add zero instead of concatenating ''.
This is also the case with report column headers (which you can replace with text instead of using this calculation method).
Convoluted? Yes.
Within the dataitem in the query.. you could do a ..
IF ( [dataitemA] = 'some text' ) THEN
( 'new text' )
ELSE
( [dataitemA] )
i try to avoid using javascript and html items becuase they dont generally work in pdf or excel outputs.
just a thought..
cheers!

Resources