Solved

Crystal Report

Posted on 2009-07-02
2
504 Views
Last Modified: 2012-05-07
Dear, i have 1 main report and 1 sub report.
I want to pass parameter to my subreport using vb.net. i know how to pass parameter to main report but how can we pass the value to the subreport's parameter.
Note:
i want to explain my problem, i have one report having two column Agent name and Creditlimit, and i have subreport having Buyer name and due amount.
i want to pass my agent name throught vb.net2005 (in main report i know how to pass). but i want to pass to sub-report's parameter,  please one point keep in mind, i dont' have Agent name column in subreport. hope so u understand my point.

my sub-report depends on one procedure which is havine one parameter
0
Comment
Question by:mahmood66
2 Comments
 
LVL 5

Expert Comment

by:dhobale
ID: 24763267
Use a selection criteria for your subreport as:

({SUBREPORT TABLE.AGENTNAME} = {?Pm-MAINTABLE.VALUEOFTHEFIELD})

OR

({SUBREPORT TABLE.BUYERNAME} = {?Pm-MAINTABLE.VALUEOFTHEBUYERFIELD})
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 24765758
ONe way to do this would be with a shared variable.

In the main report add a formula to the report header.
WhilePrintingRecords;
Shared StringVar AgentName;
AgentName := {?AgentParameter};

In the subreport you can use the value in formulas
WhilePrintingRecords;
Shared StringVar AgentName;


mlmcc
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now