Hi babu,
Can u point me to some sample program, so that i can get a fair idea of using Crystal reports in VB.
Regards,
kiran.
Printable View
Hi babu,
Can u point me to some sample program, so that i can get a fair idea of using Crystal reports in VB.
Regards,
kiran.
How can I display a report using 'CRViewer' control. I could able to show it using 'CrystalReport' control.
Regards,
kiran.
hi,
Which version of crystal report you had.
Thanks.
MailID: [email protected]
Well i have a bit ancient version :)) of Crystal reports . The version is 4.5 and i use it with Visual basic 6.0
How do i save the report generated to a file? I want to save it programatically.
How to send the report as an email?
Regards,
kiran.
Hello Babu,
Good Morning,
U are doing a great job in solving the doubts of crystal, Hardly we find people knowing in depth of crystal. My sincere thanks to u.
The blank lines is left intentionally at the report footer, so that the printer moves say 5 or 6 lines above, so that the user can cut it off, very easily. But after cutting the paper, there will be 5 lines blank before the heading. This is used for example something like in a departmental stores( where they print continous stationery, as the print comes, they will tear it and give to customer).
And also, I do observe that generally crystal takes 4-6 secs on a average to send the data to the printer. Is there anyway, by which I can avoid the delay.
I would like to issue the print, only when the printer is online, how do I make sure this because, I am giving this
report.ExportOptions.FileName="c:\a.prn" report.export false
This is directly giving the output on to the printer if the printer is ON, otherwise, no error msg also.
And lastly, one more thing how do I make sure that the crystal report has exported the data 100% correctly ( It contains data, I mean if the conditions are not satisfied, then it prints the page header, and others without the actual data), I do not want to print this, when the condition is not satisfied.
I am sorry, if I am disturbing u too much.
Have a nice day.
Regards,
Shiv Kumar G.M.
hi,
use RecordsPrinted property of crystal report this will return number of records to be printed.
yours,
Babu
MailID: [email protected]
Hi Babu,
I'm brand new in Crystal report, I was wonder if you could spend a little time to help me to create a report in VB using Crystal Report.
I have Visual Basic 6.0 and Crystal Report 6.0 installed in my computer.
I have create a report file called ex1.rpt,
but in my VB I can not file the Crystal Report compoent. so I don't know how to call my report file. CAn you help me?
thanks
Khin Lau
hi,
In VB (Project menu - Components) check the crystal report control,
Drag the crystal control to your form and follow the code
cr.reportfilename = "myreport.rpt"
cr.action = 1
if you want more details mail me.
Thanks,
Babu
MailID: [email protected]
...Except K. Babu ;)...
If K. Babu helped you here, it is a good policy to rate his answers.
So, please, if you are concerned, go to the answer he gave you, and
scroll down page until you see on the right a combo and a commandButton
(with caption= "Rate it"). Select appropriate value from combo, then
click on button.
This is the way, here, to say "Thank you".
Regards to everyone,
Cesare Imperiali
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
hi,
Thank you, for your intrest regarding codeguru website.
I said "Thank you" to you, by yours way.
K.Babu
MailID: [email protected]
hi,
Apply the following code to export file (text format) directly without prompt.
cr.Destination = 2 '(to file)
cr.PrintFileName = "myfile.txt"
cr.PrintFileType = 2 '(text format
yours,
Babu
MailID: [email protected]
Dear babu,
I am still using Crystal Reports 4.6. I would like to know what the later versions have to offer me before I invest money for it.
I appreciate your kindness to spend your valuable time for code guru users.
Kishore.
hi,
The latest version of crystal report released 8.5, there are three editions. Developer,Professional,Standard
yours,
Babu
MailID: [email protected]
Can I change the positions of columns in a report at run time through VB.
You can change crystal report column position using with RDC.
Babu
MailID: [email protected]
Hi,
I have a problem with the parameters passing.
Suppose you have a report that contains three sub reports. These sub reorts are linked to the main report columns. But the main report requires two string parameters to be passed.
How can I pass parameter values to the report. Currently I am using the Report.ReplaceSelectionFormula property to do but it is not the correct way to do things :-)
So Can you guide me on how to do it ?
Thanks,
Krogoth!
FSM
Hi
How to custom export of cystal report?.
I want to export crystal report to new file format
same GIF,
Can you tell me format of crystal report files?.
Thank you very much!
We are using VB6.0 and CR7.0 The problem with the help is that it lists like 5 files to redistribute with VB setup.
We know better than that. It doesn't allow full functionality like Group, Export, etc. without the other files when you print or preview. We have narrowed down to like 25 files to redistribute and it will provide full functionally. I don't know if it is a violation of CR but they don't do all functions.
So either CR is screwed up with their files or we did some wrong coding. Most of the files that we have added begin with U2*.DLL.
Can you help?
hi,
You can export from Crystal report using with PrintFileType property, this property list supported format,
you can enter the file name in PrintFile Property.
and Destination property - To File.
MailID: [email protected]
hi,
I suggest Package Wizard, that will help you your problem.
Others no comments.
Babu
MailID: [email protected]
We are facing a bug in crystal report. I am printing a memo field (with RTF Format) in Crystal report 8.0 using VB/MS SQL 7.0.I am passing a ADO recordset to field data type ttx file. The reports are genearlly of 3-4 pages.In print preview it shows correctly but when i take out a printout,sometime first line of next page gets printed on previous page as well as on the next page also. So same line gets printed twice rather than once.
e.g
In preview
Page1: XYZ (Line 1)
.......
AAA (Last Line)
Page2: ZZZZZ (Line 1)
.........
CCCC (last Line)
While printing
page1: XYZ (Line 1)
.......
AAA
ZZZZZ (Last Line)
Page2: ZZZZZ (Line 1)
.........
CCCC (Last Line)
We have tried various printers but problem still persist.The problem is erratic & comes in 1-2 pages if report 5-6 page long.
Waiting for your reply.
i want to call .rpt file from net that is on web page ,
is it possible if yes tell me how to do this
Regards
AbhiDesh
For Testing,
Create new crystal report file,
Add memo field only,
Set memo max to 10 lines.
Test the report file with printers, feedback to me
Babu
MailID: [email protected]
My problem comes when report is of multiple pages & while the first line of next page gets printed on previous page also.
Regards
Hi there - and congratulations on this thread - it's a credit to you.
If you could help me with this I'd appreciate it.
I'm attempting to pass two date parameter values to a report -more specifically, to each of three subreports over the url line.
I've tried prompt0=date(2001,11,01)&prompt1=D...etc
I've tried prompt0@subreport1=Date(2001,11,1)&prompt1@subreport1=Date(2001,11,30)&prompt..etc
I have the parameter fields unsuppressed and they are simply not picking up any values at all.
Do you have any relevant wisdom to share.
thanks man,
Surrendermonkey
Colon-Hyphen-Close-Bracket
I need to printing one repport with many columns that don't fit in landscape orientantion, i need more than 1 page to print the report, how could i do to printing in multiple pages??? this is in VB6 and the crystal reports that comes with in, version 4.6.1 think so..... thanks
I was just wondering how to I pass a VB variable to crystal report ?? thanks.
HTH
cksiow
http://vblib.virtualave.net - share our codes
Hi..
How can reduce time to dispaly a crystal report
I mean to saycan U explainbest possible ways toreduce time .I know it depends on
no of records UR where conditions in sql.and UR machine configuration etc.
but is there some other ways by which one can reduce time to display a report
Nagesh Patil
Hi,
I'm using CR7.0 with VB6.0 and I have problems with the installation program and the libraries I have to join. When I install my soft in a PC without CR, reports don't display. I've just achieved show them, but they aren't able to connect to data base. I think that some DLL's are missing, but I can't found them. I don't know which ones are the libraries that I need to install. Although there is a DLL that program requires but that DLL doesn't exist: 'pdssql.dll'
Please HEEEEELP!!!!
Thanks a lot.
KokoLiso --> [email protected]
i have find topics on RDC but i can't found much details.
Can u send me sample code for that to mail [email protected]
Thanks for your support.
Hi there!
I hope you might be able to help me
Here's the problem:
I have a form in Access,with a list box and a command button in it.
I putted a Crystal activeX, named Crystal1.
I can set the reportname variable equal to list boxes' value, so if the user selects a report and presses the command button, hecan see the specified report. My problem is that I want to use parameters, BUT I don't want user to opens the report's parameter field. I want set parameter values from a combo box in the form.
I would appreciate any help.
Thanks a lot
brutus
shiv kumar,
Can you send me a mail regarding, your previous crystal reports doubts, now i collecting overall general problem in crystal report for all programmers.
Thanks.
MailID: [email protected]
hi,
for example you want to print name = 'Raj'
' you should enter the single quote for string data type
cr.SelectionFormula = "{Employee.Name} = 'Raj'"
'you no need to enter single quote for numeric data type.
cr.SelectionFormula = "{Employee.RecNo} = 10001"
do your level best.
Babu
MailID: [email protected]
Hi,
I cannot see why i cannot see the report.
Private Sub Form_Load()
CRViewer1.EnableExportButton = True
Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
Set webSource = CreateObject("WebReportSource.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = "http://www.pay-ware.com/documents/Ut...tall-guide.pdf"
'webSource.URL = "file:///C:\Documents and Settings\ishaikh\Desktop\Report2.rpt"
webSource.PromptOnRefresh = False
'webSource.AddParameter "user0"
CRViewer1.ReportSource = webSource
CRViewer1.ViewReport
End Sub
Please rate the article if it is of any use to you. This encourages me to reply more and more and more.
Hello there.
I have a crystal report with several parameters. I want to pass a value to one of the paramters (or at least set the default value) but let the user enter the other parameters.
Any help will be appreciated.
hi,
create formulas names in crystal report design time.
eg. EmpName
EmpDesignation
vbcode:
cr.formulas(0) = "EmpName = 'Babu'"
cr.formulas(1) = "EmpDesignation = 'Programmer'"
if you had input variables use bellow code:
cr.formulas(0) = "EmpName = '" & svEmpname & "'"
K.Babu
Quote:
Originally posted by stealbreeze
Hello there.
I have a crystal report with several parameters. I want to pass a value to one of the paramters (or at least set the default value) but let the user enter the other parameters.
Any help will be appreciated.
do you solve the problem?
Hello,
Yes I was able to solve my problem. Thanks for your advice. I 'm sure to have more questions in the near future.
I have been using Crystal for a reporting tool for a few years. But I have just begun to incorporate it into VB programs.
Thanks
:cool:
Is there any way to read the Item Values from the same section where i click.
Basically, I have a report which is grouped by a field in the recordset. I show also show a link which is an on demand subreport. Now when the user clicks on the subreport link i need to identify and read the Items in that section where he clicked as i need to do some processing for that item.
Any ideas would be of great help.
(Or any pointer to some good news groups about crystal reports can be better too.
PS: Codeguru guys, please don't get offended by this :), Its 'coz of my urgency. )
Thanks,
kiran.
hi,
When user click the link, change the link font color.
after color changes, you can identify the link previously read or not read refer by color, then do process what you need.
K.Babu
Thanks for your reply...
No.., the processing i was talking about is read the data in the section.
This is like i have some data displayed on the report that is group by a field and has a subreport link, something like 'Details' link. Now i have to send the data to the subreport so that i can display the details. I can use subreport links options.. to link the data in the main report to and display the subreport, but this doesn't work for me. The only option for me is to identify the record on which he is intrested in. So is there any way to read that data.
Eg: Record will be like this
Cust Name: somename
Age: xx
View Details
I need to show details for the cust name, i can't link custname from the main report to subreport, my reqirement doesn't permit that. Now when user clicks subreport i need to identify the cust name he is intrested in. If i can get that..... my problem is solved.
I have been trying to get that.. and iam successful in getting custname in the first page using the 'index' parameter in DrillOnSubreport event. But from the second page the 'index' start from 1 again.
so any ideas...
Thanks once again..
kiran.
Hi Babu,
You indeed are doing a great job. :) Please help me solve this problem.
I am using Crystal report 6.0. I have a master table (Employee Master) and several detail tables (EmployeeEducationDetails, EmployeeQualificationDetail, EmployeeTrainingDetail etc). Now I want to prepare a report where I pass the Employee ID as parameter and the report should display, in a Resume format, all Employee Details.
Problem is : there is only one detail section on the report so how would I display data from all the different Detail tables (there are 4 such detail tables). I tried grouyping the data (By qualification etc) but that did not help. Will I have to use Sub-reports?
K.Babu,Quote:
Originally posted by K.Babu
hi,
create formulas names in crystal report design time.
eg. EmpName
EmpDesignation
vbcode:
cr.formulas(0) = "EmpName = 'Babu'"
cr.formulas(1) = "EmpDesignation = 'Programmer'"
if you had input variables use bellow code:
cr.formulas(0) = "EmpName = '" & svEmpname & "'"
K.Babu
Your solution (using 'formula' fields) works for passing values to show in the crystal report. How do I pass values to represent the 'parameter' fields that the report is using in the selection criteria?
I have a crystal report with 'parameter' fields for the date range that the report is using in the selection criteria. I want to bypass the default form for using input of the parameters, and use a custom form for the user to pass 'parameter' values to the report to be run.
Any suggestions?
Thanks,
SB
cr_Report.Database.SetDataSource rs_Report
Using that line returns the entire contents of the query table instead of
the items in the query.
If I assign the recordset to an array the array contains ONLY the items I
requested but when I assign the same recordset to the crystal report it contains
ALL the items in the table.
Any help would be greatly appreciated.
Thanks,
Mike
try giving some stars here....;)
Hi,
I have a more CR rquestion not really relating to VB.
Do you know what the maximum number of detail sections/sub-sections we are allowed in a report?
I heard something about 622 sections... but not sure.
TIA
Cheers,
Laurent
Hi,
In VB, how do you specify the datasource for a subreport in Crystal?
For example, I use the following code to specify the datasource for the Crystal report:
CrystalReport1.DataFiles(0) = strDataBaseName
I need to specify the datasource (same database) for the subreport within this same Crystal report.
Any help will be appreciated.
Regards,
SB
hi,
Try this.
CrystalReport1.DataFiles(0) = strDataBaseName
CrystalReport1.DataFiles(1) = strDataBaseNameNext
Babu
Hi,
I tried your code:
CrystalReport1.DataFiles(0) = gDataBaseName
CrystalReport1.DataFiles(1) = gDataBaseName 'It is the same DB as the Main Report
I get the following error:
---------------------------
Seagate Crystal Reports: Database Error
---------------------------
Error opening file.
File could not be found: "TransLog", at file location: "TransLog"
---------------------------
OK
---------------------------
"TransLog" is the name of the table in the DB that the Subreport is using.
Any other suggestions?
Thanks
SB