BookmarkSubscribeRSS Feed
chriskoeo
Fluorite | Level 6

Hello,

The Platform here is SAS Viya 3.4

I have a task and I am not able to implement it with my current knowledge on Reporting.

The report which I working on has ~20 tabs.
There are 3 Global filters.

Right now my client is sharing this report to his clients via URL.
This URL contains the company name of each client every time. ( so this is unique for every client and every client has access to his data )
On the Report, one of global filters is filtering based on the client's name (Company Name).
The previous Report editor ( before me ) implemented this via a parameter. ( I do not know how )
af.png

 

Task 1) The request that I have to implement is to add on the sharing URL the date period in order to be predifined for the Companies when they open the Report.
Task 2) In addition to that my client wants from me to disable the on the report the 2 Global Filters ( Company name, dates flter ) once these two will be defined on the URL Before the user opens the report. I think these two filters can be hidden in order to do their jobs but not be accessible from the users.

Most important is the Task 1.

I hope that I was clear, but If its a need I can share more detalis about it.
Just ask me. 😀

 

Thanks in advance!









My client wants to share it with his clients.

4 REPLIES 4
utrocketeng
Quartz | Level 8

Greetings Chriskoeo,

 

(note that I am using Viya3.5)

 

While I have not tried to include datetime parameters in my report URLs in the past, I believe it should be doable.  you will first need to create the parameters.  from the data tab, click the "+ New data item:

utrocketengineer_5-1615220565850.png

 

 

Create the new parameters (one for the start and end datetimes).  Here is an example for StartDate:

utrocketengineer_0-1615220050167.png

 

 

then from the data tab, Apply data filter:

utrocketengineer_1-1615220191511.png

 

utrocketengineer_2-1615220328840.png

 

then, when you copy the link from the report menu:

utrocketengineer_3-1615220370987.png

 

you can add the parameters to the report:

utrocketengineer_4-1615220436666.png

 

 

good luck!

 

chriskoeo
Fluorite | Level 6

Hi,

Thanks for your reply!

 

I want to show you what I did

First of all lets see the data roles of the Global filter ( slider ).
The slider "taking data" from INVOICEDATE (MY) as you can see below.

 

ac.png

 

 

 

 

 

 

 

 

 

 

So, (on the left side of the report), I Right Clicked on  INVOICEDATE (MY) and I created 2 new parameters as you suggested me. I named them "dstart" and "dstop".

BBC.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If you expand the INVOICEDATE (MY) you will see the below:

 

 

cc1.png

 

 

 

 

 

 

 

and if you expand the two new parameters you will see the below:

 

cc2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

From the above I think they are "well created" based on the same format.
I implemented this way because when I followed your instructions, it was not letting me to choose the format that I wanted.


So, by now I have a global filter (slider) which is "fed" by INVOICEDATE (MY) and two parameters.

The next step was to click on "Apply data filter.." but unfortunately I do not have this button.
f.png







 

 

 

 

 

 

 

 

 

 

 

My options are the "Edit data source filter" and "Delete data source filter".

Of course I clicked on "edit data source filter"

ec.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As you can see there is a condition here.
cid2 is the parameter which the report is using from URL to choose the client id.

I am stucked here!!


I tryied the below.

ec1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This was just a bad choice! Everything on my report was empty with errors about the filtering! I rolled back!

The current status is that I have just new two parameters on a working report. Thats all.

I was wondering If I could replace the slider this 2 drop down lists and then apply on each drop down list a parameter. Would this be easier? If yes, how can I convert the existing slider on 2 drop dwon lists with the same functionality on my report?

 

 


I really appreciate your effort here.

Thanks

utrocketeng
Quartz | Level 8

Chriskoeo,

 

i feel you are on the right track.  you did not have the option to "Apply data filter" since one was already in place.  it appears that you tried to use the AND condition to the existing data source filter.  i would suspect that would work as long as your default values for dstart and dend are set such that there are values for ClientId cid2 to be present.  

 

one important note here.  SAS stores dates and datetime values differently.  it seems that INVOICEDATE (MY) is stored as a measure:

utrocketengineer_0-1615294108694.png

 

Visual Analytics will present the metadata hints about columns in the Data View when set.  when i look at this 'Date' value, i know it is actually stored as a date time since it has a calendar and a clock:

utrocketengineer_1-1615294225135.png

 

SAS Stores dates as the number of days and datetimes as the number of seconds. 

utrocketengineer_3-1615294478569.png

 

utrocketengineer_4-1615294533938.png

 

 

So, when configuring your parameter:

utrocketengineer_2-1615294331663.png

 

 

make sure that you choose Date or Datetime based on how your invoice date is being stored.  

 

 

it is also worth noting that using the TreatAs() operator in VisualAnalytics, you can switch between datetime and date.

 

 

again, Good Luck!

 

 

 

chriskoeo
Fluorite | Level 6

Thanks again for your reply.

So,

I had to create 2 parameters, one for start date and one for end date.
This is done.
I created them from the INVOICEDATE (MY) which is a date as you can see.
aco.png

 When I am clicking on the slider, the tab "Data Roles" from the right side is showing this:

 

bco.png

 

 

My parameters which are created from the INVOICEDATE (MY) are clissified as "Category" and there is no other option to change it.
dco.png

 

Until now I have these two parameters created.
I saw thet you had a button "Copy link...". I am afraid that I do not have it.
Instead of this I have on the same spot the button "share report" and then opens two new buttons "email" and "Connection.."

 

cco.png

I thought this was the same, but again I was wrong.
We have differences.



eco.png

What about now?
Just sharing this link with what? Adding the "https://.........../=vi24353/dstart='mystartdate'/dstop='mystopdate' "
Did we set an interaction between parameter and slider?


It is understood that I need parameters to implement this request.
It is not understood from me how this is going to work.
Forgive but I am a low-level "report Designer". I am new here.

Thanks a lot.
I really appreciate your effort. (again)

 

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!

Discussion stats
  • 4 replies
  • 822 views
  • 2 likes
  • 2 in conversation