Crystal Reports - Subreport SQL


I have a Crystal Report that I access from a VB program and I send an SQL statement to the main report, but I also want to send the subreport a different SQL statement to execute.Do I need to pass it a parameter? Or how would I code it in VB to execute inside the subreport?Please help! Thanks!

View Answers
Very similar questions


Dynamicalt Changing Sql Query In Crystal Sub Report www.codeguru.com

I m using Crystal 8.5 with VB6.i had make sql change in main report butHow to make to send a SQL request for the subreport ???Iresh

Crystal Reports SubReports... www.xtremevbtalk.com

So how do I change the SQL statement for a Crystal Report SubReport in VB??Thanx In Advance,->Noah

Get Crystal Subreport Name www.xtremevbtalk.com

HiI have a crystal report with many subreports in it. These subreports are in the report footer section of the crystal report. I have figured out the code to loop through the subreports but I just cant figure oout the code to get each subreport name?Does anyone know how to get the subreport names? Thanking you in advanceSL55

Calculating Subreport-fields In CR www.vbforums.com

Hello,I've created a report in Crystal Reports which containsa subreport.In the subreport are some values. For example:Student1 '--- Main Report Course1 15 pt '--- Subreport Course 16 pt '--- SubreportStudent2 '--- Main Report Course1 17 pt '--- Subreport Course3 15 pt '--- SubreportStudent3 '--- Main Report Course1 16 pt '--- Subreport Course2 15 pt '--- Subreport Course3 17 pt '--- Subreport In the main report i want to do some calculations withthe points, but i can't access the fields.Can you help me out there?

Crystal Report Passing Parameters In Subreports Using Dataset? stackoverflow.com

We are getting correct output for crystal report using dataset which does not have a sub report.But it does not work for subreports?

Crystal Report SubreportCan Grow Does Not Push Following Data Down On Page www.vbforums.com

Hello everyone. I looked in the posts for this but could not find one that answered my question.I have an embedded Crystal Report in my VB app. I have a subreport that is set to 'Can Grow'. This subreport is placed in the Report header of my report.The subreport does grow. The problem is, I have some text underneath the subreport in the same report header, but the subreport does not push this data down.Anyone have any suggestions?Thank you.

Crystal Report Display visualbasic.ittoolbox.com

I am working on a report, using vb and crystal reports.I have on-demand subreports in my main report.When I click on th link,I want the subreport data displayed just below the mai report data, and not seperately.Preferably I would like th design as, showing a + symbol for subreport.If the + is clicke it should show the subreport, just below the main repor section.If once again, the + is clicked it should hide th subreport.Please help.Thanks

Get Report Page Number www.xtremevbtalk.com

Hi I havew a report with many unlim=nked subreports in its report footer section. I have created a seperate section here for each report I put in. On each subsection I placed the special formula field PageNofM. When I view the report using the crystal report viewer through vb, I would like to know how to get a subreports page number Through code, Ie in the program I pass through a subreport name and the code looks for that subreport and returns its page number.Thanking you in advanceSL55

More Than 1 Subreports In Crystal Report www.codeguru.com

I'm trying to run Crystal report containing 2 subreports from VB6 application.If report itself and all subreports are based on SQL Server SPs then it's slow. I was suggested to pass ADO recordsets as datasources at run time. This scenario increased the speed dramatically. But there is a problem when the form with Crystalviewer is closing. The application just crashes without any messages.Just for testing purposes I tried to use the simplest sets of data (2-3 fields without any joins) for all recordsets. Even in this case the application crashes.Everything is fine when there is only 1 subreport. If 2 or more then there is a crash.Is there anybody who successfully uses Crystal report with more than 1 subreport? I'm asking only about reports which get there data from recordsets.I successfully created a report with several subreports but they are based on XML files.I need by some reason to base them on recordsets. They are created on TTX files and during run time ADO recordsets are passed.Vlad

Crystal Report Subreport With SQL Database Not Logging In. www.vbcity.com

Hello All,I am trying to display a crystal report that has 2 different databases. The main report only uses an Access database. The subreport uses an SQL database that requires an ID and Password and the same Access DB but a different table. I do not need to pass any parameters to the report, I just want to show itWhen I try to show the Crystal report I get an error:Quote:Login FailedDetails: ADO Error Code: 0x8004034dSource: Microsoft OLE DB Provider for SQL ServerDescription: Login failed for user 'sa'.SQL State: 42000Native Error: 18456How can I pass the password to the sql database in the subreport.Here is my current Code:Code:Dim oApp As New CRAXDRT.ApplicationDim oRpt As CRAXDRT.ReportPrivate Sub ExitBut_Click()    Set oApp = Nothing    Set oRpt = Nothing    Unload CrystalFromEnd SubPrivate Sub Form_Load()                'define the crystal report to be used    Set oApp = New CRAXDRT.Application    Set oRpt = oApp.OpenReport(App.Path & "ReportsSpecialItemsTest.rpt")                'Display the report    CRViewer91.ReportSource = oRpt    CRViewer91.ViewReport    CRViewer91.Refresh    End SubI have tried working with the LogOnServer method but I get the same message. (Probably because I am doing it wrong). DanEdited by - dvmc on 9/26/2005 4:54:10 PM

Unable To Set A Linked Subreport SQLQueryString Property www.vbcity.com

VB 6, Crystal Reports 9I have a report that has a subreport. The subreport is linked to a report field on the main part of the report. Via Visual Basic the user creates the required query for the subreport. I tried to set the subreport’s SQLQueryString property to the users/new query. But when VB executes the code to set the SQLQuerySring property the crystal report engine/object displays a “Enter Parameters Values” dialog box look for a value to be entered for the main report field that the subreport is linked to.How can I suppress the “Enter Parameters Values” dialog box and keep the link between the main and subreport once the subreport’s query has been changed?

Coding To Insert Subreport Within Subreport visualbasic.ittoolbox.com

Sir, I'm using VB.Net and uses the Crystal Reports inVB.NET.I'm having problemsIn crystal reports , is there is any way to insert asubreport within a subreport.If not possible how can i achive this in coding.I need the output in the following format.e.g., Order ID ProductID Quantity Product ID ProductName Unit SupplierID Supplier ID Supplier NameThe first two line can be get easily using subreports.But i'm not able to add a subreport within asubreport.How can i achieve thispls help methanks and regardsManivannan.V

How To Display A Crytal Report Wid A Subreport In Vb.. www.xtremevbtalk.com

how to diplay a crystal report with a subreport with the same parametervalue using visual basic 6..

Passing Data From Subreport To Main Report social.msdn.microsoft.com

I need to convert a Crystal report that contains three subreports. Each of these subreports uses a different stored procedure to obtain data. The main report uses data from these subreports to calculate averages in the footer etc. � How do i get�the data contained in these subreports so i can use it in my main report?? Thanks in advance

Stored Procedure Parameters For Crystal SubReport www.codeguru.com

I need to create Crystal Report wich includes several subreports. I can link subreports using fields in the main report. But I think it's going to affect the performance. I would like to base my subreports on stored procedures with parameters. I have no idea how to get values from main report and send them as parameters to the subreports. I'm not even sure that it's possible.Any info about this issue please.Thank youVlad

Crystal Reports :: Passing A Parameter To A Subreport? forums.asp.net

