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!
I was able to get this working in VA 7.5.1
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
Hello,
In recent versions of VA, when you create a report link you should see a Data Mappings section in the link window:
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.
Let us know if that helps.
Thanks,
Sam
unfortunately I'm using text for the link, and this mapping shows only in graphs or tables
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?
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Tricks for SAS Visual Analytics Report Builders
SAS Visual Analytics Learning Center
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:
This is report 2:
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
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
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
I was able to get this working in VA 7.5.1
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
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.
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.