Solved

Recursive table in Crystal Reports

Posted on 2006-06-13
9
1,223 Views
Last Modified: 2012-08-13
Hi,
 
      Can anyone help me to print recursive table in crystal report 8.5? I have a table in Sql Server which is recursive.(Id is primary key & parentId is the foreign key).I want to sent any Id to crystal report & it should print all the child nodes of that Id.(something like a treeview in vb)
0
Comment
Question by:rkvk
  • 3
  • 2
  • 2
9 Comments
 

Expert Comment

by:RPannett
ID: 16911966

  If you have a fixed number of recursion levels, then you can treat it like a "self-join" - create a separate aliase (reference, whatever..) to the table for each level of recursion.

  Or..is your question more how to get the display of the report to work the way you want?  In Crystal, each level could be a "group" based on a different table reference if you used my idea above..
0
 

Author Comment

by:rkvk
ID: 16949253
hi,

 Sorry its not fixed number of recursion.When I pass the Id it should get all of its children as groups in the reports.
0
 

Expert Comment

by:RPannett
ID: 16950471
I see! Unlimited recursion in Crystal reports is beyond my experience, sorry!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Expert Comment

by:AHMKC1
ID: 16951373
If you use Crystal Report Viewer Control then you can do it by define Recordset

"Select * From Table Where ParentID=" & textID.Text & ""

set this recordset as report recordset

0
 

Author Comment

by:rkvk
ID: 16966904
let me trt it & get back to you
0
 

Author Comment

by:rkvk
ID: 17023397
hi,
 
 Sorry am not using viewer control
0
 
LVL 6

Accepted Solution

by:
AHMKC1 earned 250 total points
ID: 17116824
if you use Crystal Report control then in you report file create a paramenter field (paramID) on field ID

Then on your form write follwing code

CrystalReport1.ReportFileName=Your report File Path
CrystalReport1.ParameterField(0)="ParamID;"& textID.Text & ";True"
CrystalReport1.Action=1
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

920 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

12 Experts available now in Live!

Get 1:1 Help Now