I have a Crystal Report with several Subreports embedded within the main report. These subreports are built from stored procedures that require parameters. Is there a way to pass parameters programatically to the subreport? I have tried the following code which causes an exception when I try to set the parameters for the subreports. [Code].... I get the error NotSupportedException was caught Not supported within subreports.

How To Set Subreport Data Source On A Crystal Report www.codeguru.com

Hello!I'm using Crystal Report 6.0 with Cristal Report Viewer and need to set a new data source for the report and its subreport.How to use SetDataSource from the Report and its Subreport to my Recordset. I know what to do for an report without a subreport but for the two, no.Thanks

Crystal Report - Displaying Data From Several Tables www.daniweb.com

I have made a crystal report, to be able to display data from several tables in the same report I have made a few subreports. But when I display the report some of the subreports grow beyond the next report, why doesn't the next report move further down and start after the first subreport is finished?

Crystal Reports - Printing Error www.codeguru.com

Hai All, Can you have your help for a solution to the following problem with crystal reports.I have designed a crystal report which has hyperlinks to different subreports. If I select any one of subreports and give print, it is printing fine. When I again print the same report immediately after the first print, VB6 application error, memory could not be referenced error is thrown. What could be the problem. PLease helpRgdsAngu

Crystal Reports: File Not Found www.vbcity.com

hi there all trying to load a crystal report and i get this messageQuote: crystal reports viewer: file not found this has somthing to do with the subreport that i have in it,if i delete the subreport the report will load with no problems.can some one help here ???

How To Call A Crystal Report With Cross Tabs /subreports From Vb visualbasic.ittoolbox.com

Hello,I am looking for a way of calling a crystal report withcrosstabs/subreports.I was able to call a simple crystal report using crystal report control..but whenever I add a crosstab to the report, there is a run time error of20998.vb6 and crystal report 7.Thanks,Tania.

Working With Crystal Subreports www.codeguru.com

I've made a crystal report that contains a subreport. When I have the report on screen and I click it in order to see the subreport, I get the next error from the database (I'm using Oracle provider to connect to the database):"ORA-01017 invalid username/password; logon denied"I have set the connection to the database for the report, but I didn't know that I have to do the same for the subreport. The VB code I've used goes like this:private Sub Form_Load() Dim CrystalApp as new CRAXDRT.Application Dim CrystalRpt as CRAXDRT.Report Dim cnn as new Connection Dim rst as new Recordset Dim sql as string Screen.MousePointer = vbHourglass cnn.Open "Provider=MSDAORA.1;Password=pswd;User ID=user;Data Source=scmgtd;Persist Security Info=false" sql = "SELECT field1, field2, field3 from table1" set rst = cnn.Execute(sql) set CrystalRpt = CrystalApp.OpenReport("ReportName.rpt") CrystalRpt.Database.SetDataSource rst Load frmPreview 'The form that contains the CRViewer With frmPreview .CRView.ReportSource = CrystalRpt .CRView.ViewReport Screen.MousePointer = vbDefault .Show 1 End With Screen.MousePointer = vbDefaultEnd SubDo I have to set the connection for the subreport? If I had to, How?Is other the error? I'll appreciate any help...

Crystal Report Control And Subreport Problem www.xtremevbtalk.com

I have made a report using Crystal Report 8.5 which has a sub report.I can view the report properly when opened with Crystal Report software. I can even view the sub report (which is in suppressed mode). I am now using crystal report control in vb6 to show the report to the user through my application. Though i am able to view the report properly, i face an issue, i dont get to see the subreport

Problem Deploying Subreports With Main Report social.msdn.microsoft.com

Hi All, Here's my problem. I have an SSRS report with subreports on it. The main report and subreports work fine on my machine when I run the main report. However, when I deploy them to our test server and change the server name of the shared datasource, only the main report brings back data. The subreports show an error of something like "Error in displaying the subreport" for each subreport. The subreports require parameters that I believe I am supplying from the main report. What am I doing wrong? Is it really necessary to deploy the subreports with the main report to the new server. With Crystal Reports, I didn't have to do this. Any thoughts or suggestions would be appreciated.

**RESOLVED**Crystal Reports / Make Subreport Flow From Page To Page www.vbforums.com

