Introduction
I assume most of us are aware that we may use the COUNT(<unique_attribute>) expression in either the SQL query or the BI Template to display the Total Number of Records fetched by the SQL query in a BI Report. Things however are not that simpler if one tries to display the same in an OTBI Analysis. One needs to perform a series of steps to achieve this.Also we would try to display current logged in username along with currentdate and currenttime.
On a high level the steps are:
-
Add a custom attribute to get MAX(RCOUNT(1)) in the OTBI Analysis
-
Add a custom attribute to get username using USER() function
-
Add a custom attribute to get currentdate using CURRENT_DATE function
-
Add a custom attribute to get currenttime using CURRENT_TIME function
-
Add a Narrative View and choose explicit settings in the same (described in detail in this article later)
Add Custom Attribute MAX(RCOUNT(1))
We already have a custom report created and we would just add the MAX(RCOUNT(1)) field in the analysis.
One additional thing one should make note is the column sequence (at which place of the OTBI Analysis have we placed the column).
Means if I have two columns say personnumber and MAX(RCOUNT(1)) and I have placed MAX(RCOUNT(1)) at the second place then the column sequence is 2.
For my example the column sequence for MAX(RCOUNT(1)) is 16.
Add Custom Attribute USER()
We already have a custom report and we would add a new column and USER()
The column sequence is 12
Add Custom Attribute CURRENT_DATE
We would need to add a new column CURRENT_DATE
The column sequnce for this data field is 11.
Add Custom Attribute CURRENT_TIME
We will add a new attriute and add CURRENT_TIME
The column sequence for this data field is 10.
Add a Narrative View and make special settings
Now that we have added the total count column we need to add a narrative view,
Important properties to set:
Use @<column_sequence> which will display the actual value stored in the column.
Set the Rows to Display value to 1. (This ensures that this field would be displayed just once even though the same actually gets repeated for each of the data row).
The application screenshot once we make the changes appears as below:
Verification
We would quickly try to run the analysis for different values and try to verify the results.
And now we will change the parameter values and the Total Number of Rows would change too.
Inference / Summary
So this is how we can display the total number of rows fetched by a OTBI Analysis, Logged In username, Current Date and Time by making use of Narrative View. One however should make sure that they set the Rows to Display property to 1 else multiple records will be displayed.And with this I have come to the end of the article.
Hope this was a good read and will be useful.
Thanks all for your time and have a nice day ahead!.
Comments
I needs to spend some time learning much more or understanding more.
Thanks for excellent info I was looking for this info for
my mission.
Do you have any tips on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Thanks
is time to be happy. I have read this post and if I could I
wish to suggest you few interesting things or tips. Maybe you can write next articles referring to this article.
I wish to read even more things about it!
I am coming back to your site for more soon.
Is this a paid subject matter or did you modify it yourself?
Anyway stay up the nice high quality writing, it is uncommon to look a nice
blog like this one nowadays..
And i'm glad reading your article. But want to remark on some general things,
The site style is wonderful, the articles is really excellent : D.
Good job, cheers
I like what I see so now i am following you.
Look forward to checking out your web page yet again.
I definitely appreciated every part of it and i also have
you book marked to look at new stuff in your blog.
be on the internet the simplest thing to be aware of.
I say to you, I certainly get irked while people consider
worries that they plainly don't know about. You managed to hit the nail upon the top as well as defined out
the whole thing without having side effect , people could take a
signal. Will likely be back to get more. Thanks
It was really informative. Your site is very helpful.
Thank you for sharing!
group? There's a lot of people that I think would really enjoy your content.
Please let me know. Cheers
long as I provide credit and sources back to
your webpage? My blog is in the exact same niche as yours and my visitors
would definitely benefit from a lot of the information you provide here.
Please let me know if this ok with you. Many thanks!
or reviews, thanks to web.
Reading this post reminds me of my previous room mate!
He always kept chatting about this. I will forward this
post to him. Fairly certain he will have a good read.
Thank you for sharing!
I've either created myself or outsourced but it seems a lot of it is
popping it up all over the internet without my agreement.
Do you know any methods to help protect against content from being stolen? I'd certainly appreciate it.
your efforts and I will be waiting for your next write
ups thank you once again.
has a lot of unique content I've either authored myself or outsourced but it looks like a lot
of it is popping it up all over the web without my authorization. Do
you know any methods to help reduce content from being stolen? I'd genuinely appreciate
it.
I'll just sum it up what I wrote and say, I'm thoroughly
enjoying your blog. I as well am an aspiring blog writer
but I'm still new to the whole thing. Do you have any points for first-time blog
writers? I'd definitely appreciate it.
RSS feed for comments to this post