Solved

Recursive table in Crystal Reports

Posted on 2006-06-13
9
1,227 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …

773 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