Solved

Crystal Report

Posted on 2009-07-02
2
509 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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