APEX - linking two report with SQL - oracle11g

I'm trying to link 2 reports to achieve the same functionality as with a master form on 2 pages.
table: Student(id, name, address)
MainReport: an interactive report Displaying the ID by using SQL: select id from student;
Functionality: when the ID is selected, open the other report and display the name and address
SubReport: this is a report on an SQL statement. SQL is:
select name, address from student where id = :P24_id;
Go back to the main report, go to edit page, in the region, click on interactive report and go to the report attributes. Scroll down to link column, change link column to link to custom target, set the target page to the SubReport, enter name of P24_id and value of #id# and click apply changes.
Why is this not working? When I load the main report I'm seeing the data, when I click on an ID however and I go to the subReport, I'm seeing Error ERR-1002 Unable to find item ID for item "P24_ID" in application "105".
Can anyone help?

Did you define a page item on page 24 (which seems to be your target page) with the name P24_ID ?
You can not just set a value to some arbitrary variable name. You need to actually have a page item matching the name.
So on page 24 you would need to create a page item P24_ID.

Related

Using popup to select correct relational field and pass value back to an entry form

I am using Google App Maker with Cloud SQL to build an asset tracking database.
I have a couple tables with relations:
Asset List (Many to One with locations)
Locations (Many to One with Districts)
Districts (Many to One with Areas)
The issues is when populating new related location fields in an data entry form is that several districts may have locations with the same name. When using the standard drop down the same values appear and there is no way for the user to know which district the location is associated with.
Example: On the asset entry form drop down locations show:
- Shop
- Crew 1
- Crew 2
- Shop
- Crew 1
- External Vendor
I have 2 pages:
Assets - Datasource: Assets table
Entry form Datasource:inherited(assets) to enter new assets
Table View Datasource:Inherited(assets) to see asset that get entered )no edit)
Locations Pop-up
This seems to work as expected basically forms to navigate to correct Location and store it in a text box and a button with the On_Click property to send the textbox value to the data entry form on assets (not working) I can pass the value to a widget but can't figure out how to save it to the actual data source.
Currently using the location in the text box on this form should i be using Id?
I created a pop-up form which lets the user navigate to the correct location record ID by filtering on district. I am having trouble understanding how to actually write it back to the correct location field on the asset entry form. I am new to Java Script/Apps Script so the meaning of all the properties and how to use them is giving me trouble.
I tried setting a text box named SetLocation in the entry form and setting the value property to
#datasource.item.Location.Location
Then in the popup I set the button on_click to
app.pages.Assets.descendants.SetLocation.value =
widget.parent.descendants.PassLocation.value;
Pass Location is the name of the textbox on the popup where the correct location is stored.
Some suggestions to consider. In your popup set a dynamic property, call it 'CreateDatasource' or whatever suits your needs.
In your assets page form where you navigate to your popup (lets say it's a button that opens the popup from your form) put the following code:
var popup = app.popups.YourPopup;
popup.properties.CreateDatasource = widget.datasource;
popup.visible = true;
Lets say your popup content datasource is set to Locations, and your popup has some inputs that filter your locations and then there is a table that displays your filtered results. In this table you would select the appropriate location row and then your popup has a button that passes the location back to your asset form, with code like this:
widget.root.properties.CreateDatasource.item.Location = widget.datasource.item; //this would set the relation only assuming your asset relation end to locations is named 'Location'
widget.root.visible = false;
This would work assuming everything is set up correctly in your relations.

show different label and values for columns in cognos report studio

I have a column "full name" in a list and I want to configure drill down for it so that when I click on a particular user's full name, it displays all the bio data of that user from another table.
My requirement is that at the front end, it should show the full names of the users, but when I click on the user's name, it should pass E-mail address of the user for the drill down.
Please need help for doing it.
I'm going to assume you are using a list object. the instructions for a crosstab would be slightly different:
Add the item you want to pass to the drill-through target to your query
In the report page, select the list
Click on the ellipses (...) in the 'Properties' property of the list object
Check the box next to the data item that you added to the query in step 1 and click 'OK'
When you define the drill-through parameters, select 'Pass the data item value' for the method and the data item added to the query in step 1 as the Value.

How to customize an Axapta report "SysReportAuto" ?

I know how to modify a 'physical' report with a defined name, and called from a button. But, in Axapta there are some reports called from the print button in the toolbar.
How can one modify a system report like 'sysreportauto'?
The fields shown in the auto report comes from the AutoReport field group on the table.
You can, as a user, change the auto report, by clicking Edit\New, then choose the fields you would like to see.
You can also specify group totals in Select\Sorting, and grand totals in Select\Print options.

A hyperlink on Crystal Reports should open another report and pick Session value

I am using Visual Studio 2005 Professional Edition [ASP.NET with C#].
I have a Crystal Report with a column is shown as a hyperlink. On clicking any hyperlinked value of any row, another report should open but I have three issues to be addressed:
The URL of the second report should be handled via Server.Transfer method to hide the page name from the URL.
The hyperlinked text, where the user has clicked to open second report, should be passed to the second report.
The second report is connected with SQL command as database back-end. I want to pass a Session value as a parameter to the SQL command being used by the second report.
You're hyperlink will need to reference a URL that will perform a Server.Transfer--Crystal Reports does not support this.
You will need to embed this text in the query string.
You will need to embed the logon token in the query string.
To dynamically construct a querystring, edit the conditional formula that is associated with the field's Hyperlink infomation (right click field; Format Field...; Hyperlink tab). It might resemble:
//change to reflect your situation
"http://server:port/resource/redirect.aspx?reportname=" + [report name here] + "&token=" + [logon token here]
If you are using BusinessObjects Enterprise, you may want to investigate URLReporting.

How to create prompt page driven variable view in Cognos 8.2

I am using Cognos 8.2 to create a report with a prompt page. I am trying to create a prompt page that allows the user to choose what type of item they want to see, and then the workers assigned.
Example: Show me the workers working on projects of type 'A' and that would trigger a list of workers to be displayed who are currently working on projects of type 'A' and then the user could choose a worker/workers from the list to be displayed in the report.
I am trying to use javascript in the html item, but I have never worked with javascript before, and I am having little luck. I dont know if it is even possible or not to pass a variable to another item on the prompt page. Any ideas or examples would be appreciated.
Bring your worker names into a data item (eg [People]) - then, create another data item with a case statement:
CASE
WHEN ([People] in ('John','Jessica','Jane','Jeff'))
THEN ('Group J')
WHEN ([People] in ('Adam', 'Alex', 'Anne'))
THEN ('Group A')
ELSE 'No Group'
END
Name this data item "Group"
Then create a filter on the query: [Group] = ?Group Prompt?
Then you should be able to input 'Group A' and get only those from Group A.

Resources