Skip to Content
0

Show image on the dasboard based on record selection in crosstab

Feb 01, 2017 at 10:44 AM

276

avatar image

Dear Experts,

I have a requirement to show the customer logo in the dashboard, based on the customer name selection in the crosstab.

What I am currently doing is add two image icons, 1 with the customer logo and the second is blank.

I have written an if-else condition for record selection but not sure how to show/hide the customer logo based on the if-else condition.

I couldn't find any function/script to proceed further.

Any suggestions.

Regards

Sumit Dubey

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Tammy Powlas
Feb 01, 2017 at 11:37 AM
0

You may have to go the extension/SDK route

See this thread for discussion: https://archive.sap.com/discussions/thread/3617612

Unfortunately Karol's document was not migrated - if his extension is still available you can go to https://github.com/org-scn-design-studio-community

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Thanks Tammy,

So, if I try for showing the image icon based on my row selection in crosstab. Would that be not possible at all?

Regards
Sumit

0

It sounded like you wanted to apply If-then with images, which is why I recommended Karol's option.

Have you considered the Scorecard component? That *might* offer some more flexibility for you - see https://blogs.sap.com/2015/12/22/introduction-to-sap-design-studio-scorecard-component-part-1/

1

Hi Tammy,

I was thinking to go for if-then statement but maintaining those for all the images would be problematic.

However, I can't switch to Scorecard but it doesn't give me any drill capability. Also, I checked the link shared by Karol but its not accessible. Seems like it has not yet migrated to the new document page.

Thanks.

Sumit

0

Yes, Karol's document is not accessible, but I was thinking his SDK might be on github

0

Ok let me try to access it.

Thanks

0
Nithyanandam Venu Feb 02, 2017 at 05:13 AM
0

Hi Sumit,

If you have large amount of images, it will create few problem. But if you are ok with it, you can rename the images with the row selection text you get and using that you can change the image url without using if/else condition.

Thanks,

Nithyanandam

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks for your response Nithya,

The maximum number of logos I am maintaining would be around 200. So, do you think if I go for if-else condition, then it would end up with the performance issues.

Many Thanks

Sumit

0

Yes it will be for sure.

0
Poovarasan Boopalan Feb 02, 2017 at 06:36 AM
0

Hi Sumit,

It is bit complex to handle it in design studio, but you can have it your data source.

You can have the image URLs as an attribute to the object and use the below code to get it in crosstab selection.

Var logo = CROSSTAB_1.getSelectedMember("Dimension").getAttributeMember("URL");

Image_Logo.setImage(logo);

This way you can get it easily in your dashboard using image component.

Thanks,

Poovarasan

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks a mil Poorarasan,

This would really help. But I have an issue here with respect to the data source. I am doing a prototyping on Design Studio for the client using CSV data. So, not sure how to maintain attributes on CSV data. Also, I am maintaining all the images in the local repository.

Thanks.

Sumit

0

Hi Sumit,

It's much easier if you are using CSV data, you can add URL as another dimension by adding it as column in your file and use it in the dashboard.

Thanks,

Poovarasan

1