473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

selection formula not working in subreport

Hello to All,

I am using crystal report 8 and vb 6. I am passing query and selection formula to subreport. query working fine but selection formula not effecting on report.

If I use link subreport from MainReport.rpt & Subreport.rpt from crystal report then subreport shows data fine. but when I use selection formula from vb6 It duplicate records in subreport.
Expand|Select|Wrap|Line Numbers
  1.        With CrystalReport
  2.            .Connect = "Connection string" 
  3.            .ReportFileName="Mainreport.rpt"
  4.            .SQLQuery = "select * from table"   
  5.  
  6.            .SubreportToChange = "SubReport"
  7.            .SQLQuery = "Select * from table"
  8.            .ReplaceSelectionFormula ("{tb.EMPNO} = {?Pm-tb.EMPNO}")            
  9.            .Action = True
  10.  
  11.        End With
  12.  

Any help with advance thanks
Sep 1 '10 #1
0 1248

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: RedZebra | last post by:
Hi I am calling and viewing Crystal Reports in internet explorer(using ASP pages) by passing them the selection formula for the main report. Its working fine. The problem is when the report has...
2
by: £ukasz W. | last post by:
Hello everybody ! How is it in Selection Formula to work with Date type, for example to deduct 7 days, week, month, year from CurrentDate. I'm trying to use such a stetement (CurrentDate - Date...
1
by: Reny J Joseph Thuthikattu | last post by:
Hi, I want to create a a crystal report based on the DAteTime Range.Can any one tell me how do i pass the Values from the VB.NET.I am uasing Crystalreportviewer control My field is isin the...
2
by: carmen | last post by:
i have the folowing code Dim y As New frmCobranz Dim MyReport As New RPTCobranz MyReport.DataDefinition.RecordSelectionFormula = "{CobH.RelNbr}= y.txtNoRelac.Text...
7
by: Helen | last post by:
vb .net 200 crystal reports Oracl Acces Hi, I have all selection formula results needed from the main crystal report, called in the vb form (Oracle db) I now need to build in the logic in...
0
by: Jasper Jones | last post by:
I have a Crystal report that shows me a list of sales and which customer bought them, I would like to get a distinct list of customers, is this possible with crystal's formulas? This is my...
0
by: zafar | last post by:
I need to Use selection formula for crystal report (user may give 1,2,3 ... or more criteria for report) what is the syntax for that. secondly how to use "views" in crystal report . Thanx if any...
2
by: wafa | last post by:
bonjour je m'appelle wafa je suis besoins de vous , j'ai un probleme dans les etats en vb.net ,je ne sais pas comment s'affiche un etat des employés entre 2 dates defferents c_à_dire j'ai une...
0
by: nikhilshah01 | last post by:
Group ID 1 name, tool, history_action.timestamp name, tool, history_action.timestamp Group ID 2 name, tool, history_action.timestamp name, tool, history_action.timestamp I need to publish a...
0
by: Zuhaib Hyder | last post by:
TreeView node selection not working with PopulateOnDemand, any idea?? i want to select each node on click... even when any file opens in right frame in response of click on Treeview node on left...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.