Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 11th, 2007, 12:56 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to suji_dec08
Default no datas displayed in subreports

i am using Crystal reports10. I have one main report and 2 subreports. i have added a .XSD file in my application and draged 3 tables from the database to the dataset.I binded the stored pocedures to the Maintable.For the main report i have written an stored procedure ie..sp_grpt_procedure and 2 separate stored procedures for 2 subreports.Parameter1 field is common to the main and the subreports. At design time i have selected the databases and binded the appropriate StoredProcedures to the main and the subreports. Now when i use different databases the mainreport displays correct data becoz at runtime i am sending the connectionstring to the dataset .But the subreports are displayed empty.
can anyone give me suggestion to solve this issue.

Protected CrvCAReportPreview As CrystalDecisions.Web.CrystalReportViewer
Dim objtds As New tdsDataset1
Dim objReport As New Report1 //Comment rpt file.
dim sConstr as string
sConstr = Session("ConnectionString") & ";persist security info=true"
 Dim col As New Collection
Dim arParams(0) As SqlParameter
 col.Add("MainTable")
 arParams(0) = New SqlParameter("@Parameter1", Session("Parameter1"))
objtds = SqlAssist.ExecuteTypedDataset(sConstr, CommandType.StoredProcedure, "sp_grpt_procedure", objtds, col, arParams)
  Session("tdsReport") = objtds.GetXml
 objReport.SetDataSource(objtds)
 CrvCAReportPreview.ReportSource = objReport
 CrvCAReportPreview.DataBind()


i have also tried another method by adding all the fields in the sp_grpt_procedure ie.. just in one storedprocedures i wrote the fields for the main and the subreport and modified the coding . for the subreports i have specified the same path as the mainreports xsd file.

Protected CrvCAReportPreview As CrystalDecisions.Web.CrystalReportViewer
Dim objtds As New tdsDataset1
Dim objReport As New Report1 //Comment rpt file.
dim sConstr as string
sConstr = Session("ConnectionString") & ";persist security info=true"
 Dim col As New Collection
Dim arParams(0) As SqlParameter
 col.Add("MainTable")
 col.Add("SubTable1")
 Col.Add("Subtable2")
 arParams(0) = New SqlParameter("@Parameter1", Session("Parameter1"))
objtds = SqlAssist.ExecuteTypedDataset(sConstr, CommandType.StoredProcedure, "sp_grpt_procedure", objtds, col, arParams)
  Session("tdsReport") = objtds.GetXml
 objReport.SetDataSource(objtds)
 CrvCAReportPreview.ReportSource = objReport
 CrvCAReportPreview.DataBind()

main report and subreport works fine in local system. when i use different databases mainreport works fine but subreport displays no data.
can anyone tell me how to solve this issue?





Similar Threads
Thread Thread Starter Forum Replies Last Post
how get the datas from browser machine azymd777 SQL Language 1 July 23rd, 2007 09:15 AM
About writing datas to DB from VB cnkumar74 Access 2 February 15th, 2007 08:41 AM
cant't read datas from database maxj JSP Basics 1 October 2nd, 2006 10:52 PM
getting datas from asp page by xml salimbasar XML 0 December 23rd, 2004 07:24 AM
Sending datas from the first page to the next ones mcber35 Access VBA 2 July 28th, 2004 11:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.