i4Report object options

Renato Marcello dos Reis shared this question 3 years ago
Answered

Hi everyone,


I've received a request to test Yellowfin ReportServices in one of our clients. After doing some research, I found a lot of info about where to start and I think I'm achieving some great results.


My problem is that I'm trying to customize the chart / report received by this webservice and I cannot find any info about the options I can use.


If we reach the below path, we're gonna find some examples of webservices that we can use as a start.


"Path to Yellowfin"\development\examples\webservices


In this very path, there's a file named "ws_report.jsp" which has almost exactly the result I'm trying to achieve, however, the specific report I'm implementing, has a "Series Selection" and "Unit Selection" configured. What I wanted, was to return a static chart without any options avaiable or even the report name above the chart.


This file (ws_report.jsp) has a line with the followfin information:


"The i4Report object has several options for customising the rendered reports."


Though this line seems to be what I'm looking for, I couldn't find any of these options in Yellowfin Wiki to surpress the report options. Right below these lines, some object parameters are called:


report.setShowLinks(true);

report.setShowAlerts(true);

report.setShowAlertImages(true);

report.setShowSort(true);


The question is:


Is there any metadata or wiki with all avaiable options for this object that I can use to do the changes I need?


Thanks in advance.


Regards,


Renato Marcello

Replies (1)

photo
1

Hi Renato,

Thanks for all the details on this! I do have some info, though before I pass it on I want to see if we can include an example of what you're trying to achieve. We will get back to you in the next 24hrs.

Sorry for the delay.


Thanks,

David

photo
1

Sorry Renato, going to be more of a delay, will get back to you as soon as I know more. Though this may help you in the interim.

Report charts will be returned separately in the SOAP response, and this would just be returned as an image, removing any interactions, so there won't be any need to disable any of the interactions via the parameters you have found.

Thanks

photo
1

Hi David,

Thanks a lot for your answers, though I didn't understood how I could do this.

We're going to stop until next monday, So I know these final days can be hard.

With my code, I could transform the return without any interactions, however, I thought that we could return the chart without the buttons that can do these interactions. The question a user can do is "Why there's a button there that's not working"?

Take a look at this example below

/c37fc64828793d9b8f5f937bd74196dd

As you can see, there's a lot of things that our user don't want to show in this return. How can we remove these itens as they are returning when we call "<%= report.render() %>" function.

Thanks one more time for all your help in this case.

Regards,

Renato Marcello

photo
1

Hi Renato,

I'm taking a look at this while David is out. I believe further documentation is forthcoming but as of right now, there's no master list of every possible option, per se.

You can see some more examples containg Show x here and here.

For your particular use case, I am able to get the Title and Series Selection removed by simply adding

     report.setShowTitle(false);
     report.setShowSeriesSelection(false);
This is my code:

/1afea94bd61d6d956d3677c43a7bfebc

Output:

/76a03cc2378a58f8324c1facef1330ad

Original output if I remove those two lines:

/5fb0e79050a33abb9015027f69c6dc7d

It looks like you wanted to remove the Legend result for your Series Selection under the Chart too?

For that, I'm unsure if there's a report.set... you can do for that, but you can avoid it by going to edit the report and going Charts > Legend > Legend Position > set to 'None':

/736d0da6a9da063a5551507d045a8205

/85bc39efe1ef603650ab9848285517df

Please let me know if this appears to be what you're looking for.

Thanks,

Mike

photo
1

Hi Renato,

I just wanted to check in and see how things are going with this.

Regards,

Mike

photo
1

Hi Mike,

Sorry for the delay here. I'm returning to my activities and I only had time to look at your answer in this very moment.

The preferable was to have some kind of documentation about this, but the main goal here was almost achieved with your last suggestion. The only thing left, was the unit selection as shown in this screenshot below. I would know how can I set the filter values not to be available if possible.

/7cfc9ab5e1b542c108d80d8c804e098e

This unit selection can only be enabled when we do have reports with data fields. This is used to change between a point of view (days, weeks, months, years, ...). The point is, how can I disable this without changing the report in Yellowfin? Is it possible? Can the applied filters be hidden somehow?

One thing to note, is that this option doesn't exist in JsAPI as well, but when we disable the title there, the unit selection also disappears. This behaviour, however, does not happen when we use the "setShowTitlte" as false.

Thanks in advance.

Regards,

Renato Marcello

photo
1

Hi Renato,

For the unit selection, you can add the following to your code (which appears to be undocumented at this time):

report.setShowTimeUnitSelection(false);
Though the applied filters do not have a JsAPI parameter, it is possible to hide this via CSS (though still not ideal). Using the code in the ws_report.jsp as a base, I was able to hide the filter values using the following:

.outputReportHeader {
  display: none;
}
Which gives you something like this in ws_report.jsp:

<title>Report</title> 

<link rel="stylesheet" href="css/ie.css" type="text/css" />

<style type="text/css">

<% if (report.getReportStyle() != null) { %>

<%=report.getReportStyle()%>

<% } %>

.outputReportHeader { display: none; }

</style>

Again, while the CSS option isn't ideal, at least you can only apply it to this page without affecting the rest of your reports.

Please let me know how you go with this and if you have any further questions.

Cheers,

Neal

photo
1

Hi Neal,

I hope everything is well.

Thanks a lot for your response here.

With this parameters, I have reached what I wanted to achieve and for now, I don't have any more questions about this feature.

If you don't mind, I would like to sugest as an improvement to put in Yellowfin Wiki, the list of parameters. I'm sure this can be very helpful.

Thanks a lot

Renato Marcello

photo
1

Hi Renato,

Glad to here you have what you need. I have reached out to our content writer on this to see about including this on the wiki for future reference.

Cheers,

Neal

photo
Leave a Comment
 
Attach a file