Solved

Recursive table in Crystal Reports

Posted on 2006-06-13
9
1,221 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
hasOne  challenge 59 90
allStar challenge 1 41
nestparen challenge 4 56
python question 5 58
A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

758 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

19 Experts available now in Live!

Get 1:1 Help Now