-
Re: How to connect to different servers at runtime
Hi,
yes, crystal report had LogOnServer method it contains server connection string, so that you can change the sql server location.
In crystal report design time, you can use "logon/off server" and "set location" to change the server location.
Regards,
K.Babu
Quote:
Originally posted by mpsudheer
Hi ,
In crystal Report can i be able to connect to different servers based on the user input. Eg- User will select a location (Chennai, Bangalore etc..) based on which i have to connect to SQL Server on that location. I don't have a front end like VB or ASP. I have to do it directly in Crystal Report. Is it possible to do this????
Please suggest a solution
Thanks in advance
Sudheer
-
Export Problems
Hi,
I've created a VB exe, that dynamically opens existing *.rpt files, and exports them to pdf.
The user can add filter the data before the export (passed via the command line).
At some of the reports (at least when an unlinked subreport is included in the report), the decimal place seems to be snipped (1.23 becomes 1.00, and 1.67 also becomes 1.00).
Thus nearly any value is wrong.
When I open the report file in Crystal reports, everything is fine, but when I open it from Vb (also before the export, by using the CRviewer), the problem appears.
As the Seagate support was - to put it mildly - not very helpful - maybe one of you can help
I'm using CR 8.5, SQL-Server 7 and VB6.
-
Clarification needed
Hi.
What is the difference between "LogonServer" & "Connect" method.
"LogOnInfo" method is for connecting different Servers.
If any one could, clarify me.
And ... I created Balance Sheet report with a back-end has Oracle. I used DSN. How to reflect the Report if the Schema Object is changed.
Thank You
-
Re: Clarification needed
Hi,
Use the LogOnInfo property when the report connects to multiple data sources that require different log on information. If the report connects to only a single ODBC data source or SQL server, and only a single set of log on information is required, simply pass 0 as the array index, or Connect, can be used instead.
Use a separate line of code for each table for which you want to change the logon info.
The order of tables in the array must conform to the order of tables in the report. (You can use the Database|Set Location command to determine the order of tables in the report.)
The first table in the report is array index (0), the second file is (1), etc. For example, to change the logon information of the first and third tables in a report to the NEW server, use the following syntax:
CrystalReport1.LogOnInfo(0) = "DSN = NEW;UID = 734;PWD = bigboard;DSQ = Administration1"
CrystalReport1.LogOnInfo(2) = "DSN = NEW;UID = 734;PWD =
bigboard;DSQ = Administration2"
If You tick the check box of "verify on every print", it will automatically updates the schema object changes.
Quote:
Originally posted by bsoundar
Hi.
What is the difference between "LogonServer" & "Connect" method.
"LogOnInfo" method is for connecting different Servers.
If any one could, clarify me.
And ... I created Balance Sheet report with a back-end has Oracle. I used DSN. How to reflect the Report if the Schema Object is changed.
Thank You
-
Re: Export Problems
Hi,
1. Use "SelectionFormula" to filter the data
Eg.
Cr.SelectionFormula = "{Table1.Field_name} = 'raja' "
------------
2. Make sure the backend field data type allow the decimal value
------------
3. May be the CRviewer runtime library files are not properly installed.
Quote:
Originally posted by Patzer
Hi,
I've created a VB exe, that dynamically opens existing *.rpt files, and exports them to pdf.
The user can add filter the data before the export (passed via the command line).
At some of the reports (at least when an unlinked subreport is included in the report), the decimal place seems to be snipped (1.23 becomes 1.00, and 1.67 also becomes 1.00).
Thus nearly any value is wrong.
When I open the report file in Crystal reports, everything is fine, but when I open it from Vb (also before the export, by using the CRviewer), the problem appears.
As the Seagate support was - to put it mildly - not very helpful - maybe one of you can help
I'm using CR 8.5, SQL-Server 7 and VB6.
-
Exporting crosstab report to excel file.
Hi,
I have a report with crosstab. this crosstab appears per group. i want to export each crosstab on separate excel sheet. as the number of groups incerases, the excel sheet should also increase.
I will make it clear.
i have something as category. i create a group of this field category. now i create a crosstab and insert in detail section. so the output will be matrix report as per category. that is i will get as many crosstabs as there are categories in my table.
now i want to export this report into microsoft excel file. Microsoft Excel is a spreetsheet package. Each file is a workbook and there can be n number of worksheets into that workbook.
what i want is that each crosstab ir each group should appear in single worksheet of excel workbook. It means there should be as many worksheets in the excel workbook as there are categories or crosstabs in the report.
Looking forward for ur reply.
Thank You.
-
Crystal Report 9 - Deployment Problem
I used Crystal Report 9 (Crystal Report Service Pack 1) in my Visual Basic application and it working fine on my system (i am using Windows 2000 Pro - Service Pack 4, Visual Studio Service Pack 5).
Now I need to creat a Deployment wizard, which can be Run on Windows 2000 and also on WINDOWS 98 (second edition). After a long searching and working, and spending alot of time on the file required files for Crystal Report, i creat a setup. BUT that dose not work properly even though i put all the required files as per the given instruction in the Crystal Report Runtime help.
Please please help me on that matter.... GIVE me list of files which required for the setup, and also which file should be put on which Path, and which DLL should be registered.
And the most important part is WINDOWS 98, in windows 98 there is problem of UNICOWS, please also help me on that matter.
I will be really very very very very thankful to u....
I am really unable to solve the problem of Crytal Report 9.0.
-
Re: Crystal Report 9 - Deployment Problem
Hi,
What type of crystal report engine you are using in your vb app.
eg. (ActiveX control, RDC)
regards,
K.Babu
Quote:
Originally posted by syedhassan4
I used Crystal Report 9 (Crystal Report Service Pack 1) in my Visual Basic application and it working fine on my system (i am using Windows 2000 Pro - Service Pack 4, Visual Studio Service Pack 5).
Now I need to creat a Deployment wizard, which can be Run on Windows 2000 and also on WINDOWS 98 (second edition). After a long searching and working, and spending alot of time on the file required files for Crystal Report, i creat a setup. BUT that dose not work properly even though i put all the required files as per the given instruction in the Crystal Report Runtime help.
Please please help me on that matter.... GIVE me list of files which required for the setup, and also which file should be put on which Path, and which DLL should be registered.
And the most important part is WINDOWS 98, in windows 98 there is problem of UNICOWS, please also help me on that matter.
I will be really very very very very thankful to u....
I am really unable to solve the problem of Crytal Report 9.0.
-
Sorry i missed this.... i am using RDC
-
Re: Clarification needed ... to Babu
First of all I would like to Thank you for replying.... Babu..
I tested what you said.. but i get an error stating...
x20506 Invalid Table Number
This is my coding.... Check where I made the Mistake. {First I checked the 'Verify on Every Print' in the report at Design Time} I use sub-report too.
Crys.LogonInfo(0) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
Crys.LogonInfo(1) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
' SubReport
Crys.SubreportToChange = "Liab.rpt"
Crys.LogonInfo(2) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
Crys.SelectionFormula = lvQuery ' Query Variable
' SubReport Assets.rpt
Crys.SubreportToChange = "Asset.rpt"
Crys.LogonInfo(3) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
Crys.SelectionFormula = lvQuery ' Query Variable
' Main Report
Crys.SubreportToChange = ""
Crys.SelectionFormula = lvQuery
Crys.DiscardSavedData = True
Crys.Destination = crptToWindow
Crys.WindowState = crptMaximized
Crys.Action = 1
In this report 1 main report, 2 Sub-report.
In the Main report I used 2 tables, in the Sub report, I used 1 report each.
Regards
Soundar
Note: Expecting your Early reply.. Thank You !!
-
Re: Crystal Report 9 - Deployment Problem
The required runtime files for an application developed using the Report Designer Component are listed below.
FILE LOCATION
CRAXDRT.DLL \PROGRAM FILES\SEAGATE SOFTWARE\REPORT DESIGNER COMPONENT
CRVIEWER.DLL \PROGRAM FILES\SEAGATE SOFTWARE\VIEWERS\ACTIVEXVIEWER
NOTE: You must register these DLLs using regsvr32.exe.
NOTE: The Crystal Report Viewer DLL needs to be distributed if reports are being printed to the screen. If the reports are being exported or printed to the printer, and not being viewed to a window, then this DLL is not required. Note: Embeddable Crystal Reports Designer Control accesses to the report engine through using CRAXDDRT.DLL (Crystal Reports ActiveX Designer Design and Runtime Support DLL
FILE LOCATION
IMPLODE.DLL \WINDOWS\SYSTEM or \WINDOWS\SYSTEM32
SSCSDK80.DLL \PROGRAM FILES\SEAGATE SOFTWARE\SHARED
PG32CONV.DLL \PROGRAM FILES\SEAGATE SOFTWARE\SHARED
CRPAIG80.DLL \WINDOWS\SYSTEM or \WINDOWS\SYSTEM32
MFC42.DLL \WINDOWS\SYSTEM or \WINDOWS\SYSTEM32
MSVCRT.DLL \WINDOWS\SYSTEM or \WINDOWS\SYSTEM32
NOTE: Include IMPLODE.DLL only for applications using reports created in versions previous to SCR 8.
The following files are also must register using with regsvr32.exe
"COMCAT.DLL"
"OLEPRO32.DLL"
"OLEAUT2.DLL.DLL"
"MSVBVM60.DLL"
"MSRDO20.DLL"
"MSSTDFMT.DLL"
"MSADODC.OCX"
"CRYSTL32.OCX"
"COMDLG32.OCX"
"MSCOMCTL.OCX"
"MSCOMCT2.OCX"
"MSRD2X35.DLL"
"MSJET35.DLL"
"DAO350.DLL"
"EXPORTMODELLER.DLL"
"CRTSLV.DLL"
Quote:
Originally posted by syedhassan4
I used Crystal Report 9 (Crystal Report Service Pack 1) in my Visual Basic application and it working fine on my system (i am using Windows 2000 Pro - Service Pack 4, Visual Studio Service Pack 5).
Now I need to creat a Deployment wizard, which can be Run on Windows 2000 and also on WINDOWS 98 (second edition). After a long searching and working, and spending alot of time on the file required files for Crystal Report, i creat a setup. BUT that dose not work properly even though i put all the required files as per the given instruction in the Crystal Report Runtime help.
Please please help me on that matter.... GIVE me list of files which required for the setup, and also which file should be put on which Path, and which DLL should be registered.
And the most important part is WINDOWS 98, in windows 98 there is problem of UNICOWS, please also help me on that matter.
I will be really very very very very thankful to u....
I am really unable to solve the problem of Crytal Report 9.0.
-
Re: Re: Clarification needed ... to Babu
You have to specify all the information in logoninfo(n) property
DSN = Data Source Name
UID = User Logon ID
PWD = Logon password
DSQ = "c:\projects\data.mdb" [or server name]
Quote:
Originally posted by bsoundar
First of all I would like to Thank you for replying.... Babu..
I tested what you said.. but i get an error stating...
x20506 Invalid Table Number
This is my coding.... Check where I made the Mistake. {First I checked the 'Verify on Every Print' in the report at Design Time} I use sub-report too.
Crys.LogonInfo(0) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
Crys.LogonInfo(1) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
' SubReport
Crys.SubreportToChange = "Liab.rpt"
Crys.LogonInfo(2) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
Crys.SelectionFormula = lvQuery ' Query Variable
' SubReport Assets.rpt
Crys.SubreportToChange = "Asset.rpt"
Crys.LogonInfo(3) = "DSN=Acc;UID=abc;PWD=abc;DSQ="
Crys.SelectionFormula = lvQuery ' Query Variable
' Main Report
Crys.SubreportToChange = ""
Crys.SelectionFormula = lvQuery
Crys.DiscardSavedData = True
Crys.Destination = crptToWindow
Crys.WindowState = crptMaximized
Crys.Action = 1
In this report 1 main report, 2 Sub-report.
In the Main report I used 2 tables, in the Sub report, I used 1 report each.
Regards
Soundar
Note: Expecting your Early reply.. Thank You !!
-
Re: Exporting crosstab report to excel file.
Hi,
In Crystal Report Viewer there is an option to filter the data while viewing the report, use the filter wizard to filter the exact data whatever you need then export the content which format you wish.
Quote:
Originally posted by SayliJoshi
Hi,
I have a report with crosstab. this crosstab appears per group. i want to export each crosstab on separate excel sheet. as the number of groups incerases, the excel sheet should also increase.
I will make it clear.
i have something as category. i create a group of this field category. now i create a crosstab and insert in detail section. so the output will be matrix report as per category. that is i will get as many crosstabs as there are categories in my table.
now i want to export this report into microsoft excel file. Microsoft Excel is a spreetsheet package. Each file is a workbook and there can be n number of worksheets into that workbook.
what i want is that each crosstab ir each group should appear in single worksheet of excel workbook. It means there should be as many worksheets in the excel workbook as there are categories or crosstabs in the report.
Looking forward for ur reply.
Thank You.
-
Is your problem solved?
Quote:
Originally posted by syedhassan4
Sorry i missed this.... i am using RDC
-
Re: Re: Exporting crosstab report to excel file.
Hi
see i do not want to filter the data. i want all the groups or categories to appear in the report. while exporting i want each crosstab or category with the categoryname as name of sheet to appear in each sheet of excel file.
Pl Help .its really important.
Thank you
Quote:
Originally posted by K.Babu
Hi,
In Crystal Report Viewer there is an option to filter the data while viewing the report, use the filter wizard to filter the exact data whatever you need then export the content which format you wish.
-
Re: Re: Re: Clarification needed ... to Babu
hi..
I use Oracle has a Database .... so I left the DSQ portion,
What else i should do...
Quote:
Originally posted by K.Babu
You have to specify all the information in logoninfo(n) property
DSN = Data Source Name
UID = User Logon ID
PWD = Logon password
DSQ = "c:\projects\data.mdb" [or server name]
-
Checkboxes in Crystal Reports ?
Hi all,
I just started using Crystal Reports a few days ago and thus don't have any real experience with it. I'm trying to have checkboxes in my report, which will be checked or not depending on a boolean value in my database. What's the easiest way to achieve this with Crystal Reports ?
Thanks in advance,
Maxime
-
Exporting Crystal Report
Hi
i am writing code for exporting crystal report file. but get the following error:
Error in File C:\Inetpub\wwwroot\HR\SkillMatrix.rpt: Error detected by export DLL:
i am pasting code.
ReportDocument crReportDocument =new ReportDocument();
crReportDocument.Load"C:\\Inetpub\\wwwroot\\HR\\SkillMatrix.rpt");
CRSkillReport.ReportSource = crReportDocument;
ExportOptions exportOpts = new ExportOptions();
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();
exportOpts = crReportDocument.ExportOptions;
exportOpts.ExportFormatType = ExportFormatType.Excel;
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
diskOpts.DiskFileName = "c:\\abc.xls";
exportOpts.DestinationOptions = diskOpts;
try
{
crReportDocument.Export ();
}
catch (Exception err1)
{
Response.Write("<br>");
Response.Write(err1.Message.ToString());
}
Thanks
-
Re: Exporting Crystal Report
This problem is solved
Thanks
Quote:
Originally posted by SayliJoshi
Hi
i am writing code for exporting crystal report file. but get the following error:
Error in File C:\Inetpub\wwwroot\HR\SkillMatrix.rpt: Error detected by export DLL:
i am pasting code.
ReportDocument crReportDocument =new ReportDocument();
crReportDocument.Load"C:\\Inetpub\\wwwroot\\HR\\SkillMatrix.rpt");
CRSkillReport.ReportSource = crReportDocument;
ExportOptions exportOpts = new ExportOptions();
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();
exportOpts = crReportDocument.ExportOptions;
exportOpts.ExportFormatType = ExportFormatType.Excel;
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
diskOpts.DiskFileName = "c:\\abc.xls";
exportOpts.DestinationOptions = diskOpts;
try
{
crReportDocument.Export ();
}
catch (Exception err1)
{
Response.Write("<br>");
Response.Write(err1.Message.ToString());
}
Thanks
-
1 Attachment(s)
View Pictures from database.Table.field contains picture filename with path.
Dear Friends,
I received more emails regarding, how to view pictures in the database file.
The database table field contains picturename and its path. they want to display get pictures from the stored path.
I Attached VB 6.0 sample Code to this reply
Project used software:
Windows 2000
VB 6.0
Crystal Report using with RDC Method Engine 8.5
MS Access 97
Attach file name: CRPhoto.zip
I hope this sample code will help all developers.
Regards,
K.Babu
-
Open Crytal file in ASP Page
Hi,
how to open the Crystal report in the ASP page..
thanx in adv..
Venu
-
Hello..
I'm new in Crystal Reports. I have a question..
I have a VB project, and on one form i have data in DataGrid.
This data are results of an SQL query. Database is Baza.mdb .
Are there on the forum (or WEB) any instructions how to print those data in DataGrid trough Crystal Report ???
Or maybe you can help me?
Thank you...
-
Sample VB Code for Export PDF Format from Crystal Report 8.5 in VB at Run Mode.
You can find out the answers from the VB code for the following questions.
Q:
How to open MSAccess database file from select path in VB at run mode?
How to hide password prompt dialog box, from the protected database file?
How to open OCX report file to RDC method?
How to Export PDF format without Preview screen?
How to Hide export prompt dialog box?
How to Filter the data records in VB at Run mode?
How to open automatically Exported PDF file with acrobatreader?
Code:
Dim crrpt As New CRAXDRT.Report
Dim crapp As New CRAXDRT.Application
Set crrpt = crapp.OpenReport("C:\Projects\quotation.rpt")
crrpt.Database.Tables(1).Location = "C:\Projects\BrCusinfo.mdb"
crrpt.Database.Tables(1).SetLogOnInfo "CRSS", "BrCusinfo.mdb", "Admin", "hello"
crrpt.RecordSelectionFormula = "{quequotation.QuotationNo} = " & 58
crrpt.ExportOptions.ApplicationFileName = "C:\Projects\expquotation.pdf"
crrpt.ExportOptions.DestinationType = crEDTApplication
crrpt.ExportOptions.DiskFileName = "C:\Projects\expquotation.pdf"
crrpt.ExportOptions.PDFExportAllPages = True
crrpt.ExportOptions.FormatType = crEFTPortableDocFormat
crrpt.Export False
'Remarked Viewer Report Output
'CRViewer1.ReportSource = crrpt
'CRViewer1.ViewReport
-
Printing Problem
Hi Babu!
I am using Activex Viewer in Crystal reports 8 to show the reports on Web with ASP. The reports appears properly Crystal report environment.Even the report appears fine when used in Visual basic. But When seen on web the alignment of the report is changing.The text is not taking the pagesetup margins at all.
Looking forward from u...
ravi
-
Crystal Reports Utility
Does anyone know of a utility that will compare the differences betweent two .RPT files?
Thanks,
Bob
-
NET Crystal Reports Login Text Database
Hello ,
I am using Crystal Reports Net with a cvs file through an DAO Connection.
When add the database file within the crystal report designer,everything is ok.Crystal reports recognize the file as text database and its fields.
However,when i bind the report to the crystal report viewer (at runtime) the login screen appears asking for password.The problem is that i have NOT used a secure logon.
I tried to use TableLogInfo but the dialog still appears!!
LOGIN FAILED :(((((
-
Error returned: 20614 meaning: Starting
I am currently using CR 7.0 on a winnt 4.0
platform (I know, I know, nothing I can
control) with sql 2000. I am getting the
following error
User Session has timed out, I have tried
everything suggested by crystal in the pdf
file outlining this error. From there they
suggested that I insert code to display the
true error code, which is:
Error returned: 20614 meaning: Starting
background processing failed
Here is how I got this error
On the web page (asp) I go in to the search
page and perform a search, it takes about 10
minutes but the report comes up. So far so
good...
Now if I do the search again and then have
another person login to the same search page
and perform a search (can be totaly
different searches) the second person will
get this error, while my search will
complete.
Can someone help me out? Thanks
-
changing the default display for Boolean fields in Crystal Reports **RESOLVED**
Hi,
I'm trying to change the default display of a boolean field value so that it would display a String of my choice (in this case a different language than English).
I've tried using IIF in the formula of the Boolean Text property (in the Boolean tab in the field's Format Editor) but it says that the formula's result must be a number.
Any ideas?
Thanx
-
Please help me
Dear Mr. Babu
Please help for the following problem.
I have designed a report in crystel report 8.0. with password protected MS Access database. When I save the report with save report with data, on prevewing through my VB project it opens up the report but did not refresh with any new data that is being added to dadabase. When I run the same report without saving with save with data option it gives me the error : error no 20535 Invalid secession parameter.
A am pasting the sample code that I used: where cr1 the crystel report control
with cr1
.reset
.reportfilename=app.path & "\report1.rpt"
.LogInfo="aaaa" '(this is the password)
.WindowParentHandle=MdiForm1.hwnd
.WindowState=crptMaximized
.Destination=crptToWindow
.Action=0
end with
This same code works fine with database without any password. And gives me updated data on previewing.
Please how can get refreshed report from a password protected database.
Thanks to you.
Biswas
-
Hi, Babu
Crystal Reports 8.5 makes a tmp file with size 0 kb when I open a
report. This is when I am developing and with the compiled version of my app.
CR puts the files in de lowest directory where the user has rights (not in the tempdir, but dir's like C-root) and doesn't delete them. Very annoying.
Do you know if there is a hotfix? Or do you have another solution?
I develop with Crystal Reports 8.5, Visual Basic 6.0 under Windows XP and 2000.
Regards,
John
-
redistribution crystal report with application
hi babu,
i using crystal report 6.0 for my project. i don't know what are the fiels needed to redistribute the crstal report with my application package. i take setup for the project using package & deployment of visual studioi .net. any one help to me. how to do this.
thanks in advance.
Murali.M
-
Setting database path at Run-Time for Crystal Report
Hi Babu,
I've designed a report based on a ADO database using a connection string. While building the connection string I pointed out the database from which the data is extracted.
The report runs on the development machine no problems, but when I try to run it on a deployment machine I get a Database Error:
"[Microsoft][ODBC Microsoft Access Driver] '(Unknown)' is not a valid path. Make sure the path name is spelled correctly and that you are connected to the server on which the file resides".
I assume that the report tries to look for the database where it was at the design stage.
My question is: how can I set the database's path at run time?
-
Printing
Hello everyone,in Crystal, when i make a report and preview it it shows al the data, the formules... etc... perfectly, but when i print it fails, dont even enter the queue... and if i print to a pdf (usin pdf writer of adobe acrobat 5) it prints characters of wrong type (like if i type "AAaa" then the text printed is "$$DD") i dont know if its bug, error or what. if someone can help... i use Crystal Reports 9, windows XP (or 2000 sp5) (oh, by the way the windings fonts print like the preview... and all the other apps work fine)
-
Server has not been opened yet?
Hello Mr. Babu and dear friends al around the world. I'm new one to Crystal Report. I developed using VB 6.0, Crystal Report 8.5 and SQL Server 2000. Please take a look at my codes below (VB Code and SQL Code - Stored Procedure) :
'The code in VB
Private Sub cmdPrint_Click()
If cmbAccount.Text = "All Account" Then
NoAccount = "%"
Else
NoAccount = cmbAccount.Text
End If
‘The codes for crystal report begin here….
Dim rptDeposit As New CrystalReport1
rptDeposit.Database.LogOnServer "pdsodbc.dll", "aan", "MoneyMall", "aan", "icandoit"
rptDeposit.EnableParameterPrompting = False
rptDeposit.ParameterFields(1).AddCurrentValue NoAccount
rptDeposit.ParameterFields(2).AddCurrentValue dtpStartDate.Value
rptDeposit.ParameterFields(3).AddCurrentValue dtpEndDate.Value
CRViewer1.ReportSource = rptDeposit
CRViewer1.ViewReport
End Sub
'The code in SQL, I generated CrystalReports1 from this stored procedure which has 3 parameters, using standart expert report wizard. (i'm using "add Crystal Report 8.5" from VB Menu :
This is my store procedure in SQL Server 2000 :
PROCEDURE PrintDeposit
@NoAccount nvarchar(10), @StartDate datetime,
@EndDate datetime
AS
SELECT * FROM Deposit
WHERE NoAccount LIKE @NoAccount AND
(DAY(MarginTime) BETWEEN DAY(@StartDate) AND DAY(@EndDate)) AND
(MONTH(MarginTime) BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)) AND
(YEAR(MarginTime) BETWEEN YEAR(@StartDate) AND YEAR(@EndDate))
Order By MarginTime
Error Message in VB : "The Server has not yet been opened !" and i can not see the report in the viewer!
What did I do wrong? Please note that this is my server info :
data source=aan
user id=aan
password=icandoit
initial catalog=MoneyMall
Please, tell me the answers! I almost blown up to think all these!
Thank U so much for your help!
-
Mr Babu, or someone else, are you still around to help me.... please, i need the answer very soon.... Please, solve the problem. I'm running out of time here....... Thank You!:(
-
Re: Server has not been opened yet?
Hi,
1. ParameterFields(n), index should start from 0,1,2,...
2. "ParameterName; NewValue; SetCurrentValue"
Eg. CrystalReport1.ParameterFields(0) = "DatePar;Date(1998,12,7);TRUE"
Regards,
K.Babu
Quote:
Originally posted by aan_handoko
Hello Mr. Babu and dear friends al around the world. I'm new one to Crystal Report. I developed using VB 6.0, Crystal Report 8.5 and SQL Server 2000. Please take a look at my codes below (VB Code and SQL Code - Stored Procedure) :
'The code in VB
Private Sub cmdPrint_Click()
If cmbAccount.Text = "All Account" Then
NoAccount = "%"
Else
NoAccount = cmbAccount.Text
End If
‘The codes for crystal report begin here….
Dim rptDeposit As New CrystalReport1
rptDeposit.Database.LogOnServer "pdsodbc.dll", "aan", "MoneyMall", "aan", "icandoit"
rptDeposit.EnableParameterPrompting = False
rptDeposit.ParameterFields(1).AddCurrentValue NoAccount
rptDeposit.ParameterFields(2).AddCurrentValue dtpStartDate.Value
rptDeposit.ParameterFields(3).AddCurrentValue dtpEndDate.Value
CRViewer1.ReportSource = rptDeposit
CRViewer1.ViewReport
End Sub
'The code in SQL, I generated CrystalReports1 from this stored procedure which has 3 parameters, using standart expert report wizard. (i'm using "add Crystal Report 8.5" from VB Menu :
This is my store procedure in SQL Server 2000 :
PROCEDURE PrintDeposit
@NoAccount nvarchar(10), @StartDate datetime,
@EndDate datetime
AS
SELECT * FROM Deposit
WHERE NoAccount LIKE @NoAccount AND
(DAY(MarginTime) BETWEEN DAY(@StartDate) AND DAY(@EndDate)) AND
(MONTH(MarginTime) BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)) AND
(YEAR(MarginTime) BETWEEN YEAR(@StartDate) AND YEAR(@EndDate))
Order By MarginTime
Error Message in VB : "The Server has not yet been opened !" and i can not see the report in the viewer!
What did I do wrong? Please note that this is my server info :
data source=aan
user id=aan
password=icandoit
initial catalog=MoneyMall
Please, tell me the answers! I almost blown up to think all these!
Thank U so much for your help!
-
Searching text in subreports
Hello Mr. Babu and everyone;
I'm relatively new to CR. I'm using CrustalReportViewer for windows forms to view a report. The report has subreports in it, they are not on-demand so they appear as a large,single,multiple-section report to the user.
When I perform a text search on this report, the data of the subreports are not searched, their titles are searched only. Is it possible to make the find dialog (or crystalreportviewer.SearchForText()) search the whole report?
Thanks everyone in advance
-
Hi, Mr. Babu. Thanks to reply. I highly appreciate that, really! :). I finally solve my problems. My problem is actually not on my parameterfield index, because I'm starting from 1 is correct, in fact if I started from 0, the error message will be "Subscribe out of range!".
My problem is, I can not connect to the server because I use the wrong method. This is the biggest misunderstood of method. To connect to server, I supposed not to use LogOnServer method. This method works like an active connection in ADO, that made only once, and used for many times. That's why I got error message "Server has not been opened yet!" But i must use SetLogOnInfo method. This syntax of the method is like this (for SQL server) :
report.database.tables(1).SetLogOnInfo Servername as string, databasename as string, userid as string, password as string.
Then I can view my report on viewer. I found this method and the explanation from technical books from this site (if I wish anyone would like to download) :
'For Crystal reports 9 and above :
http://support.crystaldecisions.com/...properties.pdf
'For version before 9 :
http://support.crystaldecisions.com/...nnectivity.pdf
Now, Mr. Babu, how is the way to set up some text during the run time. Let's say, I have a text that I must set according to the user's choice (this text will be on the Report header section). For example : if the user choose all branch (from combo box in VB), the text will be printed all branch, if the user choose Surabaya, the text will be printed "Surabaya". How do I set this? Thank You for answering. I do really happy to join this forum with you and all friends around the world. I'm waiting for your reply! Thank You once again!
:cool:
-
Hi,
1. Insert the formula field in crystal report design mode.
2. Validate the string value for the formula field in vb run mode.
eg.
if the user choose all branch
CrystalReport1.Formulas(0) = "MyFormula = 'all branch'"
Else,
CrystalReport1.Formulas(0) = "MyFormula = 'Surabaya'"
Quote:
Originally posted by aan_handoko
Hi, Mr. Babu. Thanks to reply. I highly appreciate that, really! :). I finally solve my problems. My problem is actually not on my parameterfield index, because I'm starting from 1 is correct, in fact if I started from 0, the error message will be "Subscribe out of range!".
My problem is, I can not connect to the server because I use the wrong method. This is the biggest misunderstood of method. To connect to server, I supposed not to use LogOnServer method. This method works like an active connection in ADO, that made only once, and used for many times. That's why I got error message "Server has not been opened yet!" But i must use SetLogOnInfo method. This syntax of the method is like this (for SQL server) :
report.database.tables(1).SetLogOnInfo Servername as string, databasename as string, userid as string, password as string.
Then I can view my report on viewer. I found this method and the explanation from technical books from this site (if I wish anyone would like to download) :
'For Crystal reports 9 and above :
http://support.crystaldecisions.com/...properties.pdf
'For version before 9 :
http://support.crystaldecisions.com/...nnectivity.pdf
Now, Mr. Babu, how is the way to set up some text during the run time. Let's say, I have a text that I must set according to the user's choice (this text will be on the Report header section). For example : if the user choose all branch (from combo box in VB), the text will be printed all branch, if the user choose Surabaya, the text will be printed "Surabaya". How do I set this? Thank You for answering. I do really happy to join this forum with you and all friends around the world. I'm waiting for your reply! Thank You once again!
:cool:
-
capture parameter past and store to textbox
I created a parameter passing in crystal reports so user can enter what records need to be printed i.e idnumber, is there a way to capture the parameter passed to a textbox.
10x
cyrus
-
using Crystal Report Viewer Control 9 in VB.NET
Hi,
I am trying to use a Crystal Report Viewer Control 9 (that comes with Crystal Reports 9 Developers Vs) in my VB.NET application.
I have Crystal Reports 9.0 developers installed on my development machine, so I think I have all of the necessary dlls.
In my project, I got into toolbox - Components, browse to add Crystal Report Viewer Control 9 to my components list(crviewer9.dll).
I put the control on my form,
Friend WithEvents AxCRViewer92 As AxCRVIEWER9Lib.AxCRViewer9
it's initialized,
and then I add my own code to view the report after the user selects the report from the dialog box:
me.AxCRViewer92.ReportSource = dlg.FileName
me.AxCRViewer92.ViewReport()
it all compiles,
but when I run this app, first of all, my control comes up on the screen as a white rectangle.
and after I try to open the report, I get the following:
An unhandled exception of type 'System.InvalidCastException' occurred in axinterop.crviewer9lib.dll
Additional information: No such interface supported
I'm new to Crystal Reports, and I would really appreciate any help on using this Crystal Report Viewer Control 9. So far, I hasn't been able to find any info about it from Crystal Decisions. I need to use this control, and not the CrystalReportsViewer that comes with .NET because of some internal company issues.
Thanks.
-
recordset as datasource of crystal report
Im using Crystal report 8 and VB6, my problem is how can i make the Crystal report get the record from the recordset i made. The problem is when i run the report it shows all the record from the table. How can i make the report show only the content of the recordset?
Below is the code im using. dcCategory is datacombo.
Code:
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Set cnn = New ADODB.Connection
cnn.Open "File name=c:\Product.udl"
Set rst = cnn.Execute("select item_no,item_category,Item_desc,Item_unit,item_price from tblitems where item_Category ='" & dcCAtegory.Text & "'")
Dim crystal As CRAXDRT.Application
Dim treport As CRAXDRT.Report
CRViewer1.DisplayBorder = False
CRViewer1.DisplayTabs = False
CRViewer1.EnableDrillDown = False
CRViewer1.EnableRefreshButton = False
Dim crxApplication As New CRAXDRT.Application
Set crystal = New CRAXDRT.Application
Set treport = crystal.OpenReport("d:\application\list.rpt")
treport.DiscardSavedData
treport.Database.SetDataSource rst
CRViewer1.ReportSource = treport
CRViewer1.ViewReport
When i design the report using crystal report designer i use the table as the datasource and i did not set anything else. Could this be the problem?
Thanks in advance!!!
-
Package and deploying in VB
Hello Babu, thanks for your last help. Even if the property dosn't match at all (I'm using property of report.formulafields(1).text to set the formula) but it does gave me the idea. thanks a lot :)
Now, I'm having a new problem. When I tried to package and deploy my VB-Project that contains CR inside, I found that there is "nothing happened", means that in the Package folder, the Package and Deployment Wizard doesn't make any files for installation setup, not even one!!!!
But when I try to package a project that doesn't contain CR inside, it does works! Why so strange?
Please notice that I'm using Crystal report 8.5, Visual basic 6.0 SP 5. Why the package and deployment wizard doesn't work for my project with cr inside? Please, reply this soon... I'm also surfing to another web to get the answers... thank you!
Regards
Aan Handoko
-
Re: Package and deploying in VB
Hi,
Yes, I also face the same problem, which you mention bellow regarding package wizard, I don't want to R&D why package wizard not support that, so that, i written the setup script in Install Shield.
You can try by change the VB setup project manually. you have to Include all the crystal report runtime files in cab file. which is mentioned in Crystal Report Developer Runtime help document.
Note: Keep in mind, what are the files you have to register with regsvr32.exe, This details are mentioned in Developer runtime help document file.
Thanks,
K.Babu.
Quote:
Originally posted by aan_handoko
Hello Babu, thanks for your last help. Even if the property dosn't match at all (I'm using property of report.formulafields(1).text to set the formula) but it does gave me the idea. thanks a lot :)
Now, I'm having a new problem. When I tried to package and deploy my VB-Project that contains CR inside, I found that there is "nothing happened", means that in the Package folder, the Package and Deployment Wizard doesn't make any files for installation setup, not even one!!!!
But when I try to package a project that doesn't contain CR inside, it does works! Why so strange?
Please notice that I'm using Crystal report 8.5, Visual basic 6.0 SP 5. Why the package and deployment wizard doesn't work for my project with cr inside? Please, reply this soon... I'm also surfing to another web to get the answers... thank you!
Regards
Aan Handoko
-
Re: using Crystal Report Viewer Control 9 in VB.NET
Hi,
You can't assign report file name directly to reportsource.
me.AxCRViewer92.ReportSource = dlg.FileName
Use the following code sample
Dim crrpt As New CRAXDRT.Report
Dim crapp As New CRAXDRT.Application
Set crrpt = crapp.OpenReport("D:\quotation.rpt")
crrpt.Database.Tables(1).Location = "D:\Mydata.mdb"
crrpt.Database.Tables(1).SetLogOnInfo "CRSS", "mydata.mdb", "Hello", "hi"
CRViewer1.ReportSource = crrpt
CRViewer1.ViewReport
Quote:
Originally posted by alfiya
Hi,
I am trying to use a Crystal Report Viewer Control 9 (that comes with Crystal Reports 9 Developers Vs) in my VB.NET application.
I have Crystal Reports 9.0 developers installed on my development machine, so I think I have all of the necessary dlls.
In my project, I got into toolbox - Components, browse to add Crystal Report Viewer Control 9 to my components list(crviewer9.dll).
I put the control on my form,
Friend WithEvents AxCRViewer92 As AxCRVIEWER9Lib.AxCRViewer9
it's initialized,
and then I add my own code to view the report after the user selects the report from the dialog box:
me.AxCRViewer92.ReportSource = dlg.FileName
me.AxCRViewer92.ViewReport()
it all compiles,
but when I run this app, first of all, my control comes up on the screen as a white rectangle.
and after I try to open the report, I get the following:
An unhandled exception of type 'System.InvalidCastException' occurred in axinterop.crviewer9lib.dll
Additional information: No such interface supported
I'm new to Crystal Reports, and I would really appreciate any help on using this Crystal Report Viewer Control 9. So far, I hasn't been able to find any info about it from Crystal Decisions. I need to use this control, and not the CrystalReportsViewer that comes with .NET because of some internal company issues.
Thanks.
-
Re: capture parameter past and store to textbox
Hi,
Instead of parameter, display dialog form with text box for user interface, and then pass the value to "parameter" Or "formulas" to crystal report.
Formula Eg.
CrystalReport1.Formulas(0) = "MyFormula = '" & text1.text & "'"
yours friendly,
K.Babu
Quote:
Originally posted by Cyrus
I created a parameter passing in crystal reports so user can enter what records need to be printed i.e idnumber, is there a way to capture the parameter passed to a textbox.
10x
cyrus
-
Re: Re: Package and deploying in VB
Hello K.Babu, I've tried your suggestion. These files : craxdrt.dll, craxddrt.dll, crpe32.dll crviewer32.dll, crystl32.ocx, rdwiz.dll had been included in the list of files to be installed. But after I've tried, the error message is "Physical database not found" Can you find out, which file that I missed to be included in my installation files.. Eh, I 've also tried to install crystal report 8.5 to the destination computer and my program was working. I think, there must be a file or some files that I missed, like I mention above. Can you tell me which file is it, according to error message " Physical database not found"? Thank you for your kindly help!
Regards,
Aan H.
Quote:
Originally posted by K.Babu
Hi,
Yes, I also face the same problem, which you mention bellow regarding package wizard, I don't want to R&D why package wizard not support that, so that, i written the setup script in Install Shield.
You can try by change the VB setup project manually. you have to Include all the crystal report runtime files in cab file. which is mentioned in Crystal Report Developer Runtime help document.
Note: Keep in mind, what are the files you have to register with regsvr32.exe, This details are mentioned in Developer runtime help document file.
Thanks,
K.Babu.
:rolleyes: :rolleyes:
-
Re: Re: Re: Package and deploying in VB
Hi,
I think you are using RDC Method, that's no required crystl32.ocx, Find out the RDC Method Engine Runtime Requirement Files.
IF you have not, i will give you ok.
Regards,
K.Babu
Quote:
Originally posted by aan_handoko
Hello K.Babu, I've tried your suggestion. These files : craxdrt.dll, craxddrt.dll, crpe32.dll crviewer32.dll, crystl32.ocx, rdwiz.dll had been included in the list of files to be installed. But after I've tried, the error message is "Physical database not found" Can you find out, which file that I missed to be included in my installation files.. Eh, I 've also tried to install crystal report 8.5 to the destination computer and my program was working. I think, there must be a file or some files that I missed, like I mention above. Can you tell me which file is it, according to error message " Physical database not found"? Thank you for your kindly help!
Regards,
Aan H.
:rolleyes: :rolleyes:
-
i need to print direct to the printer vb6
hello :rolleyes:
i m using vb6 and cr9
i need to automatic print a report to a printer
Private Sub Form_Load()
Dim mum As Integer
num = Vendas_clientes.txtID_VENDA.Caption
num = num + 0
Screen.MousePointer = vbHourglass
If Not (Report.ParameterFields.item(1).CurrentValue = num) Then
Report.ParameterFields.item(1).AddCurrentValue (num)
End If
Screen.MousePointer = vbHourglass
CRViewer91.ReportSource = Report
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
CRViewer91.PrintReport
End Sub
and another thing
how can i based on the printer name (but if need more information is easy aquired)
select a printer for the report to be printed in runtime
i have selected a specifeid printer for each report but i may need to print the report to a network printer and same times a local printer
i easaly get the printer names
Dim pr As Printer
'
'
'
'Private Sub CmdPrinter_Click()
' For Each pr In Printers
' Combo1.AddItem pr.DeviceName
' Next
'End Sub
now i need to send the report for one of the printers
tks for your help
and keep on the good work you have done
-
Formatting Fields
Two questions:
1. I have a field in an Access database that is a Date/Time field and contains times. When I add this field to my Crystal Report it is displayed as a date instead of a time. How do I change the formatting?
2. The report has a summary field that adds all of the minutes that have elapsed but because the field is a numeric field, rather than a time field, the summary will show things like 253 minutes. How can I get the report to calculate minutes before printing?
The version of Crystal I am using is 4.6.1.0
Thanks