Scenario:
Suppose u have a report in cognos report studio and want to add a comment under the report and all comments are store in database.We can do all this stuff through creating a store procedure in database
Steps for creating store procedure:
· Before creating procedure we can create a table first having 2 columns.
· Creating a store procedure in your hand store the values of store procedure in above create table.
· Open a query analyzer or sq server and write the procedure:
· Code is:
create table creating_comments (cust_comp_res varchar(200),comments varchar(200))
CREATE PROCEDURE COMMENTS
@cust_comp_res nvarchar(15) , @comments_value varchar(50)
AS
BEGIN
INSERT INTO creating_comments (cust_comp_res,comments) values(@cust_comp_res, @comments_value)
select * from creating_comments where cust_comp_res = @cust_comp_res
END
Steps in framework manager
1. Open a existing package in a framework manager.
2. Import store procedure as a query subject or import through run metadata wizard.
3. Right click on store procedure and the below window will open .
4. Click on … button in value column of @country and insert a prompt macro
5. In prompt macro insert a parameter having prompt name that u r using in a report studio.
6. Like: # prompt( 'country1')# ‘country1’ is your value prompt name in report studio. From where you select country.
7. Click on … button in value column of @ID (it means comments) and insert a prompt macro .
8. In prompt macro insert a parameter having prompt name that u r using in a report studio.
9. Like: # prompt( 'comment1')# ‘comment1’ is your test prompt name in report studio. From where write a comments against any country.
10. Test the value and save the model and publish the package.
Steps in Report studio
1. Drag a list report and drag data item country in it and any other column that you want.
2. Create a value prompt on country data item and write the prompt name same that you put in macros in framework manager [Hint: # prompts (‘country1’) #] prompt name is “country1”.
3. Create an empty text prompt having t names same that you put in macros in framework manager [Hint: # prompts (‘comment1’) #] prompt name is “comment1”.
4. Drag a list report and drag a data item of comments that you make in a procedure in list report
5. Save the report and run it.
6. After some formatting report will be shown like this in report studio before execution.
8. After execution report will be shown like this.
Keep in mind the each and every comment are saved in database against selected country
For Further visit: http://www.segmentbi.com/
Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates. arredo bagno
ReplyDeleteThanks a lot for sharing a valuable blog on Cognos. I was browsing through the internet looking for Cognos training and Cognos Interview Questions and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can find more information here about Cognos and Cognos Interview Questions
ReplyDeleteVery well expressed and detailed post
ReplyDeletespotify web player
walmart near me
You have raised an important issue..Thanks for sharing..I would like to read more current affairs from this blog..keep posting..
ReplyDeletevisit this