[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

05/01/2009 at 07:15AM PDT, ID: 24372510
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.3

Pass parameter from ASP.Net page to Cognos to create report

Asked by taduh in Active Server Pages (ASP), Impromptu

Tags: Cognos; ASP.Net

Hi Experts,

I have an ASP.NET webpage with a gridview in which I have placed a Hyperlink field whose value is my Order ID (the key to my SQL table). I have a Cognos report built with a prompt page where in you can choose the Order ID and it will give you details for that Order. The gridview shows cursory information for each unprocessed Order in the SQL table. My charge is this: to put an HTML Link in the GridView so that the person using that webpage can click on the Order ID link and produce a detailed report for that Order. I almost have it working except when I click on the HTML link it takes me to the Prompt page and I have to select the Order ID again from the Prompt page in order to produce the report for that Order. Is there any way to send a parameter with the Cognos report request so that it knows which Order I want to produce the report for, rather than having to re-select the Order ID on the Prompt page?

I have pasted my .aspx page code.

Thanks,

taduh
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="CDARS_Acct_Placements._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
    <title>Untitled Page</title>
    <style type="text/css">
 
 
        .hiddencol
        {
           display:none;
        }
</style>
    <form id="form2" runat="server">
    <table bgcolor="#0B01C5">
        <tr>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td>
                <asp:Label ID="lblHeader" runat="server" Font-Bold="True" Font-Italic="True" 
                    Font-Names="Times New Roman" Font-Size="XX-Large" Font-Underline="True" 
                    ForeColor="#FFFF99" Text="CDARS Placed Orders"></asp:Label>
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" BackColor="#FFFFAE" BorderColor="#0000CC" 
        BorderStyle="Solid" CellPadding="10" DataKeyNames="Order_ID" 
        DataSourceID="SqlDataSource1" Font-Bold="True" Font-Names="Trebuchet MS" 
        Font-Size="Small" GridLines="None" PageSize="15" HeaderStyle-Wrap="False">
        <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NextPrevious" 
            NextPageText="Next" Position="TopAndBottom" PreviousPageText="Prev" />
        <RowStyle HorizontalAlign="Left" VerticalAlign="Top" />
        <Columns>
            <asp:TemplateField HeaderText="Processed">
                <ItemTemplate>
                    <asp:CheckBox ID="Order_Processed" runat="server" AutoPostBack="true" 
                        Checked='<%# Databinder.Eval(Container.DataItem, "Order_Processed") %>' 
                        OnCheckedChanged="Check_Clicked" />
                </ItemTemplate>
                <ItemStyle BackColor="White" />
            </asp:TemplateField>
            <asp:BoundField DataField="Order_ID" HeaderText="Order ID" 
                SortExpression="Order_ID" />
            <asp:HyperLinkField DataTextField = "Order_ID" runat="server" 
                    DataNavigateUrlFields ="Order_ID"
                    DataNavigateUrlFormatString = "http://essdev/cognos8.2/cgi-bin/cognos.cgi?b_action=xts.run&amp;m=portal/report-viewer.xts&amp;ui.action=run&amp;ui.object=%2fcontent%2fpackage%5b%40name%3d%27CDARS%27%5d%2freport%5b%40name%3d%27CDARS%20Account%20Place%20Order%27%5d&amp;cv.ccurl=1&amp;ui.backURL=%2fcognos8.2%2fcgi-bin%2fcognos.cgi%3fb_action%3dxts.run%26m%3dportal%2fcc.xts%26m_folder%3"
                    Target="_blank"
                    HeaderText = "Click for Report" />    
            <asp:BoundField DataField="Cust_Customer1_Name" HeaderText="Cust1 Name" 
                SortExpression="Cust_Customer1_Name" >
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Order_Customer2_Name" HeaderText="Cust2 Name" 
                SortExpression="Order_Customer2_Name" HtmlEncode="False" >
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Order_Cust_Sig" HeaderText="Cust Sig?" 
                SortExpression="Order_Cust_Sig" />
            <asp:BoundField DataField="Order_Amount" HeaderText="Amount" 
                SortExpression="Order_Amount" DataFormatString="{0:C2}" 
                HtmlEncode="False" />
            <asp:BoundField DataField="Order_Placement_Date" HeaderText="Place Date" 
                SortExpression="Order_Placement_Date" DataFormatString="{0:d}" />
            <asp:BoundField DataField="Location_Name" HeaderText="Branch" 
                SortExpression="Location_Name" HtmlEncode="False" >
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Order_LANID" HeaderText="Branch Rep" 
                SortExpression="Order_LANID" >
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Order_Date" HeaderText="Submit Date/Time" 
                InsertVisible="False" ReadOnly="True" SortExpression="Order_Date" > 
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
        </Columns>
        <HeaderStyle Font-Bold="True" Font-Names="Trebuchet MS" Font-Underline="True" 
            ForeColor="#0000CC" Wrap="False" />
        <AlternatingRowStyle BackColor="White" BorderColor="Blue" BorderStyle="Solid" 
            BorderWidth="1px" ForeColor="Black" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CDARSConnectionString %>" 
        
        
        SelectCommand="SELECT [Order_ID], [Cust_Customer1_Name], [Order_Processed], [Order_Customer2_Name], [Order_Cust_Sig], [Order_Amount], [Order_Placement_Date], [Location_Name], [Order_LANID], [Order_Date] FROM [vw_CDARS_Order_Placements] WHERE ([Order_Processed] = @Order_Processed) ORDER BY [Order_ID] DESC">
        <SelectParameters>
            <asp:Parameter DefaultValue="False" Name="Order_Processed" Type="Boolean" />
        </SelectParameters>
    </asp:SqlDataSource>
   </form>
</body>
</html>
[+][-]05/01/09 04:23 PM, ID: 24284083

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Impromptu
Tags: Cognos; ASP.Net
Sign Up Now!
Solution Provided By: RWrigley
Participating Experts: 1
Solution Grade: B
 
 
[+][-]05/04/09 12:06 PM, ID: 24298117

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091028-EE-VQP-87 - Hierarchy / EE_QW_3_20080625