how to Change main report and Subreport database server connectionand view them In CRViewer ? thanks
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
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'- > 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 ?
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...
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
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?
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?
We are getting correct output for crystal report using dataset which does not have a sub report.But it does not work for subreports?
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.
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
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
hi ,i am making a project in Vb6 and crystal report 8.5 with Access as Database.i have used this connection string to connect to Access Database from VB6. Code:Dim strPath As StringstrPath = App.PathIf Right(strPath, 1) <> "" Then strPath = strPath & "" Con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPath & "TelephoneDir.mdb;" Con.Openi am facing problem in connecting crystal 8.5 to Access database.i am using crystal report control to view report.so what connection string i should write in "crystal report control" ".Connect" properties to successfully connect my Database.thanks
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.
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!!!
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 diplay a crystal report with a subreport with the same parametervalue using visual basic 6..
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
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
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
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?
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.
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
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
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?
I have serveral databases with same tables. I created a crystal report to show the report for respective logins from the database. I have a problem in it. In crystal report when i changing the database it should not change the respective table. It loads only the table what we give in the connection string first time.
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
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
Hi,I am trying to execute Crystal Report from Visual Basic. I am getting some messages while executing the report, which I want to suppress.I am using Crystal Reports XI and Visual Basic. I am connecting to SQL server database using ODBC connection. I am using CRAXDDRT class library. I have set all required properties for processing crystal Reports like database connection, Report file, Export options, Export report file, Database table connection properties. Before exporting I am verifying the database by CRReport.Database.Verify command. Then I am using CRReport.export (False) command to export the report output to some disk file format (Excel, PDF etc.)But when the CRReport.export command gets fired, it shows me message like “The database file Mytable has changed. Proceeding to fix up the report”. I do not want to get displayed this message, as my requirement is to execute report silently without having any user interaction.Please let me know if any one has solution to this problem.
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
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 ???
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.
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.
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
I want to dynamically set the location of the database my report is connecting to. I can easily do this with the main report but I'm having trouble with the subreports. I'm using ADO OLEDB and here's the way I change the location of the database. I works with the main report though, but I also want to point my subreports to the database my main report is pointing.CrystalReport1.Database.Tables(1).SetLogOnInfo "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & g_filepath '& ";Persist Security Info=False"thanks!
Hi,Sub: Unable to open the Crystal report exported in Crystal Report Format1) I have used Oracle Native connection, while designing the report.2) I have passed the record set to the report at run time.3) Exported the report to Crystal Report Format, But I could n’t able to open report, while opening , the report asks for OLEDB information, even though I used Native connection at design time.4) In Crystal Report 8.5, connect driver property, but I am using crystal reports XI and in Visual Basic 6.0, Is there any method or property to convert the connection?. As I have to export report to crystal format and emailed to user, so that user can open it.Any assistance in this regard is highly appreciatedThe code is as follows:Public Sub Aging_REPORT(strSQL As String, sReportName As String, sDestFileName As String, ReportTitle As String)On Error GoTo ErrDim CrAppl As CRAXDRT.ApplicationDim crrep As CRAXDRT.ReportDim rsCrystal As ADODB.Recordset Set CrAppl = New CRAXDRT.Application Set crrep = CrAppl.OpenReport(sReportName) 'Opens the report Set rsCrystal = New ADODB.Recordset rsCrystal.Open strSQL, Conn, adOpenStatic, adLockReadOnly rsCrystal.Requery With crrep .DiscardSavedData .Database.LogOnServer "crdb_oracle.dll", strServerName, "", strUserName, strPassword .ReportTitle = ReportTitle .Database.SetDataSource rsCrystal, 3 'LINK REPORT TO RECORDSET .VerifyOnEveryPrint = True End With With crrep.ExportOptions .DestinationType = crEDTDiskFile .FormatType = crEFTCrystalReport .DiskFileName = sDestFileName End With crrep.Export (False) Set crrep = Nothing Set CrAppl = Nothing Exit SubErr: MsgBox Err.DescriptionEnd SubThanks,
Hi,In my VB applicationI am using Crystal Reports 8. I have created a main report which also has about 5 subreports.The major problem has occurred. When I created the reports I selected the "ADO and Build String" option to select the database via the Dat Link properties. The reports and subreports keep trying to access the old data source as I have now moved my appication to the client machines. How can I quikcly change the ConnectionString that crystal reports is using?I mean, is there any way, I can point it to the new database in code like:'puesdo code Set MyReport1's Data Source ConnectionString equal to App.Path & "DatadbAutohouse.mdb"Something like that would be great.I think dcl3500 maybe able to help! Please help- - thanks so much in advance!VD
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
Problem description1. Database: Access2. Crystal Report 10I use vb6 to open Crystal report environment using shell statement,every time when i refresh data i have to reentry the user name and password to access database.My code is:retval = Shell(Chr(34) & CRpath & Chr(34) & " " & Chr(34) & RepPath & "" & strRepName & Chr(34))would anybody know how to use shell command to open crystal report in vb6 and pass database connection information to the crystal report?Many thanks,linda
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
Hi allFirs I must say that I'm complitly beginner with CRI'm having problems with crystal report changing database path.I'm using VB6 access database and CR10What I have done untill now is folowing:With CR wizard opened blank report- set up database and tables for crystal report in design mode- created report and saved it in file with name "rn.rpt"- form is saved with name frmRN.frmWhat should I write in form_load in form frmRN.frm to change database of crystal report to app.path & "aza.mdb".Help neededRegards
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!!!
HI members, I have used a file dsn to make my crystal reports as i have to change the location and name of my databse but the structure (i.e, database schema) is same. It was working well when i created it for the first time but when i changed my database it is giving error (Method readrecords of object icrreport failed) i am using crystal report 8 and opening reports using crystal report engine 8 to open my reports through VB Code. Can any one help me in this regard that i don't have to change settings of my report each time while running it for a databse with different name.I'll appreciate u'r support Thanks in advance.
Is it possible to change a Database for a Crystal Report at Runtime? I am using the Crystal Report Designer. I tried this but it appears it does not overide the design time report connection.CRDB = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=I:APPLSUPPORTSuppcrys.mdb"Report.Database.SetDataSource CRDB Thanks
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
heyi've done a crystal report using MS ACCESS. (Version Crystal Report 8.5)my database is in C:HMSDatabaseHMS.MDBand i'm calling the .rpt file from a visual basic program. Dim strReport As StringDim strTXT As StringstrReport = App.Path & "ReportsOPDInvoice.rpt"DInvoice.ReportFileName = strReportDInvoice.WindowState = crptMaximizedDInvoice.Action = 1Dinvoce is the crystal report controlit ll work when the database is in the same directory.if i change the path of the database and try to run the codeit ill say "unable to load the database"..how can I set the database path of the crystal report at runtime.please help me..Thank youSachith Edited by - sachith on 1/16/2005 6:36:03 AM
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
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.
hi,i am developing project in vb6,mysql and crystal report 8.5.i am using ODBC method.in connectionstring property of Connection object i have only defined the DSN name in it .[vb]con.connectionstring="DSN=web"[VB]in ODBC setting of 'web' i have given database name ,user name only and to host which it should connect(right now host is my pc means both database and application is running on same pc )Everything is working fine else reports .when i view reports its says 'unable to load data'what connection string i should used in '.Connect' property of crystal report control keeping in mind ODBC (my data source) and mysql (as database).thanks
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
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
(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
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?
hi guys i found how to pass an ado record set to a subreport and the main report (two methods are shown below) how evere i was wondering how do i change the code if i have got 2 sub reportsIn a Microsoft Visual Basic 6.0 application using the Report Designer Component, a report and a subreport use ADO recordsets as their datasource. The recordsets' data must be passed to the report and subreport.SolutionThe following code demonstrates how to successfully pass a ADO recordset's data to a report and a subreport using the Report Designer Component Automation Server. Dim Report As New CrystalReport1Dim crxSections As CRAXDRT.SectionsDim crxSection As CRAXDRT.SectionDim ReportObject As ObjectDim crxReportObjects As CRAXDRT.ReportObjectsDim crxSubObj As CRAXDRT.SubreportObjectDim crxSubreport As CRAXDRT.Report'ADO declaration ; yours may be differentDim ADOrs1 as ADO.Recordset 'For main reportDim ADOrs2 as ADO.Recordset 'For subreportPrivate Sub Form_Load()'Your ADO code to get your ADO recordsets'Main report stuff here...'Here are 2 methods to Set the datasource to the ADO recordset. Each uses the 'SetPrivateData method. The difference is how they get to the method. Comment out the 'one you do not wish to test. 'Begin Method 1:'This method steps through the object model by setting each object until the 'SetPrivateData method is reached. We need to set the database, database tables and 'database table to get to the method that we need: SetPrivateDataReport.Database.SetDatasource ADOrs1, 3, 1 '.SetDataSource (rs, data tag, tableindex)'Subreport stuff here...'Get the sections from the Main reportSet crxSections = Report.Sections'Go through each section in the main report...For Each crxSection In crxSections 'get all the objects in this section... Set crxReportObjects = crxSection.ReportObjects 'go through each object in the reportobjects for this section... For Each ReportObject In crxReportObjects 'find the object which is the SubreportObject If ReportObject.Kind = crxSubreportObject Then'Found a subreport, now get a hold of it Set crxSubObj = ReportObject'Open the subreport and treat it as any other report Set crxSubreport = crxSubObj.OpenSubreport 'Pass the second recordset to the subreport crxSubreport.Database.SetDataSource ADOrs2, 3, 1 End If Next ReportObjectNext crxSection'End Method 1:'Begin Method 2: 'Quick method for setting the datasource for the Subreport. This method accesses the 'subreport and the OpenSubreport 'message from the Report Object directly. The 'Subreport is seen as an object of the Report and will appear in the drop down window 'when the . is applied to the end of Report.'The Subreport is refered to as Subreport1 even though we named it Sub 1 when creating 'it. The DSR is seeing it as an object on it's form. If you highlight the Subreport on the 'DSR form and look in the property window the Name of the object is Subreport1 and can 'be changed through the property window. Report.Database.SetDatasource ADOrs1, 3, 1 '.SetDataSource (rs, data tag, tableindex)Set crxSubreport = Report.Subreport1.OpenSubreportcrxSubReport.Database.SetDataSource ADOrs2 'End Method 2:End Sub
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
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
Hi to all,I have a crystal report viewed in VB. Report is working well on my development PC but when I deploy the application in the Client's PC having different Path, the report can't find the database... and it results to an error.Example:Database and Report location is "C:REPORTS"But when I deploy the Application to a different path like"C:PROGRAM FILESMY SYSTEM"the report will not be displayed...So, is there a way I can change the database location of a CRYSTAL REPORT so that where ever I change the path, the Report can still be viewed.Thanks in advanced.Noel
I have used the following code for a report which has only one table and no subreports which work fine. I have a new report which has 3 subreports but only one has a supreport link. There is no parameter required to be input as the report links on specified fields in the main and subreport but when I run the app I get a pop up box asking for the value of ?pm-fieldname. How do I remedy this please?Private Sub Form_Load() Dim conn As ADODB.Connection Dim rs As ADODB.Recordset Dim crystal As CRAXDRT.Application Dim report As CRAXDRT.report CRViewer91.DisplayBorder = False CRViewer91.DisplayTabs = False CRViewer91.EnableDrillDown = False CRViewer91.EnableRefreshButton = False Set conn = New ADODB.Connection conn.CursorLocation = adUseClient conn.ConnectionString = "DSN=21;UID=xxx;PWD=xxx" conn.Open Set rs = New ADODB.Recordset rs.Open ""SELECT crheader.cr_rtcode,crheader.cr_subcod,crheader.cr_subtyp,crheader.cr_sdesc,crheader.cr_efdate,crheader.cr_type,crheader.cr_retire,crdetail.rd_grade,crdetail.rd_chgamt,crdetail.rd_retire,cadescrp.ds_descrn,cadescrp.ds_rectyp,crheader.cr_seqnum,crdetail.rd_serial,cadescrp_1.ds_descrn,cadescrp_1.ds_rectyp FROM crheader crheader,cadescrp cadescrp,crdetail crdetail,cadescrp cadescrp_1 WHERE (crheader.cr_seqnum=crdetail.rd_seqnum) AND (crheader.cr_rtcode=cadescrp_1.ds_reckey) AND cadescrp.ds_reckey=crdetail.rd_grade AND crdetail.rd_chgamt <> 0 ORDER BY crheader.cr_efdate,crheader.cr_sdesc,crdetail.rd_grade,crdetail.rd_serial", conn, adOpenStatic, adLockReadOnly Set crystal = New CRAXDRT.Application Set report = crystal.OpenReport(App.Path & "Time Charge Rates.rpt") report.DiscardSavedData report.Database.SetDataSource rs CRViewer91.ReportSource = report CRViewer91.ViewReport Do While CRViewer91.IsBusy DoEvents Loop CRViewer91.Zoom 94 rs.Close Set rs = Nothing conn.Close Set conn = Nothing Set crystal = Nothing Set report = NothingEnd Sub
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
I am having problem with the connection between an access database and crystal report. I created a crystal report by using wizard, all working go, but when I run the program in another computer am getting some error on path..wrong path for the database. So I need to find a way to connect database with the crystal report using a relative path...
Hello,I need to know how can I add my report created in crystal report 9 from my visual basic (v 6) form. Some info about my report:** my report is created on crystal report 9.** it is using OLE DB connection to connect with my database.** my database is in ms-access and password protected.So, I need to know--=how to set the location of the database from vb6 for the report=how to refresh data each time the form is run=how to provide password for the databaseCode example will help me lot. Thanks in advancebelal
Has anyone else had this problem? I have several reports working on Crystal 8 and have upgraded recently to Crystal 9 (the software I'm linking with uses 9 so can't go to 10 just yet)None of the data files have changed yet reportw hich worked fine on 8 are now doing very strange things on version 9. Especially those reports with subreports or more than one table. The very straightforward reports are fine. I have checked the linking and data locations and all seems OK - I'm using the Crystal 9 viewer from my VB program instead of the Crystal 8 control have recompiled the reports - as I said no change to the data but the reports look totally different in Crystal 9 - have tried direct and not through my rpogram and I still have a problem.Was wondering if anyone else had trouble migrating and how they solved iT?
i am using asp.net 2005,sqlserver 2005 and crystal reports for .net 2005. i connected the crystal report file(Customer.rpt) to the database using OLEDB(using Database Expert). But i need to connect it using connection string from web.config file. I've used the following connection string in web.config file <connectionStrings> <add name="OrderEntryConnectionString" connectionString="Data Source=(local);Database=OrderEntry;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/> </connectionStrings> how can i use these OrderEntryConnectionString in .rpt file to connect database.
Greetings!My question concerns the database driver (e.g. pdssql.dll, pdbdao.dll) that is used to connect a Crystal report to a data source.I know this driver can be set up in Crystal's Report Designer by using the menu option "Convert database driver".Is it at all possible to change this database driver programatically (during runtime) in Visual Basic? Specificaions:--------------- Crystal Reports 6.0 Pro- Visual Basic 6.0 (using the Print Engine API to interface to Crystal)
how to create Crystal Reports for Visual Studio 2005 for a Client Server application? The problem I faced is that when I created Crystal Reports for Visual Studio 2005 where the Crystal Report is displayed in the client application it does not get refreshed with data entered. It only displays data that was entered during the time of development. I think this is probably because the database path changes when deployed in a new environment while the Crystal report keeps referring to the database location at development time.
Hi there,I am using Crystal Reports 8.5.Accessing MS Access Database. I have written a small program to display the data from access through crystal to the user.The program works like a charm on the my development machine. ( Have VB6 and Crystal Fully installed ) When I package and deploy the program the following happens : ( No VB6 and Crystal Fully installed )Have vb run time files.Have crystal DLL'S needed to run the stuff I think all of them. Registered them too.Got the stuff from their notes...... if only,OCX is used they say use the following dll's:crystl32.dllmfcans32.dllolepro32.dllcrpe32.dllcrpaig80.dllimplode.dllmfc42.dllmsvcirt.dllmsvcp60.dllVb program runs no problem but when report selected to be displayed the crystal reports window opens up and immediately closed down (not displaying the report ). It does not crash the VB program. In my VB code I have added a Crystl32.OCX only. The code that is in my program to display the report "on development machine" is as follows ( and it works ): *************************************Connection to the Access Database Code : Public cn as ADODB.CONNECTIONSet cn = new ADODB.CONNECTION With cn .connectionstring = " Provider = Microsoft.Jet.4.0;Data Source=c:Database.mdb" .openend with************************************* To display the report*************************************Private sub cmdCommand1_Click %ReportName% .DataFiles(0) = "c:Database.mdb" %ReportName%.ReportFileName = app.path & " %Name of the Crystal Report.rtp%" %ReportName%.RetrieveDataFiles %ReportName%.PrintReportend sub*************************************When i looked at the event log generated by crystal --- it said something like "%Name of the Crystal Report.rtp%" database could not be found (something along those lines). I have already established the connection, and I know that works ..... so how come crystal does not see it???Am I missing something ???Is my SET LOCATION in crystal right ...... it looks something like this "TableName!c:Database.mdb" ????Am i missing any DLL'S ???When I refresh the data in the crystal report design mode it gets all the relevant records from the database.Help will be greatly appreciated .....Thank You.
Hi,I have a crystal report in my application and i wondered if there is any way to provide different database connection parameters other that the ones supplied when writing the report.For example, the report uses a ODBC connection to a database but usernames and password may vary from machine to machine.Are there commands for changing these parameters?Thanks in advance,Harry
I have a DSN set to D_2002.MDB Access database. I have created a crystal report based off of this ODBC connection. In my VB6 APP, the user might want to run the report off another database D_2004.MDB. How do I change the ODBC connection to D_2004.MDB and run the report off D_2004.MDB.Any help is appreciated!!!Sudha
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
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
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
how do i change the database connect string for a crystal report depending on which database my application is connected to.
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
I have recently developed an application with VB 6.0 that uses Crystal Reports 7.0. It is my understanding that Crystal Reports is the best to use for database reports. Is there any additional software that can be deployed with Crystal Reports to allow a user to change the fields they desire for any particular report? Are there other report applications that will allow fields to be changed on deployed applications? Any response, even negative ones would be appreciated.
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
vb6.0/crystal report problem I have created a crystal report using access mdb file. it executing properly thru manual invoking of crystal report. I have so many access database files with same tables as i have used in design of report in crystal report. I want to use these mdbs for generating reports using same report. I have created a vb form where dirpath and mdb files are displayed and kept one print command button to invoke connection to crystal report and dynamically connect to this database using connect property of crystal report control, while running this form and clicking the print command i am getting could not connect to server and it will stop at crystalreport1.action=1to avoid this problem i have used file system object to copy this any mdb file to the source file used for designing crystal report and tried to run the form , but i am geeting same error message. Kindly help me out as i have to submit the report in two days.
I'm trying to use crystal reports in my database that i have made using vb 2010 and access 07, I'm trying to make a new crystal report in vb, have gone add new item, crystal report, etc but when i go to specify the new connection using the Microsoft office 12.0 access database engine )LE DB provider i keep getting a catastrophic failure error 0x8000fff?
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.
Hopefully this is the correct thread Does anyone know how to use Crystal Version 6 with windows authentication ?Details:VB6 apps with SQL2005 database and Crystal Reports Version 6Currently the Reports log on to SQL with a userid and password.Our legacy VB6 apps are being changed to use Windows Authentication. The only outstanding issue is to get the reports to work with authentication. There is a trusted connection check box but I have no idee how to use it.Any coding examples ple?
Hello Experts, I have designed a report using crystal reports 8.0.There are subreports also included.front end is visual basic 6.0I change the selection formula of the main report using crystalreport.selectionformula. I am not knowing how to set the selection formulae for the sub reports.can any one help me .
Development Environment: WinXP, Visual Basic 6, Crystal Reports 9, SQL Server 2000Using the following VB code I am opening a Crystal Reports .RPT report. Which I then set the required connection properties for the report. As you can see the code/report currently uses a File DSN. I would like to change this to a DSN-Less Connection. But I seem to be unable to figure out the correct CR9 code syntax for a DSN-Less connection.Anyone know how I can accomplish this? Set CrApplication = New ApplicationSet CrReport = CrApplication.OpenReport(App.Path & "ReportsDetail.rpt", 1)CrReport.Database.Tables(1).ConnectionProperties.Item("FileDSN") = "C:Program FilesCommon FilesODBCData SourcesMMHS_DB.dsn"CrReport.Database.Tables(1).ConnectionProperties.Item("database") = DBConnString.DatabaseCrReport.Database.Tables(1).ConnectionProperties.Item("password") = DBConnString.PasswordCrReport.Database.Tables(1).ConnectionProperties.Item("user ID") = DBConnString.UserIDCrReport.DiscardSavedDataCrReport.SQLQueryString = "SELECT * " & _ "FROM vw_CLAIM " & _ "WHERE APPLICATION_ID = " & gAPPLICATION_ID & " AND CLAIM_ID = " & gClaimId & " " & _ "ORDER BY NAME;"
I'm working with Crystal Reports in VB.NET in Visual Studio 2005.I have a List(Of Stuff) that I've sorted according to one of the object's members.I've verified in the debugger that the list is sorted correctly.When I define my list as the data source, as in rptDetails.Subreports.Item("rptSubReport").SetDataSource(theListOfStuff) and view the report, the list is reversed.So, looking for a workaround, I said, "OK, I'll sort the list backwards before binding it."The list still appeared backwards in the report.So something's happening, and I think it's within the report definition, because I don't know where else the sort order could be changed
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.
Hi everybody,I'm using Crystal Report 8.5 and VB 6.0. In Crystal Report, I connected to database (MS Access 2000) via using ADO (Database/Add Database to Report/More DataSource/Active Date/Active Data (ADO)). Then I specified the table contain data for report.The problem is when I copied my program to another machine (or another directories), the relative address couldn't be changed. I want to change it to absolute address, but don't know how to do it. Can you help me ?Thanks for read !
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
I am retrieving connection string based on value stored in cookie.NowI am making crystal report. I cannot hard code server credential. I have to get these credential from connection string from web.config. so that i can pass these credentials to my crystal report . ConnectionInfo reportConnectionInfo = new ConnectionInfo(); reportConnectionInfo.ServerName = connection string server name from web.config reportConnectionInfo.DatabaseName = connection string database name from web.config reportConnectionInfo.UserID = ...; reportConnectionInfo.Password = ...;
Hello All,HOw to export Crystal report file to PDF programatically..? I am using Vb 6.0Code:Dim objApp As CRAXDRT.Application Dim objRpt As CRAXDRT.Report Dim fPath As String fPath = App.Path & "ReportsAgentInvoice.rpt" Set objRpt = New CRAXDRT.Report Set objApp = New CRAXDRT.Application Set objRpt = objApp.OpenReport(fPath) objRpt.DiscardSavedData fPath = App.Path & "Report2.PDF" With objRpt .ExportOptions.FormatType = crEFTPortableDocFormat .ExportOptions.DestinationType = crEDTDiskFile .ExportOptions.DiskFileName = fPath .ExportOptions.PDFExportAllPages = True .Export False End WithIn the code, connection state also remains open.This is the code I have written , while i run the code it gives me following error:Code:Crystal Report Database Error-------------------------------------ODBC error: [Microsoft][ODBC Driver Manager] Connection not open
I am having a problem launching a crystal report that contains a sub report. It opens fine when I remove the subreport so can anyone advise on where I am going wrong? I get a type mismatch error.Set crRep = CrAppl.OpenReport("c:eport1.rpt")crRep.Database.Tables(1).SetDataSource CrAdoRs Set crSubreportObject = crRep.OpenSubreport("Payments")crSubreportObject.OpenSubreport.Database.Tables(1).SetDataSource rsAdoRs2 Let me know if you need more of the code
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?
I created a report [RptContacts] to show the data of all the contact persons in my SQL server database. The report has a row group on the column [PK_Contact] in the datasource (IQueryable). An other report [RptCommunications], which will serve as subreport in the main report, shows all the communications we had with each contact person. The datasource (IQueryable) for this report contains the column [FK_Contact] referring to the contact person with whom we had the communication. I added [RptCommunications] as subreport to [RptContacts]. In de Subreport Properties/General, I indicated both under "Name:" and "Use this report as a subreport:"RptCommunications. How can I make sure that for every value of [PK_Contact] in the main report [RptContacts], I see the correct records in the subreport [RptCommunications] corresponding with the right contact person. In other words, how can I make sure that for every communication in the subreport, [FK_Contact] = [PK_Contact] in the main report?
i am uisng asp.net 2.0 built in crystal report .i already have the connection made and some fileds already on the report. i need to add few more fields to the the existing set of fields from database in the server explorer i have the field that i need but i am not able to drag drop on the crystal report.how do i add the field from datatable to crystal report
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?
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
I have been facing a problem with Crystal Sub Reports.In my Report I am using SQL Server Data base. The report contains main report and a sub report. I am connecting to the database 'masstest'. The report is working fine on 'masstest' Database . If I change to connect 'masstetdump' database, the report is not executed showing an error , ODBC error:[Microsoft][ODBC SQL Server][SQL Server]Server user 'masstetdump' is not a valid user in database 'masstest' . If I remove the Subreport then the report is working well on any database. The problem is only with sub report. any body please help me.
I work with Crystal Report 7 & VB6 & Access97. After installing program in some of windows, I get the error messages as following when I want to open my report in program.Seagate Crystal Reports: Database Error----------------------------------------Can not initialize OLE.Seagate Crystal Reports: Database Error----------------------------------------Can not create DAO DBEngine.Seagate Crystal Reports: Database Error----------------------------------------Error opening file.File could not be opened: "Report" at file location "Report"
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