Category Archives: Development

Calling a Stored Procedure from MicroStrategy

I alwasy wondered how one can do it. This is something that I had seen during my employment but as not involved, was not able to recall it. finally found how to do it. MicroStrategy kb search is very pathetic.

How to use it: Open VLDB Properties of the report and changed setting Pre/Post Statements based on your requirement.

Take an example: {call GenerateDate([Age Interval])}

Calling a stored precedure from MictoStrategy Report

Calling a stored precedure from MictoStrategy Report

{} curly brackets are required as per MicroStrategy.
MicroStrategy recommends using CALL statement instead of EXEC to execute/call a stored procedure.
[Age Interval] is a MicroStrategy numeric value prompt that can be passed as parameter to the stored procedure. This is optional.

Other things to do but not for all ODBC Drivers.

MicroStrategy ODBC Driver must be configured to accept results from stored procedures. As per tech-note I found only Oracle needs to do following.

UNIX: The following line must be added manually to the Data Source Name (DSN) definition in the ODBC.INI file
ProcedureRetResults=1
Windows: Open the DSN and see if there is some setting for Procedure Result. Select that.

This can be used to pass parameter to a stored procedure from MicroStrategy too. In cases where multiple values need to be passed from the same prompt, an element list prompt should be used.

7 days and 30 Days. 3D Reports (I love myself)

Marketing and Sales are the most ideate guys that you come across in your professional life. Jinx broken with some doubts. Peter had given some reports to be complete ASAP about the user trends. I could say that the main report was very tough. There are total 4 reports. Size keep on decreasing but the difficulty level remains the same. The biggest report was almost completed by Raj. Really very good work. I was given that report in my down time but my approach was incorrect due to set of attributes picking date from different table and it was must to be taken from different tables s that’s how the WH was evolved. Well. I was trying to explain to Ritesh about the second report. They wanted approval % and $ of various card payment methods. Flat report was already present. Btu they wanted the average of same to be compared with last 7 days and last 30 days. After having understood this problem, I explained it to him rotating my finger less in case of 7 days and longer in case of 30 days, as if we were seeing reports. He found it very funny and wanted me to do it again… :)) Well Sriram came to help me out and told me that I can achieve it by “Apply Simple”ing the whole metric. Total bouncer. So He sat with me. Got the SQL. Edited it. And told me to the fine level what to be made “apply simple” [FYI, Apply Simple is the way to use database supported function directly in MicroStrategy. Highly highly NOT recommended by MicroStrategy Inc] Yup. By 4:30 I achieved it. I felt so great. By 5:30 it was tested and found to be correct. Now comes the pick on the day.

I started looking into 3rd report. This has very cryptic column name. I asked Sriram if he knew anything about it. He told me about the entire column he could explain, but he insisted to ask requester of report to verify. Well I pinged Peter on yahoo chat for it. When I told him I could not get 2nd column, rest column were depended upon it directly or indirectly, he just asked my ext. Voila, here is Peter calling you on phone. This thing that I could not get was Monthly Projection and they had written monthly estimates. He explained to me how is that calculated. I could not get it and I could not listen to him well due to my neighbor chatting too much. He is a complete chatter bug. He I just asked him to explain again. Well, He explained it to me all over again. I covered my other ear to hear him properly. (I don’t know but this strange thing of not able to talk well happens whenever there is an overseas call, inbound or outbound). Contrary to the feedback I had got about him, I would him excellent.

Sriram and Peter were hero of day for me. Sp. Sriram for making things Simple.

Zero of the Day. Sify Braodband. This blog was supposed to come yesterday but hey someone stole his wire and I was connectionless. Such thing happens in India. My broadband operator in Mumbai had accepted doing such thing.

“Add to Percentage” metric added in brain

So here come the ghost of Cashier Dashboard report. Armed with not matching different table heterogeneous for date, 24 metrics.. This gave me cold shiver when I started it. Now having to complete the percentage, it was a tricky part. I added so many derived metrics. Made the report OLAP. Shouldn’t be doing that. Keep it Standard Stupid. I played with “Add to ….” is added in my brain.

MicroStrategy Free Form SQLs simplified

I got up so late today. It was 10:05. I’m supposed to be in office by 10:00. I straight jumped into shower, got dressed, had Idlies in breakfast and reached office by 11:15. There is reason for being extra late. 😉 Working on the report of Game-bookers KPI, I gave some final touches to the SQL. I really enjoyed making final touches, because I made changes to Free Form SQL reports myself alone. I had to depend upon some one knowing the SQL well to do the same. I removed one complete join that was a great achievement. The joy was only short lived. I had to redo that join due to one separate WHERE clause. I spoke to Adi about my planned leaves in November and I didn’t get any positive reply. Ritesh also told me about the rules that I must follow while creating free form SQL report in MicroStrategy, as no other guy would be bale to make or create any schema change till I’m done. I hope I would be able to keep it, because after today’s tweaking the SQL my confidence level is increased very much. I printed the Rent receipt to be sent to Saama Technologies, my ex-employer, and got sign of landlord, Mr. Neeraj Jamwal, too. 😉 I took the help of a site for the same. Here is the link. http://www.vakilno1.com/forms/delhirentcontrol/form_b.htm