I have a Crystal Report with a number of subreports. One of the details sections of the main report includes a subreport. I would like it if when I ran the report, it would allow the subreport to be split within several pages. Currently, the subreport shows up on page 2. I would like it to be split between pages one and two.This is what makes this problem interesting. The subreport exists in the Details d section of the main report. Details d is not checked as Keep Together or New Page Before. The details section before Details d (Details c) is not checked for New Page After. If you go into edit subrebort for Details d, the Report Header has New Page Before checked off, but it is disabled (I can't change it).How do I make this subreport flow across pages? Why is the Report Header section of my subreport checked for New Page Before but does not allow me to uncheck?

Crystal Reports :: Implement Multiple SubReport Using Parameters Passed To Subreport? forums.asp.net

iam really new to Crystal Report XI Release 2..iam using multiple subreport in mainreport and onclick of particular subreport it would list out all items related to it..for example if u have customer chart(subreport) in mainreport and onclick of this it would list all customer on demand and subreport is binded and onclick of single customer it would list out single customer which sholud be passed as parameter it would get customer(full Contact details) in another subreport.if this can be done. how it can be done and explain in steps how it can be and if possible with screen shots

Crystal Reports - Read Displayed Data From The Report. www.codeguru.com

I am using crystal reports to display Reports in my program. I use VB Report Designer Component.To display the report I use ADO recordset as the datasource.Is there any way to read the data which is already displayed in the crystal reports. May be some kind of interface?I created a Group Section and a Details section.I have created a subreport(on demand subreport) in the group section, before the subreport is displayed i need to identify on which Group the user has clicked.Private Sub CRViewer1_DrillOnSubreport(GroupNameList As Variant, ByVal SubreportName As String, ByVal Title As String, ByVal PageNumber As Long, ByVal Index As Long, UseDefault As Boolean) 'CRAdoRs is the datasource, ADO Recordset CRAdoRs.Move Index, 1 'Read all the items from the recordset ''''' '''''End SubThe above code works fine for the first page, on the second and subsequent pages the 'Index' starts again from 0 and i get the wronge values .Any ideas read the data which is already displayed in the crystal reports?Thanks.'CRAdoRs is the datasource, ADO Recordset

Error Out Of Stack {Crystal Reports} www.xtremevbtalk.com

I have designed a Report which contain 4 subreport.first 3 report doesnt occur any problem but when i add my 4rth subreport it works properly two times but third time it show me the report but when i want to print the report some time it show me Oout of stack error ant some time Crashed the project i dont know how could i solve the problem.Please anyone help me.i am using crystal report 9 for reporting.

Using Subreport In VB.NET visualbasic.ittoolbox.com

Hi All,I have a report using subreport created in crystal report v8.5The report retrieves the data using oracle9i stored procedureThe main report and the subreport using different stored procedureswhich has its own parameters.(Let's say main report using spA and subreport using spB)In the report, I have link the parameters between main report andsubreport in order to call that report we don't need to provide each ofthe parametersThe problem is how do I call such that report in VB.NETIt works well if I'm not using subreport.I already tried some methods but nothing works :(The methods are:1. setting the subreport's datasource using dataset whose table arepopulated from spB, but I got this error: "Error in File <physical pathof the report>: The request could not be submitted for backgroundprocessing."2. If I don't set the datasource I would get this error "Missingparameter field current value"3. Apply logon info, so I just loop all the tables in thereportdocument.database and apply it, but I got this error: "Thedatabase driver used by this report is not supported by this product"This problem has been bugging me for more than 2 weeks :(Anybody could help me out...Are there any methods or probably one of the methods above is valid butI just miss something so I got those errors.ThanksRegardsGusdianto

How Can I Use Subreport In Crystal Report ? www.vbcity.com

During the time of work with crystal report data in main report is shown properly but data in subreport not display when i am trying to open individual subreport data in subreport display properly what shoud i do ?

Crystal Report OCX Change Database www.codeguru.com

Hello,I create an CrystalReport 'report1.rpt', which includes the subreport 'report1a.rpt'. The database connection is to MS-SQL-Server.Now I want to run this report on an other computer,only with the runtime-files from CrystalReport.The name of the database is different to my database.I work with the OCX-Control,Crystal Report 7.0.With 'RetrieveDataFiles' I get the number of the tables in the main-report.With 'Datafiles (i)' I get the tables of the main-report.I also get the subreports, with 'GetNSubreport()' and 'GetNthSubreportName()'.But after I set the subreportName to 'SubreportToChange'- &gt; I don't get the 'Datafiles(i)' of the subreport.And when I call 'RetriveDataFiles' once more, I get the 'Datafiles(i)' ofthe main-report.How it works, change the database of a report with subreport ?

Repeating Header In Subreport www.xtremevbtalk.com

Hi,I have a Crystal report that includes three subreports. I should repeat header of subreport on each new page of the subreport. It is easy to do with page header in report but supreport hasn't a page header section.Any idea?Thank you in advanceHave a nice dayZoki

Nested Subreports www.vbforums.com

HiI am developing a system that has a hierachical system of data - the hierachical flex grid control creates the perfect on screen view of this data.My problem is how do I make a report that looks like this?I thought nested subreports would work well but MS Access only allows 2 nested subreports and the version 6 of crystal reports only allows 1 nested subreport.If anyone can help I would be very appreciative.Thanks.Simon

Can A Subreport Have A Stored Procedure (through An Sql Pass Thr - Version: 2003 (11.0) www.utteraccess.com

Hi all. I am working on an Access Report that I would like to have most of the data pull from SQL Server. I have 2 of the 3 parts, but I need help on the one of the parts. This is what I have so far: Main Report (Record Source: Stored Procedure that accepts a parameter) -->SubReport 1 -->SubReport 2 (Record Source: SQL View, linked to the main report by the customer number) I would like the record source for SubReport 1 to be a stored procedure (will be linked to the main report by the customer number as well), can I do this? The reason I want to do this is because the report was originally all done in Access with many queries, by making the main report and subreport 2 look at SQL it cut the time to run and display in half. Now, I want to work on Subreport 1, if the answer to my question is YES, then i'll give details as far as what I want subreport 1 to do. Thank you in advance!

Passing Mulitple Recordsets From VB To Crystal Reports www.xtremevbtalk.com

(Using VB v6.0 and Crystal Reports v9.0Hi,I want to pass multiple recordsets from VB to Crystal Reports. I know how to pass one. In my main report in Crystal Reports I have subreports, this is why I want to do this. Can someone help me please?Thanks a lot.Nadisha

Crystal Report (Page Header) www.vbcity.com

Hi,When I use crystal reports in my VB application, the pageheader allows me to repeat this header at each page.However, when using subreports, the pageheader in the subreport disappears. This means that at the beginning of my subreport, I have still my header (telling me the meaning of the following records), but when my subreport gets longer then 1 page, at the second page, the headers are not printed...Anybody ideas ???Kind regards,wdb

I Can't "show Sql Query" - Crystal Report 8.5 www.xtremevbtalk.com

Hey Guys, all fine ? I created a report and using 3 tables( or more) with joins, group and etc. And this report calls a subreport. Well, the report is perfect, no problems! But, i can't see your sql definition(In crystal report, menu database,Show sql query) and, in Visual Basic i need to set a similar sql of report, only changing the where clause, by filter controls in VB.In old times, i have used crystal report 8, and can show sql query.In VB, how i can input a sql string in report, after execute it ?How i can show sql query in CR?Please, i need this help with urgency! The rope is in my neck! =(]Thanks a lot!

Any One Plzzz???? www.vbforums.com

HI, please answer to these questions ..its very urgent..1. In sql server 2000 functions (return type table) available. whats the advantage of its over view and stored procedure??2.In crystal reports , how can i change particular word in a formula as bold,colored...??3.In crystal reports , how can i access values from sub report to main report. I know that shared and global variables are used for this. but how can i retrive this value in the main report. pls give example for shared variable and Global variable???4.In crystal reports, while i am accessing subreport to main report with report header generates error. which property helps me to avoid this error??5.In crystal report, any way other than report query to generate scripts. I mean like stored procedure can i write script into the crystl reports?? Thanks In Advance

Crystal: Change Subreport Orientations www.xtremevbtalk.com

Greetings,I use crystal Reports 8.5.I would like to have a subreport in my last report page (already have enabled "new page before" my subreport's section) shown at my crViewer in Landscape orientation, whereas the original report is in Portrait. Is it possible?thanxs in advance

Parameters In Crystal Reports www.vbcity.com

Hi, allI use the crystal report with VB 6 and I have one report with 3 subreports.Each band works with a stored procedure.The stored procedures haves the follow parameters:Subreport 1 - SPU_STATEMENT1 1122 <<<<< Just one parameterSubreport 2 - SPU_STATEMENT2 1122, '12/31/2005' <<<<< Two parameters, one integer and one dateSubreport 3 - SPU_STATEMENT3 1122 <<<<< Just one parameterNow, I need the VB 6 application suply these parameters to the report, when I click in one button.How do I make this?Thanks since now,Alex

Transmit Parameter To Subreport. www.xtremevbtalk.com

I want to print out a report (Using Crystal report to design). This report contains 3 subreports. And now I want to transmit parameters to its subreport. Pls show me how to do this.Thank you very much.

Call Reports With Subreports Made In The Crystal www.vbforums.com

Hi I do the report with Crystal Reports with 2 subreports, using database access, I do not know call this reports from VB with subreports. If somebody has a example, please send methank you in advance

The Field Is Not Known With Crystal Reports 10 www.xtremevbtalk.com

I have integrated a crystal report (v10) vs visual basic.My report has one subreport... I have linked this one with the report main. The first time I execute the report is ok. All information attached is displayed sucessfully. However, if I execute it again with the same or different data (filter with combo boxes) crystal reports shows me the next error: 'The field is not known' associated with CRViewer1.ViewReport methodDo you have any idea about this error?Any suggestion will be appreciated.Thanks

How To Connect SQL Server 2000, Crystal Reports 8.5 And Visual Basic 6 www.vbcity.com

Hi guys,I have been using this forum for a while but only joined yesterday to post this information. Like most people I was having great difficulty in getting SQL Server 2000, Crystal Reports 8.5 and Visual Basic 6 to work together to produce reports for the end user. My main problem was the error 'SQL Server has not yet been opened'. This was due to my report having subreports within it, which nobody anywhere has properly explained.As this took a good bit of searching and also my own coding to resolve this I thought I would post the end result on here for anyone else who was having the same difficulties.2 Ways to do this are... Passing a SQL Query to a report or by Passing parameters from a users input.First of all make sure that the Component Crystal Reports Viewer Control has been added to your project. Next make sure the 2 References - Crystal Reports Viewer Control and Crystal Reports 8.5 ActiveX Designer Run-Time Library have been added.Now for the code...Add the following to the general declarations area:Code:     '****************************************************************************************    ' General Declarations for working with Crystal Reports    '****************************************************************************************  Dim crxApp As New CRAXDRT.Application  Dim crxRpt As CRAXDRT.Report  Dim crxTables As CRAXDRT.DatabaseTables  Dim crxTable As CRAXDRT.DatabaseTable  Dim crxSubreportObject As CRAXDRT.SubreportObject  Dim crxSubReport As CRAXDRT.Report  Dim crxSections As CRAXDRT.Sections  Dim crxSection As CRAXDRT.Section  Dim crParamDefs As CRAXDRT.ParameterFieldDefinitions  Dim crParamDef As CRAXDRT.ParameterFieldDefinitionNext place the following code behind the command button, REMOVING the code Way 1 or Way 2 depending on your application.Code:Private Sub cmdSubmit_Click()     '****************************************************************************************    ' Variables declarations for the Database Connection    '****************************************************************************************  Dim strServerOrDSNName As String  Dim strDBNameOrPath As String  Dim strUserID As String  Dim strPassword As String      strServerOrDSNName = "servername"        'replace servername with your SQL connection server  strDBNameOrPath = "databasename"        'replace databasename with your SQL connection databasename  strUserID = "userid"                    'replace userid with your SQL connection userid  strPassword = "password"                'replace password with your SQL connection password     'Open the report  Set crxApp = New CRAXDRT.Application  Set crxRpt = crxApp.OpenReport("C: est.rpt")     'Set the connection for the report.    'SetLogOnInfo is a deprecated method in CR 9, but still works.    'The suggested method for CR9 is to use the ConnectionProperty object.  crxRpt.Database.Tables(1).SetLogOnInfo strServerOrDSNName, strDBNameOrPath, strUserID, strPassword     'This removes the schema from the Database Table's Location property.  Set crxTables = crxRpt.Database.Tables  For Each crxTable In crxTables      With crxTable           .Location = .Name      End With  NextWay 1 - Passing a SQL Query string    '***************************************Start of Way 1*************************************     'The select query to reutrn the data required  crxRpt.SQLQueryString = "SELECT whatever FROM table WHERE blah blah" 'Input your SELECT query here    '****************************************End of Way 1*************************************Way 2 - Passing Parameters from a users input    '***************************************Start of Way 2*************************************     ' Disable Parameter Prompting for the end user    crxRpt.EnableParameterPrompting = False     ' Gather the list of available parameters from the report    Set crParamDefs = crxRpt.ParameterFields     ' Loop through all parameters in the report by name, filling in the appropriate parameter with the right value    For Each crParamDef In crParamDefs        Select Case crParamDef.ParameterFieldName            Case "JobNumber"                crParamDef.SetCurrentValue txtJobNumber.Text            Case "POStatus"                crParamDef.SetCurrentValue POStatus            Case "PODetail"                crParamDef.SetCurrentValue PODetail            Case "WOStart"                crParamDef.SetCurrentValue txtWOStart.Text            Case "WOEnd"                crParamDef.SetCurrentValue txtWOEnd.Text        End Select    Next     'Loop through the Report's Sections to find any subreports, and change them as well    Set crxSections = crxRpt.Sections        For i = 1 To crxSections.Count        Set crxSection = crxSections(i)                For j = 1 To crxSection.ReportObjects.Count                    If crxSection.ReportObjects(j).Kind = crSubreportObject Then                Set crxSubreportObject = crxSection.ReportObjects(j)                                'Open the subreport, and treat like any other report                Set crxSubReport = crxSubreportObject.OpenSubreport                Set crxTables = crxSubReport.Database.Tables                                For Each crxTable In crxTables                    With crxTable                        .SetLogOnInfo strServerOrDSNName, strDBNameOrPath, strUserID, strPassword                        .Location = .Name                    End With                Next                            End If                    Next j            Next i    '****************************************End of Way 2*************************************    'View the report  CRViewer1.ReportSource = crxRpt  CRViewer1.ViewReport     'Set the Zoom on the report  CRViewer1.Zoom (90) End SubWay 2 involves passing parameters to your report, this means your reports MUST use these parameters within the report.Hope this helps out!!!

Please Help With A Solution www.vbforums.com

HiI've been trying to solve a problem for the last 2 weeks but have lost miserably to the powers that be.The project is as follows: Create a form with the Crystal report viewer control on it. Simple enough? Yes. I got that. However, the group tree must show the subreports in the main Crystal report. These subreports have placed into the report footer section of the main report. I could not get the group tree to show these reports as the grouptree only shows the groups in the reports.I tried duplicating the tree structure in XML, disable the group tree in the Crystal report viewer, and add my own treeview with the report tree that I created in XML.Is this a good solution to the problem or does anyone have a different perspective on solving this problem?Thanking you in advancePORRASTAR

Record Selection Question/Options www.vbcity.com

Development Environment: Visual Basic 6, Crystal Reports 9.0, MS SQL Server 2000I have a report with 5 subreports. The Detail section (main table) of the report references 43 fields from a SQL Table. 16 of 43 fields are numeric code values which are used to reference a text value from another table (code value table). The text value from the other table is what is required to be displayed in the detailed section for the 16 fields.Any ideas of the best way to handle this situation?Here my thoughts- Create a Look-Up function in the report that would return the text value from the code table of the code that was passed to it. I would then setup each of the 16 fields of the report as formulas that would call my Look-Up function. - Create ADO recordset and join the number codes from main table to the code value table. If this is the best way I could use some help (code sample if possible) regarding using ADO recordsets with crystal reports 9. Will a Crystal Report TTX file be required?

Subreport Width Expanding Beyond Width Of Container Report social.msdn.microsoft.com

I have a subreport on my main report, and the subreport contains a matrix.� When I run the report, the subreport seems to expand beyond the width of the main report.� The matrix itself does not expand beyond the width of the body of the main report, but for some reason it seems that the subreport does.� The subreport does not contain any headers that might be messing up the width.� If I cut and paste the matrix from the subreport directly onto the main report, and remove the subreport, it prints fine.� But as soon as I include the subreport on the main report it prints with blank pages because the subreport expands beyond the width of the body of the main report.� I have checked the width and margins on the subreport and compared to the width of the main report and all looks good.� Can anyone help? � Thanks.

How To Add Values From VB To Crystal Reports www.vbforums.com

Hi all,I have a project in which i have to take values to the crystal report right away from my Vb interface. Would you tell me how can i do this with an example or sample code.I have yet another prob.Am using 4 subreports in a Crystal reports. I want to take a sum value in the sub report to the main report .How can i do this.Pls HelpThanking you in AdvanceStanly Mathew

How To Control The CR Subreport Thru VB? www.xtremevbtalk.com

Does anyone here has any idea how to control the Crystal Report subreport thru Visual Basic? I want to control it just like how the main CR is controlled in VB.I have a project whereby there is a need for me to change the SQLQuery in the subreport or pass a selection formula into the subreport. I know it can be done, but I have no idea how to do it. Can all the experts here help me, plzzzzzzzzzzzz...Thanks.coo|dude

Reg-SubReports In Crystal Reports visualbasic.ittoolbox.com

Hi All,Thanks for all those coming forward to help me in this regards.I am developing an application with Visualbasic6.0 and Crystal report8.0. In the reports, i have to display data fetched from the database (Access) only in the last page of the report. For this i used subreport in crystal reports. I created this subreport using the insert menu. But this content is appearing all the pages of the report. The subreport derives the data based on the condition the main report uses to drive the data from the database. Code is given below.Dim myreport as new MainReportDim mysubreport as subreport ---- --strsql="select * from Table1 where column1='100'"adRsMain.open strsql,adoconn,adforwardomnly,adreadonlyset myreport.database.setdatasource adRsMainstrsql = "select * from Table2 where column1 ='100'"adRsSub.open strsql,adoconn,adforwardomnly,adreadonlyset mysubreport=myreport.opensubreport("subreport")set mysubreport.database.setdatasource adRssubcrviewer.reportsource myreportcrviewer.show-------------Subreport is in the pagefooter(section) of the report. I formatted the subreport by CHECKING the condition SUPPRESS and in the condition i wrote "OnlastRecord=false". The Subreport got suppressed in all the pages except the last page.But except the last page, the total height of the report shrinked.How can i suppress the subreport only in the last page without the report shrinked.Also sometime i am getting an error "First record can't be fetched".Please help me in this regards,ASAP.With thanks,K.Senthil Babu.

Crystal SubReports www.vbforums.com

Hi,I have problems trying to organise my crystal report. It's an invoice where a summary is given on the first page (report a) and the itemised sheets are given on subsequent pages (report b). I can't seem to be able to include report b as a subreport in my first page so both reports get printed in one go. Do I need to put it in the page footer or the report footer? I know the page footer gets repeated on all pages, but I want the subreport to show neatly on the 2nd page only at the top. If I put the subreport in the page footer only parts of it print and indeed I get the same section on all page, instead of the set of pages from the subreport.If I put it in the report footer, nothing gets printed.Any help, please?

Crystal 8 Control To Crystal 9 Viewer www.xtremevbtalk.com

I am migrating one application to Crystal 9 using a Viewer instead of the original application crystal control - all the reports are working well with the CRviewer9 except one.The one not working has a sub-report (so do some others, but they are fine).The subreport is in the report header section, and lists price-breaks for the item being reported on.There are only 2 lines of price-break, so only 2 lines should show in the report.I have 9 lines of detail in the report body (one line for each component of the item). Each price-break line is repeated nine times, so I have 18 lines in my price-break subreport, instead of 2.I have tried taking out all grouping, sorting etc. but nothing seems to make a difference.I had to change the data type from DAO to ADO and the crystal version from 8 to 9. Before this it was all working fine - any suggestions?

Suppressing Duplicate Subreports www.codeguru.com

I am using Crystal Reports 7 and have a subreport within my main report. The subreport can contain more than one records worth of data within the main reports group. The problem I am haaving is that if there is more than one record displayed in the subreport then the main report group is repeating itself for each subreport record. I've tried to select the "Suppress if Duplicated" option for the Subreport Format but the application is not accepting it (i.e. when I go back to it the option is unselected). Any suggestions?

Assign Databases To SubReports? social.msdn.microsoft.com

I have written a Visual Basic 2008 program which creates a Crystal Report upon completion. The Crystal report contains the main report and two SubReports. Every thing runs fine on my development machine. However, when I install the program at the client site, I get a dialog from Crystal wanting a user name an password. I notice at the top of this dialog that Crystal is pointing to the wrong SQL server. As you can see from my code below, the server name should be correct. So I am guessing that it is the sub reports that are generating this error. The sub report names are: rptPageOne and rptCostCenter How do I set the datasource for the sub reports? Or what else could be wrong?[code]...

Toggle Page Footer Visibility Based On Subreport Being Rendered social.msdn.microsoft.com

I want to toggle the visibility of a report item in my page footer based on whether or not a particular subreport�has been rendered. � The report has 3 subreports.��The subreport above the subreport in question can span several pages, so the subreport I want information on can render on page 1 (for a short report) or page 12 (for example) on a longer report. � �Is there a way to determine within the main report when a particular subreport has been rendered and is currently visible? � Thanks in advance for all replies. � John

Using Subreport Data In Crystal Report www.xtremevbtalk.com

I have a crystal report with a subreport in it. Is it possible to use data from the subreport to calculate a value that is displayed in the main report?

Subreport In Report www.vbforums.com

I'm working with VB6.0 and Crystal Report. I have some subreports in my report. I would like to hide or supress the subreport when there's no detail in it. Is it possible?. What do I have to do to do this?.Any advice will be greatly apreciatted.Nauj

Crystal Reports :: How To Create Sub Report By Linking It With Main Report forums.asp.net

In my project I have to create crystal report which includes subreport , the data of subreport must be linked with the field of the main report... Language is C#.net Web App.

Help Needed For Creating Crystal Report From VB www.vbcity.com

Dim rptDB As CRPEAuto.Database Dim rptTbls As CRPEAuto.DatabaseTables Dim rptTbl As CRPEAuto.DatabaseTable This are needed when a Crystal Report has subreports that may access different tables.How to go about doing it if i need to access different tables without a sub report and with s subreport???Thanks!!!

Parameter For Subreport www.xtremevbtalk.com

I have a report created from 3 subreports(using Crystal report). But the problem is that I don't know how to transmit parameters to subreports with VB code. Does anyone know how to do that, pls help me.Thanks for all your helps.

Invalid Subreport Name In Vb6 forums.devshed.com

Hi,I'm using a subreport named memberReport in crystal report.And while trying to open the sub report from Vb its giving me a error "Invalid subreport name"Anyone know what might be the problemThankyouRegardsRechen

Crystal Report Sub Report Query www.xtremevbtalk.com

I am using Crystal Report 8.5 Enterprise Edition. I have a report through which i am opening a subreport. Can i have more than one level of subreport.

Group Headers Not Printing www.vbforums.com

Help, I have a vb application that uses crystal reports 8. The report contains a subreport. My first problem was the subreport was not printing, that's been solved. Now the problem is the group headers are not printing. Can someone shed some light on this.

Crystal Reports Info www.vbforums.com

Where can I go to get some information on how to develop subreports in Crystal Reports? I'm new to CR and have a need to develop a report that has a couple of subreports in it.Chris

Need Help With IF THEN Statement www.access-programmers.co.uk

I have a text box that I'm trying to control the color of based off an IF then statement. Based off to If's If [Reports]![Rpt-Paths]![subreport].Report![ModuleCh] = "Ch - A" And [Reports]![Rpt-Run Paths]![subreport].Report![Status] = "0" Then This part works but I need to add a second one If [Reports]![Rpt-Paths]![subreport].Report![ModuleCh] = "Ch - B" And [Reports]![Rpt-Run Paths]![subreport].Report![Status] = "0" Then So I want the text box to be RED if the status of both Ch A and Ch B is 0 but if either one has a status greater than 0 then the text box would be green. Thanks Jon

Crystal Report Based On XML www.codeguru.com

I have a Crystal (v 9) report with subreports. The main report and all subreports based on XML files. Database Type (XML files) appears in Crystal environment as ADO.NET(XML). Because of this in order to run the report the user workstation must have .NET Framework installed. I do not need .NET Framework for anything else. Is there any way to replace ADO.NET(XML) to just XML without involving ADO.NET stuff?All my other Reports are based on Field Definition Files (ttx). But this one with subreports doesn't work on TTX. I would like to simplify the installation of my program (get rid of the need to install .NET Framework).Thanks for any help.Vlad

Crystal Reports :: Missing Parameter Values? forums.asp.net

I have a Crystal 10 report with 4 subreports, the main report and the first subreport use data from the same tables and then the other three subreports use common tables different from the main and first sub. I have an unused parameter (I can't find anywhere it is used) on report #4 but can't delete it because Crystal says that it is being used. Do I need to code for this parameter?I am not coding for the unused parameter. Each report uses a parameter named ?dir_id as part of the Selection formula. Following is my code and the error I am getting. [code] CrystalReportViewer1.EnableParameterPrompt = False CrystalReportViewer1.SelectionFormula = "{Print_Req.Dir_ID}= [code].... [error] Exception Details: System.Runtime.InteropServices.COMException: Missing parameter values. Source Error:[Code].... Stack Trace: [Code].... [/error]

A Subreport Which Aslo Has Another Subreport In A Master Report social.msdn.microsoft.com

� Can we include a subreport which aslo has another subreport in a master report? (assuming all three reports have parameters too) � Thanks

Subreport In Subreport www.xtremevbtalk.com

Is it possible to have a main report which contains a subreport...and that subreport contain a subreport?

Include Formulas In Selection Criteria www.xtremevbtalk.com

Hi,I've problem here about how to included the formula value in sql statement in crystal report.I was code the sql statements in crystal report. And the formulas(use to capture input from user in VB) was success pass to crystal report.but how to include it to sql statement in crystal report?Thanks in advanceregard,lim

Working With Crystal Reports Within Visual Basic www.xtremevbtalk.com

I am currently developing a Visual Basic Program that will use Crystal Reports as a reporting tool. I have installed Crystal Reports Developer 8.5 in order to get the Crystal Reports Tools.The program that I am writing had been developed with an ADO connection to a MS SQL Server.I am unsure how to make a connection for the Crystal Report viewer in ADO, and how to pass records from a SQL statement to the report. Can anybody help me.

Selection Formula To Subreport: Crystal Reports www.xtremevbtalk.com

I've never used the subreport feature of Crystal report and do not know how to call up a report that has them from VB. I have a report with 3 subreports. I need to have the reports only display values for a specific date. How do I pass the selection formulas to the subreports? Is it just the normal way? I use this to select the records of the primary report, but the subreports are showing all dates.... Code:With CrysReport .ReportFileName = App.Path & ReportName .DataFiles(0) = App.Path & "DB.mdb" .SelectionFormula = Selection 'defined my selection formula elsewhere .DiscardSavedData = True .WindowState = crptMaximized .Destination = crptToWindow .Action = 1 End With

Subreport In Group Of Table social.msdn.microsoft.com

� Hi all, � I am creating a report based on a table in SQL Server 2005 Reporting Sevices. I need to display�a subreport within the groupheader of a group I inserted to the table. When I try to preview the report I'll get the following error: "An error occured during local report processing. An internal error occurred on the report server." � When I place the subreport outside of the table the report runs. I tested the scenario in an emty table. When I place the report in the details row the subreport is displayed succesfully. If I insert a group to the table and place the subreport in the groupheader the same error occurs. � Is it impossible to use a subreport in a groupheader? If not, does anyone have an idea how to sove this issue? � Thanks! Dirk

How To Show SUBREPORT When No Data Is Returned. social.msdn.microsoft.com

I have a subreport within the details section of my main report.� This is enclosed by a single group.� When I preview the subreport alone, it diplays the subreport correctly with no data (meaning it still displays the header and footer without a detail section).� When the subreport is run within the main report and no subreport data is returned the subreport does not show. Based on other threads I understand that the default functionality is to display headers and footers when no data is returned.� This appears accurate except on a subreport.

Subreport Page Header On Pages B And C Does Not Print www.daniweb.com

I have a very complex multi-page form I am developing in the Crystal Reports which is included in VS2008. There is always 1 Page A. There may be 1 or more page B. There may be 1 or more Page C. Page A has 7 subreports and a header from the main table. Pages B and C hold overflow records that won't fit on Page A. Page(s) B holds 1 subreport and a header from the main table. Page(s) C holds 3 subreports and a header from the main table. My problem is the page header on pages B and C does not print except on the first page B or C and I need it to print at the top of each one. (There could be many) Pages B and C are currently subreports but evidently that doesn't work. I have to format the report this way, it's a gov't form. Does anyone know how to get a subreport (which is actually a working report) and which can grow past a single page, to display a page header at the top of each new page?

Crystal Reports : Get Effectively A Subreport Within A Subreport? stackoverflow.com

I'm using Crystal Reports within VB.NET and Visual Studio 2005.I have a report with several subreports. I'm setting List(Of MainStuff) as the data sources for the main report. I'm setting List(Of SubreportStuff) as the data source for the subreport. Each SubreportStuff has a key which links back to a particular MainStuff, so the report groups each MainStuff item with its related SubreportStuff items. (Or, at the DB level, SubreportStuff items have a foreign key, which is the primary key in MainStuff.) Below shows the Load function for the dialog, which contains a CrystalReportsViewer. In the Crystal Reports report editor (within VS 2005) I set the subreport link to pull only the related items into that part of the report. Imports System.Windows.Forms Public Class dlgMyReport Private rpt As New MyReport Public theMainList As New List(Of MainStuff) [code].... This works fine.Now, though, what I'm needing to do is in essence the same thing, but pull items based on the keys in the subreport items. This would mean having a subreport within a subreport. However, it doesn't appear that I can do this (the option for inserting a subreport is grayed out when I try to insert in something that is already a subreport).

Problem In Refreshing Crystal Report From Visual Basic-6 Very Ur Gent Pls. visualbasic.ittoolbox.com

Hi Visual Basic / Crystal Report ExpertsI have Developed Application in VB6 and Executing Crystal Report thru it. ( I am Using Oracle 9i Database as Backend and ODBC for Oracle 9i)I have created the report query using Crystal SQL Designer and i uncheck the option "Save data with Query" to get the updated data. I make the report in crystal Report 8.5 using the query developed inCrystal SQL Designer (above)and uncheck the option "Save data with report" to get the updated dataand thru VB-6 i am running this report using the foll. codePrivate Sub Cmd20_Click()CrystalReport1.ReportFileName = "\ntserverfmg_applInventory.rpt"CrystalReport1.WindowHeight = 600CrystalReport1.WindowWidth = 800CrystalReport1.WindowTitle = "Inventory Parts ...."CrystalReport1.WindowLeft = 0 CrystalReport1.WindowTop = 0CrystalReport1.Action = 0 End Sub I am getting the error message "Cannot Open sql server" when i try torun the report from vb when the 2 options "Save data with Query" in Crystal SQL Designer "Save data with report" in crystal report are uncheckedwhere as when these options are checked no error message but not theupdated datacan any pls. help me to overcome with this problem with code.i received many solutions but still my problem in not yet solvedCan any one try to explain me where i am going wrongThanks & RegardsAbdullateefEmail: email@removed

How To Load A Visual Basic 6 Crystal Subreport Designer Module....?? www.vbcity.com

Hello everyone.... QUESTION 1: ========= I have used the Crystal Report 11 product and designed my reports. Then I embedded them into my VB6 project as Visual Basic 6.0 Crystal Report 11 Designer Modules [.DSR extension]. Designer modules can be created via the Project explorer. I know how to design the crystal reports/subreports and generate them at runtime with relevant records based on user select values from the VB6 created s/w at runtime. But this case involves reports/subreports saved as in .RPT file extension and also the Designer Module are not required which leaves my s/w open for tamperring and security holes....which I don't want to do. What i want to use is the .DSR technique. I have been able to successfully import the Designer CR 11 report modules and load them at runtime. But this is applicabel only to crystal reports, not subreports. I want to knwo how to.....OR ..what is the proper method / property needed to open a Designer Module Crystal Subreport...which is actaully a report on its individual sense....??I have attached few pics for a better understanding in a .ZIP file, so that it will be easier to help me out....--------Regards,intellogoEdited by - intellogo on 4/15/2007 12:32:26 AM

Pls Read This...About Crystal Report Creation Api www.xtremevbtalk.com

Hello there every one, I am a new member. I have got a problem. i am using the crystal report creation api to create subreports. Problem :my requirement is i will show the item details in the report. when the user clicks the itemcode then it should display the item photo. Now for this i am using subreports. i am adding the subreport to the section of the mainreport and creating the itemcode and itemphoto fieldsi am also creating subreportlink as itemcode for mainreport and subreport.but i want the subreport to be ondemand. this is actually possible if we are using the designer.but in the creation api the enableondemand is read-only.how to set ondemand.the problem is that the subreport is visible before clicking on the itemcode.hope you understood the problemcan anyone help me out of this?

How To Remove The Blank Spaces Between Subreports In Sql Server Reporting Service? social.msdn.microsoft.com

In Sql server reporting service the blank spaces or white spaces are coming in between the subreports, when we place the subreports in the main reports. If any one know how to remove the blank spaces between the subreports, please reply me. Its very urgent.

Subreport On Page Header social.msdn.microsoft.com

� Hai Guys, � How do�i use Subreport on Page Header in Sql Server Reporting Serive? I have many reports in my windows application.� I want to show subreport on page header like letter head. That subreport also contains Image. The image path is from the database. If i set the image (placed on page header) path it shows one error message. Please anyone help me. Thanks in advance.

CrystalReport 3-level Sales Report - Missing Data If No Row At Level3 www.codeguru.com

This should be a simple thing to do with Crystal.Haven't found answer despite many forum searches- but this is only my 2nd night playing with Crystal.Consider a sales report fetching data from 3 tables;with simple 1-to-many relationships:REGION --> SALESFORCE --> DEALSGoal is to produce report looking like this: Code: REGION A (details + stats) SALESMAN X (details + stats) DEAL M (details) DEAL N (details) SALESMAN Y (details + stats) <null> REGION B (details + stats) <null> REGION C (details + stats) SALESMAN Z (details + stats) <null> etc. If I take the simple grouping approach with deals in"details" view, and salesforce and region as groupsthen the end report is missing SALESMAN Y, REGION Band REGION C (because there is no deal there). But Istill want them to appear (for completeness and statisticscalculation purpose).If I take subreport approach, well... I cannot havea subreport within subreport so can't go beyondSALESFORCE.So what are my options? I am most likely missingsomething obvious... Many thanks in advance for yoursuggestions.Dave

Crystal Report With Subreports www.codeguru.com

I already asked for help with this problem, but no solution yet. Maybe this way I'll get some advice. I attached ZIP file with a very simple VB6 project which uses CrystalViewer (Crystal Reports 9) to display report wit 2 subreports. Everything is based on TTX files.ZIP contains Access 2000 database, VB project, Crystal Report and TTX files.I have no problem to display report. The problem occurs when I close the form with CrystalViewer control on it. VB crashes at this point. Compiled application crashes at this point too.If I have only 1 subreport then no problem, with 2 or more I have a crash all the time. I tried to base the report and subreports on SQL Server 2000 stored procedures (Original project works with SQL Server. Access database was used for this sample to make everything simpler). I'm getting the same problem. If I use XML files (I save data from recordsets into XML files first and then I use those XMLs as datasources for the report and subreports) then everything is working without any problem. I have a big number of reports without subreports based on TTX files and would not want to have another group based on XML (this approach requires .NET framework to be installed on the user machine)I'm asking to try my code to see if it produces the same problem on yourmachines. And if yes, maybe somebody will tell me what am I doing wrong.Thank youVlad

Blank Pages In Report With Matrix And Subreports. social.msdn.microsoft.com

Hi, I have a master report that contains 4 sub reports.� The first two subreports contains matrix controls that can (and will) spill over to a second page.� With 5 columns of data the matrix subreports fit nicely onto one page, 6 or more columns and they will spill into a second page.� The second two subreports will always fit onto one single page.� All four subreports are inside a list control which will repeat for each structure.� e.g. Each subreport will be rendered once per structure. The master report renders perfectly (with no blank pages) whenever the two subreports with the matrix controls fit on one page each.� However, whenever the matrix control subreports spill into a second page it causes the master report to insert a blank page after subreport 3 and 4, bare in mind subreport 3 and 4 both fit perfectly on a single page.� I've check all margins and page widths etc. The blank page problem only occurs whenever the matrix needs to span two pages. Anybody encountered this problem or have any ideas how to fix it?� I'm beginning to think it is a bug with reporting services. Regards, Adrian.

Technical Question social.msdn.microsoft.com

Hi, � My question concerns the number of connections reporting services opens to generate a report with several subreports in it. � I have a main report with 3 datasets, all based on different store procs. In the same report i also have 2 subreports who each have 1 dataset, also based on store procs. When the report is being generated, how much connections does RS opens to the sql server? � Greetz, � Vinnie

Multiple Items On A Report Problem? social.msdn.microsoft.com

We are trying to do something basic with SRS but we can't seem to get iit to work.� Here's the scenario:� We want to send out a monthly report that consists of numerous subreports.� Each subreport stands on its own withh its own data source. On our main report we drag the subreports into position as we want them to display.� But when we run the report sometimes we get 2 subreports on 1 page, other times we get 1....�� Bottom line is that we want to get 7-8 subreports on one page.� Any ideas on what we can do to get everything on one page?

CrystalRpt - SQL DB - VB www.codeguru.com

I am a bit new to all of this and need a jump start.Crystal Report name = IndexPerformanceALLUSERS.rptCrystal subReport1 = DocClass.rptCrystal sbuReport2 = UserAvg.rptSQL server name = LECHSQL database name = CSC_ReportsODBC datasource name = CSCOn the three reports, I have to prompt for the start and end dates. (this is tedious)1) In VB, a command button prompts for Start and End dates. How do I pass these variables to the start and end date requirements in the Crystal report & subreports?2) Once the user enters a start and end date, how do I run the main report?I have the Crystal Report control on my form in VB but am not sure how to connect to the SQL database and then run the report.Thanks to anyone for their assistance!AnnMarie

Pls Read This...About Crystal Report Creation Api www.xtremevbtalk.com

Using I Crystal Report 9 environment I created a report with a subreport, a parameter param_main_1 in the main report and a parameter param_sub_1 in the subreport. Then I linked param_main_1 to param_sub_1. I placed the field param_sub_1 on the subreport section to make it active.From my VB6 application I tried to analyse subreport links.I created a crystal application object and open a report. Dim repApp As CRAXDRT.Application Set repApp = New CRAXDRT.Application Dim rep As CRAXDRT.Report Set rep = repApp.OpenReport(txtReport.Text)Then I found a subreport and opened it Dim oObject As Object Dim oSection As Object Dim oSubReport As Object For Each oSection In rep.Sections For Each oObject In oSection.ReportObjects If oObject.Kind = crSubreportObject Then Set oSubReport = oObject.OpenSubreportI retrieved a collection of Subreport links and got my link Dim oSubreportObject As CRAXDRT.SubreportObject Dim oSubreportLinks As CRAXDRT.SubreportLinks Dim oSubreportLink As CRAXDRT.SubreportLink Set oSubreportObject = oObject Set oSubreportLinks = oSubreportObject.Links For i = 1 To oSubreportLinks.Count Set oSubreportLink = oSubreportLinks(i)I got a main report field of the link and see its properties (at least a name) Dim oMainreportField As Object Dim mainreportFieldName As String Set oMainreportField = oSubreportLink.MainReportField mainreportFieldName = oMainreportField.NameBut I CANNOT retrieve a reference on SubreportField !!! Dim oSubreportField As Object Set oSubreportField = oSubreportLink.SubreportFieldAn error 5 "Invalid procedure call or argument" is raised.========================================================Could anybody tell me where I am wrong? And how to get a valid reference on a subreport field of a subreport link?Thanks in advance

Database Project Help Required www.xtremevbtalk.com

New to db project with VB+Crystal report and MS SQL Server 2000I have to run simple queries like:1.0 Insert and Select.2.0 Insert to put data to MS Sql Server 2000 and select to get the data and provide report as outputWhat should be the method of connection with the database? What suld be the connections string like this.How to set user name and password to the connections stringII REPORTINGI am new to crystal report reporting1.0 what will be required for developing repors with crystal reports2.0 what suld be the deployment issue with crystal rpt, what files to supply and what about crystal ocxany other relevant info to start withTIAJHAKAS3.0

CR8 File Not Found www.vbforums.com

Hi folks,I've created a report with Crystal Reports 8 through VB via ADO, and send it a recordset at runtime to populate the report. This all works fine and dandy.However I created another report the same way and inserted it into the first report as a sub-report (Both reports are saved in the same directory and work fine independently). Once this subreport has been inserted, if I try and run the main report, it pops up with "File not Found".Anyone got any ideas what is going on?ThanksJ

Sql Server - Passing Parameter To Crystal Report In Windows Form? stackoverflow.com

i am working on visual stdio 2008(vb.net) and sql server 2008 i working on crystal report 9 i have created a stored procedure in sql server i have add this procedure in crystal report data expert now i just want to pass a parameter to crystal report so that it will show me data in crystal report?

MVC :: Views In Crystal Report? forums.asp.net

I have download and install Crystal Report and Crystal Report runtime viewer from SAP website.I have build an application in MVC VS 2010, using LINQ to SQL, SQL Server 2005There are many views in my application.I want to show views using crystal reports. How can i show my MVC view page data in Crystal report ???

Returning A Value From A Subreport To The Main Report For Calculation social.msdn.microsoft.com

� I have a need to complete the following: � Main Report (Group level) Sum(FinalPayment) ** Completed SubReport Sum(PaymentAdvances) ** Completed (passing parameters) � This is the part that I need help. I need to use an original value from the main report and a "return" value from the subreport. Main Report (Footer)�Sum(FinalPayment) + SubReport.Sum(PaymentAdances) � Is it possible to pass a return value back to the main report from a subreport? � Any help�or�direction on this?� �

Crystal Report 8.5 Using Sub Reports www.codeguru.com

Crystal Report 8.5 I am using a sub report. I have inserted the subreport into my primary report via the report designer.When i invoke the primary report from my VB6 application i get an error "File Not Found". I guess this is because the VB appilication cannot find the path for the sub report. How can i specify the path of the sub report in the VB Application?

SQL, Crystal Report -- Cant See New Stored Procedures. www.vbcity.com

I am using Crystal Report 8.0I wrote few stored Procedures in SQL Server & then start using those procedures in different reports .& then I added new stored Procedures in SQL & now when I connect the SQL server from Crystal Report, It does not show the newly added Stored procedure .I 1. Checked the permission on my new stored procedure2. Clicked on 'Refresh Report Data F5' on Crystal report3. Rebooted my machine twice.Could you please suggest what exactly I am missing .Thanks

Crystal Report Query www.codeguru.com

Hello everybody! I am using crystal report 4.6 vith v.b 5.0,i created a standard report template using crystal reports, now i want to use that template form a vb form so i placed a crystal reports ocx control on the form and run the report using Crystalreport1.action=1 command so it runs properly.But i want to modify the sql query of the crystal report form so i set the crystalreport1.sqlquery propertty to new query but the report does not reflect the changes. Please help me generate a dynamic report ,how do i change the report at run-time?Please Help

Database In Crystal Report 8.5 Sometimes Do Not Refesh ? www.xtremevbtalk.com

Hi,I'm use VB6.0 to do input form, MS. Access 2000 as Database and Crystal Report 8.5 is Report.Everything are alright, but sometimes I find out Crystal Report do not refesh database although I used Report.Database.Verify method and in Crystal Report I do not choice 'Save Data with Report' Option. I have checked the data in table was alright. Here is my code in the form which is loading Crystal Report in my VB6.0 Application:Dim Report As New rptSoChiTietVLDim SubReport As Report-----------------------------------Private Sub Form_Load()Dim sAppPath1 As StringsAppPath1 = App.PathIf Right$(sAppPath1, 1) <> "" Then sAppPath1 = sAppPath1 & "database"Screen.MousePointer = vbHourglassReport.Database.Tables(1).Location = sAppPath1 & "IMTransaction.mdb"Report.Database.VerifyReport.txtMonth.SetText "Thaùng" & " " & frmGiaVonHangXuat.txtMonthReport.Text41.SetText frmGiaVonHangXuat.cboPrdCRViewer1.ReportSource = ReportCRViewer1.ViewReportScreen.MousePointer = vbDefaultEnd Sub-----------------------------------------Private Sub Form_Resize()CRViewer1.Top = 0CRViewer1.Left = 0CRViewer1.Height = ScaleHeightCRViewer1.Width = ScaleWidthEnd Sub-------------------------------------------Private Sub Form_Unload(Cancel As Integer) MdFunctions.ConnectionDb.Execute "Delete * from SoChiTietVL" MdFunctions.ConnectionDb.Execute "Delete * from Ton_tmp"End Sub

Subreport Link Re-Loading Master Report www.sqlteam.com

hi all, im using SSRS 2005, i've made a master report and a subreport and placed a link in master report and sets its subreport property as that subreport which i've already made, this subreport accepts some parameters from master report. everything working fine when i open subreport through master report link in Report Designer, i made an ASP.NET 2005 application to view these Reports which uses Report Viewer Control to view these Reports, when i try to open that subreport through link in master report in Report Viewer it opens the same Master Report again, i've no clue what to do.. i'll greatfull if someone could help me. Thanks Ubaid.

SQL Reporting :: Reportviewer LocalMode Master-detal Report, Subreport Not Showing? forums.asp.net

I'm developing a web application , and I need to present information in a report.I have this Database in sql 2005, The report has to be a master-detail report so I'm including a subreport.I'm new to reporting I've been reading the example at: http://www.gotreportviewer.com as in the example I supply a hadler for the SubreportProcessing event. private void MainForm_Load(object sender, EventArgs e) { this.reportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(MySubreportEventHandler);[code].... This even nerver fires and the page shows this error: Error: Subreport could not be shown.