BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sam2022
Obsidian | Level 7

Hi,

 

I'm using SAS VA and I have 2 reports, in report 1 I have text input as a date, I want to link it with report 2.

so if the user entered a date in report 1, the data in report 2 will show the same date entered. The data source is different in report 1 and 2 but the columns are similar.

 

please help!

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Employee

I was able to get this working in VA 7.5.1

link1.png

 

link3.png

 

In 7.5, you don't have the option to set data mappings within the create link window. But you can assign the second data source to the target report and define a data mapping manually from the Data pane.

 

These links are honestly a bit fragile and finicky. You may need to start from scratch with a new report to get it working. Also, when you are switching back and forth between the report builder and the viewer, be sure to close the reports in the viewer and reopen them to pick up your changes.

 

Sam

View solution in original post

11 REPLIES 11
Sam_SAS
SAS Employee

Hello,

 

In recent versions of VA, when you create a report link you should see a Data Mappings section in the link window:

map.png

 

If you set up a data mapping, I believe that the link should work the way you want.

 

Alternatively, I believe that you could add the table from report 1 to report 2, and then define a data mapping directly in the Data pane in report 2.

Map Data Using the Data Pane 

 

Let us know if that helps.

 

Thanks,

Sam

Sam2022
Obsidian | Level 7

unfortunately I'm using text for the link, and this mapping shows only in graphs or tables

Madelyn_SAS
SAS Super FREQ

Is the text input control in your source report filtering an object in the source report? If so, have you tried instead to link the report from the filtered object? 

Sam2022
Obsidian | Level 7

for more clarification:

this is report 1, i want to show the same date in report 2 when the user click on report 2 link:

 

This is report 1:

report 1.png

This is report 2:

report 2.png

Sam_SAS
SAS Employee

When I was testing this I got very confused, myself.

 

In the documentation, I found this note:


Note: The object that you select as the source for the link must have data assigned that is filtered by the prompt bar values, filtered by an interaction within the same page, or filtered by another incoming report link filter. For example, links from text objects work only if data has been assigned to the text object.

In particular, note the last sentence. I believe that you can only assign measures to a Text object, so the link in the Text object won't be able to pass on your date selector prompt to the target report.

 

That is, the issue is not related to your two reports using different data; a report link in a Text object won't pass your selection even if the reports use the same data source. Unless the prompt is based on a measure that is assigned to the Text object.

 

I'll see if I can confirm this with the dev team.

 

In the meantime, if you create links from the objects other than text objects, they should be able to pass your prompt selections if you set up data mappings.

 

Sam

 

 

Sam2022
Obsidian | Level 7
i saw some saying passing parameter by adding on the link at the end &ParameterName=value but it doesn't work also.
Sam_SAS
SAS Employee

The dev team suggested a workaround that is working for me in my test report.

 

The text object must have a measure assigned to it, but it doesn't need to be related to the data item in your filter prompt, so you can just assign any measure. The value of the measure will be displayed in the text object, but you can hide it by making the measure token (it will look like "{NUM}" when you are editing the text) the same color as the object background.

 

When you create the link, check the box that says "Set prompt bar values of target report" and also define a data mapping between the two data sources.

 

In theory, it should work. For me, I had to delete my old link and make a new one -- editing the old link didn't work. If it is not working for you, try deleting the text object and making a new one. As far as I can tell, the source and target date data items do not need to have the same format.

 

Let us know if you find success or if you're still having trouble! Also, please let us know which version of Visual Analytics you are using.

 

Thanks,

Sam

Sam2022
Obsidian | Level 7

Hi Sam,

 

I tried the way you said but it doesn't work for me. I can see the mapping when adding the report link to the text, but when I test it doesn't work for me. I deleted the old text and dragged a new one, then I wrote report 2 and assigned a measure then I added the report link to the text only "report 2" and checked "set prompt value .." and mapped the data source, source and target. 

 

I'm using sas va version 7.5

Sam_SAS
SAS Employee

I was able to get this working in VA 7.5.1

link1.png

 

link3.png

 

In 7.5, you don't have the option to set data mappings within the create link window. But you can assign the second data source to the target report and define a data mapping manually from the Data pane.

 

These links are honestly a bit fragile and finicky. You may need to start from scratch with a new report to get it working. Also, when you are switching back and forth between the report builder and the viewer, be sure to close the reports in the viewer and reopen them to pick up your changes.

 

Sam

Sam2022
Obsidian | Level 7

Hi Sam

 

thank you so much for your help, i tried it again and it works now.

 

however, if one of the reports doesn't have the same date user entered, report will show another date.

Sam_SAS
SAS Employee

I am very glad to hear it's working for you!

 

If I understand correctly, you are saying if the target report's data doesn't contain the date you selected, that date won't be selected in the target report.

 

I believe that this is the expected behavior, unfortunately. A possible workaround might be to add a missing value for every day (or month, etc depending on your format) in the target data source. Using SAS DATA step code or SQL syntax in your data preparation stage, it should be reasonably simple to do this with some sort of loop.

 

If you did that workaround, the correct date should be displayed in the target report's date prompt but of course no data would be displayed in the objects.

 

A much simpler workaround would be to set a less precise format on the date (quarter instead of month, month instead of day), but that causes a lot of changes you might not want.

 

Thanks,

Sam

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 1268 views
  • 2 likes
  • 3 in conversation