Solved

Crystal Report

Posted on 2009-07-02
2
510 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 101

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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

729 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