Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Services -- Pass Prompt Answer ?? 6

Status
Not open for further replies.

mstrgrl

Technical User
Oct 14, 2003
44
0
0
US
Help ! I'm not a .NET programmer but I am able to use a hyperlink to drill from one RS doc to a second RS doc. Is there any way to pass a prompt answer from the first report (first report answer same as second) to the second?? Not sure what the &xxxx parm would be.

Thanks!
 
Funny you should ask. I recently had the same problem and this is what I found after many technotes and a lot of trial and error. I was trying clean this up a little before I posted it but I can always repost it later.

We created and attribute form that would hold the hyper link in an applysimple(). You couple also use this syntax in an XSL if you had to.

The syntax is different for running a report or document, below is the report syntax and its explination. If you have questions let me know.


REPORT SYNTAX

Attribute Syntaxt
To a Report with MS SQL Server 2000

ApplySimple("'<A HREF=Main.aspx?evt=4001&src=Main.aspx.4001&reportViewMode=1&reportID=<REPORT ID>8&elementsPromptAnswers=<Attribute ID>;<Attribute ID>:'+ cast(#0 as varchar(20)) + '>' + cast(#0 as varchar(20)) + '</a>' ", [<Attribute Name>])

Attribute Example
ApplySimple("'<A HREF=Main.aspx?evt=4001&src=Main.aspx.4001&reportViewMode=1&reportID=94DBE7F7401376BEFA9481BF2A950C78&elementsPromptAnswers=9835B89B43F5BB045F8D25A061CA27C6;9835B89B43F5BB045F8D25A061CA27C6:'+ cast(#0 as varchar(20)) + '>' + cast(#0 as varchar(20)) + '</a>' ", [SELLER_LN_NBR])


URL Report Syntx:

IMPORTANT SYNTAX
&elementsPromptAnswers=<MY_ATTRIBUTE_ID>;<MY_ATTRIBUTE_ID>:<MY_ATTRIBUTE_ELEMENT>


URL Example


<Attribute Name>
This is the name of the Attribute you are going to create the link around

<MY_REPORT_ID>[b/]
This is the MSTR Internal ID. You can get this in either the desktop or the web interface. In Desktop just right click on the report and select properties. The report ID is the number to the right of "ID".

elementsPromptAnswers
This is composed of 2 parts. The first is the attribute ID and the second is attibute ID : the element ID. The synatax that will be in the final URL string will look like this <Attribute ID>;<Attribute ID>:<Element>

<MY_ATTRIBUTE_ID>
This is the MSTR internal ID. This can be found in the desktop interface by right clicking on the attribute that is listed within the prompt. The attribute ID is the number to the right of "ID".

<Element>
This is the actual element value


evt
3034 Subscribe to a report, Document or HTML document
3036 Send a report, document, or HTML document via e-mail on a schedule
3037 Send a report, document, or HTML document via e-mail now
3062 Export a report to a PDF
3067 Export a report or HTML Document
3069 Export a document
4001 Execute a report
4033 Execute a report by supplying a template and a filter
32001 Execute an HTML document


reportViewMode
1 Grid
2 Graph
3 Both


This is the raw syntax for an HTML Doc

Attribute Syntaxt
To a Document


ApplySimple("'<A HREF=Main.aspx?evt=32001&src=Main.aspx.32001&documentID=B717FBC248CA36DBD24D0E9AE0E23B10&Main.aspx=-CTOG*-BO1.Conduit+Development.0_&fb=0.F1EBCE6047D6BC6112610C8CAC5BA9DD.Individual%2BAsset%2BSummary.8.0.0-8.768.769.774.770.770.773.772.55.256.2_268453447.*-1.1.*0&elementsPromptAnswers=17B7FAA74FE9161953BD37B7F2CEDC47;17B7FAA74FE9161953BD37B7F2CEDC47:'+ cast(#0 as varchar(20)) + '>' + cast(#0 as varchar(20)) + '</a>' ", [SELLER_LN_NBR])

What it looks in the URI


I haven't tried it for multiple prompts yet.

Hope this helps.
 
I almost forgot. We are running 7.5.1
I'm not sure if this syntax will work for other versions. I would hope it would but you never know.
 
WOW!!! Thanks a million. We are 7.5.1 as well. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top