cancel
Showing results for 
Search instead for 
Did you mean: 

Show image on the dasboard based on record selection in crosstab

sumitdubey
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member265529
Contributor
0 Kudos

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

sumitdubey
Participant
0 Kudos

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

former_member265529
Contributor

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

former_member194504
Active Contributor
0 Kudos

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

sumitdubey
Participant
0 Kudos

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

former_member194504
Active Contributor
0 Kudos

Yes it will be for sure.

TammyPowlas
Active Contributor
0 Kudos

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

sumitdubey
Participant
0 Kudos

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

TammyPowlas
Active Contributor

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/

sumitdubey
Participant
0 Kudos

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

TammyPowlas
Active Contributor
0 Kudos

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

sumitdubey
Participant
0 Kudos

Ok let me try to access it.

Thanks