-
November 8th, 2003, 01:52 AM
#481
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
-
November 9th, 2003, 08:53 AM
#482
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?
-
November 16th, 2003, 02:47 AM
#483
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)
"...Better dead than stupid...."
-
November 18th, 2003, 11:08 PM
#484
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!
-
November 19th, 2003, 04:25 AM
#485
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!
-
November 19th, 2003, 06:16 AM
#486
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
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!
Last edited by K.Babu; November 19th, 2003 at 06:27 AM.
Please avoid sending emails to my personal mail:
write your doubts as thread in Codeguru
Crystal Reports Forum.
This will help all people having similar matters, and will let people who know solutions on the specific topic
share their knowledge.
Visit my company web site (Qmax Test Equipments Private Limited)
Yours friendly,
K.Babu
-
November 19th, 2003, 10:19 AM
#487
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
-
November 20th, 2003, 12:34 AM
#488
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!
-
November 21st, 2003, 02:29 AM
#489
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'"
Originally posted by aan_handoko
Hi, Mr. Babu. Thanks to reply. I highly appreciate that, really! ![Smilie](images/smilies/smile.gif) . 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!
Please avoid sending emails to my personal mail:
write your doubts as thread in Codeguru
Crystal Reports Forum.
This will help all people having similar matters, and will let people who know solutions on the specific topic
share their knowledge.
Visit my company web site (Qmax Test Equipments Private Limited)
Yours friendly,
K.Babu
-
November 21st, 2003, 09:21 AM
#490
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
-
November 21st, 2003, 05:17 PM
#491
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.
-
November 22nd, 2003, 02:50 AM
#492
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!!!
Thanks!!!
Kristine
-
November 27th, 2003, 12:05 AM
#493
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
-
November 27th, 2003, 01:40 AM
#494
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.
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
Please avoid sending emails to my personal mail:
write your doubts as thread in Codeguru
Crystal Reports Forum.
This will help all people having similar matters, and will let people who know solutions on the specific topic
share their knowledge.
Visit my company web site (Qmax Test Equipments Private Limited)
Yours friendly,
K.Babu
-
November 27th, 2003, 02:37 AM
#495
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
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.
Please avoid sending emails to my personal mail:
write your doubts as thread in Codeguru
Crystal Reports Forum.
This will help all people having similar matters, and will let people who know solutions on the specific topic
share their knowledge.
Visit my company web site (Qmax Test Equipments Private Limited)
Yours friendly,
K.Babu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|