Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 31st, 2006, 12:53 PM
Registered User
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling a subreport through a hyperlink

Hi All,

I'm trying to call a subreport through hyperlink on a report field and passing that field value as a parameter to the subreport.

My environment is 'Business Objects Enterprise XI', 'Crystal Reports XI' and we are using DHTML viewer.

A small example on any version will be helpful. Also let me know if any configuration is required at server side.



Old April 17th, 2007, 02:43 PM
Registered User
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

I have used following URL to link my reports together. I can drill down to other reports indefinitely using the following URL. Please use the following URL as an example to construct your own URL.

"http://yourservename/crystalreportviewers11/viewrpt.aspx?id=17776&prompt0="+'"'+{?@i_BOMType}+ '"'+"&prompt1="+'"'+{?@i_PlanId}+'"'+"&prompt2="+' "'+{?@i_Branch}+'"'+"&prompt3="+'"'+{sf_standard_c ost_report;1.Item}+'"'+"&prompt4="+'"'+ToText ({?@i_AsOfYear})+'"'+"&prompt5="+'"'+ToText ({?@i_AsOfPeriod})+'"'+"&prompt6="+'"'+{?@i_CostMe th}+'"'

There are few important things to note in the above URL.

a) the URL should start with double quotes (“)
b) next string should be YourServerName/crystalreportviewers11/viewrpt.aspx?id=17776 Here "17776" is the report id of Sub Report. See the note for more details.
c) to pass in parameter values, the syntax should be &prompt0=”+’”’+{value}+’”’+”. Basically we want to store the values of parameters in double quotes otherwise the command will not execute correctly.

Note: the subreport id can be found under Report Properties in Central Management Control Window under File Name. See example below: frs://Input/a_238/069/000/17776/4b84b9800e4e336.rpt. Here subreport id is 17776.

zaki ahmed

Similar Threads
Thread Thread Starter Forum Replies Last Post
subreport srnarla Crystal Reports 1 August 31st, 2006 10:48 AM
subreport bib Visual Basic 2005 Basics 0 August 25th, 2006 12:56 AM
hyperlink in nested datalist calling a repeater debjanib C# 1 May 25th, 2006 08:17 AM
A subreport cannot contain a subreport. dkells Crystal Reports 0 March 3rd, 2005 06:05 PM
Calling crystal subreport in Visual Basic 6 maryjanedt08 VB How-To 2 December 3rd, 2004 06:01 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.