Print report with parameter - iccube-reporting

Having report with some constants and input parameters defined i'm trying to export it as a pdf.
I'm calling GVI passing the "printReportBatchEx" action; the report expects an input parameter.
How to pass one or more parameters to the report with the print report batch mode?

The report parameters are passed via the report URL (see www for more details). So assuming you have a report called my-report with a year parameter, you should print the URL (encode it properly):
http://localhost:8282/icCube/doc/ic3report?name=/users/marc/my-report&params={"year":"2010"}
as mentionned in the doc the 'params' URL parameter contains JSON.stringify() of the object containing the parameters of the report.
Hope that helps.

Related

Google Cloud Data Fusion - Dynamic arguments based on functions

Good morning all,
I'm looking in Google Data Fusion for a way to make dynamic the name of a source file stored on GCS. The files to be processed are named according to their value date, example: 2020-12-10_data.csv
My need would be to set the filename dynamically so that the pipeline uses the correct file every day (something like this: ${ new Date(). Getfullyear()... }_data.csv
I managed to use the arguments in runtime by specifying the date as a string (2020-12-10) but not with a function.
And more generally is there any documentation on how to enter dynamic parameters with ready-made or custom "functions" (I couldn't find it)
Thanks in advance for your help.
There is a readymade workaround, you can give a try "BigQuery Execute" plugin.
Steps:
Put below query in SQL
select cast(current_date as string) ||'_data.csv' as filename
--for output '2020-12-15_data.csv'
Row As Arguments to 'true'
Now use the above arguments via ${filename} wherever you want to.

How to send values selected in ListBox to java webservice parameter in BIRT?

I have a java webservice which takes values of Locations and performs action.
In my BIRT report, I have a ListBox which contains names of all the locations.
When tried to link values from ListBox to webservice parameter, BIRT developer give warning message as :
If a user selects multiple values from report parameter, the data set
parameter uses only the first value
.
I tried creating a hidden report parameter [RP_Hidden_Locations] in BIRT which is of string type and copied values from ListBox report parameter [RP_All_Locations] as [RP_Hidden_Locations].value = params["RP_All_Locations"].value.join("','");
This didn't work and null values were received in webservice method.
Please help!
PS:
Data source for Data Set in BIRT is Webserivce Data Source
and sending report parameter values as shown below
<locations>?&RP_Hidden_Locations&?</locations>
First Create the hidden variable.
In the script tab of the dataset, select before open.Here join all the values sent by the listbox report parameter. Use this:
params[RP_Hidden_Locations]= "'"+params["RP_All_Locations"].value.join("','")+"'";
Now set the SOAP Request to send this hidden parameter.

In Oracle Apex 5 I want to link to an Interactive Report and set a filter RequestID = #RequestID#

I am trying to link a column from an Interactive Report to another Interactive Report in Apex 5. I want to set the filter in the later one with a value from the first one. I used a column of type Link then clicked on Target button to set the page number like this:
It doesn't work. I read there are other ways, I could use an URL link and build the URL to pass the parameters using a package but if I used this, how can I bind it to the link?
Normally you'll need to specify the operator to be used in the link - documentation:
Developing Reports > Editing Interactive Reports in Page Designer > Linking to Interactive Reports
Snippet concerning setting up a link:
To create a filter, use the following itemNames and itemValues syntax:
IR[region static ID]<operator>_<target column alias>
Consider the following example:
IR[EMP]C_ENAME:KING
Meaning that if you want to place a filter on your report where the column REQUEST_ID matches a given value, you'd need the equals operator syntax:
IREQ_REQUESTID:#REQUEST_ID#
However, using
IR_REQUESTID:#REQUEST_ID#
should also work, as the EQ operator is the default operator.
Also consider other issues: do you have more than one IR on the page? You'll need to reference the correct one. Is your generated link correct? Inspect it!
I found what was causing the filter not to work. I was trying to filter a column of type "link". It doesn't work when it's a "link", but it does when it's "plain text". So now you know. Here's how it's looking...
For me it works like this:
I created an Item (display only)(source type: null) on the second page with the second IR.
In the first IR in the Column Attributes set a Link Text and the Target and Page number (like you did already). In the Name part put your Item that you just created and for the Value put the column name in which are the values for your filter (like #Request_ID'#).
Then again on the second page with the second IR you will put something like this in the Region Source:
select REQUEST_ID,
REQUEST_NUMBER,
NAME,
FIRST_NAME,
COMPANY,
COUNTRY,
TYPE,
RQ_IS_ARCHIVE,
RQ_ID_TO
from REQUEST
where REQUEST_ID = :P20_REQUEST_ID
The :P20_REQUEST_ID is the Item that you created on that second page.
You passed the value from the Request_ID column from the first page in to the Item on the second page, there you used it then as a condition.
Hope this helps you...

BIRT - using multiple webservices to get the data

I am trying to generate a report using Eclipse BIRT report designer.
The scenario is this:
There are 2 web service data sources. There are 2 datasets for webservices 'WS1' and 'WS2' respectively.
The output element 'COUNTRYID' of one webservice 'WS1' would go as input for another webservice 'WS2'.
What I did:
Created a parameter COUNTRYID.
Created a dummy Computed Column in the dataset of the web service 'WS1' with the expression:
params["COUNTRYID"].value=row["COUNTRYID"]
Now the input parameters for the 'WS2' dataset is related to the global paramter 'COUNTRYID'.
When I run the report, I see that the global parameter contains the value from the 'WS1' output.
But the report does not display the values from the response of the web service 'WS2'
My questions:
How can I see, if the webservice got fired or not?
How can I see, if the webservice got fired with correct values ?
WS1 is not fired unless it is explicitely bound to a report element. Typically, to achieve this we apply following steps:
insert a data element at the beginning of the report body
turn the property visibility of this new element to false (or let it visible during testing)
bind it to the first dataset WS1
It will force a silent execution of WS1, and therefore this will populate your parameter COUNTRYID before WS2 runs.
However this approach would not work if:
WS2 dataset has to be used to populate selection items of a report parameter (which does not seem to be the case here)
If COUNTRYID parameter is used at render time. This point is much more annoying, if you need this parameter in chart expressions for example. If so, i would recommend to store WS1 in a report variable instead of (or why not in addition to) a report parameter. See this topic to see how to create a report variable.
You can initialize it at the same place you did for the report parameter with:
vars["COUNTRYID"]=row["COUNTRYID"];
and use it anywhere with
vars["COUNTRYID"];
Report variables are available from the palette of expressions editor :

Is it possible to have Ember show a query parameter value in the url when the parameter is set to the default value?

According to the docs, "When a controller's query param property is currently set to its default value, this value won't be serialized into the URL."
Here is a jsbin showing this behavior.
Is it possible to "disable" this behavior and always have the query params show in the URL regardless of their value?
Reason: I am dynamically setting the default value for a timestamp query parameter. However, I want the URLs to be shareable, so I want to explicitly list the timestamp in the URL. I'm also using the query parameters default value (which I set to the current time) for knowing whether to show a "clear timestamp" button.