Click to See Complete Forum and Search --> : Crystal Report


Pages : 1 2 [3]

alexr123
December 5th, 2003, 04:00 AM
Hello !
i want to ask a question.
can i use crystal reports instead of a listview control in order to
display results in the same manner like the listview?
moreover i want that when i click on a columnheader that the
records are ordered according to this column.
so i want a columnheader_click event or something like that.


is there a tutorial for doing all this stuff ?

thanks !

modream
December 5th, 2003, 07:19 AM
I use CR with Visual C++ 6.0 and I don't use CR Active X viewer because it does not export correct the reports.
Instead, I access the reports preview using "cpeaut32.h" (ICRApplication, ICRReport, ICRView etc.).
I need to pass some parameters at runtime to the report, but I couldn't find a way. There is a an interface ICRParameterFieldDefinition but i couldn't figure how to use it.
It would be very helpful an advice or example about how can I can do this.

murali_jidige
December 9th, 2003, 08:36 AM
Hello Dear Babu,
Nice to meet you through this forum. I am developing some Crystal Reports in Version 8.
These are not ordinary reports where we can connect to one database from report and so on...

My problem is i have many databases, in them more than one table in each database.
R:\\2000\WM5.mdb
R:\\2001\WM5.mdb
R:\\2002\WM5.mdb and so on for each year.
I have one database of each type for every year in R drive. and i designed my reports accordiing to Client.
Now from VB 6.0 front end interface i have to select Year(2002,2003 etc) , DatabaseName and product number etc. When i click display report it has to search in the particular MDB i selected and should display corresponding data of the record(given product number).
Simply this is a Dynamic report generation.
PLease help me in doing this.
I have designed reports and GUI also.
Now i need code from which i can generate reports according to the user selection of Year, database, table name and product number.
NOTE: the database has same structure for all years.
The tables has same no.of fields and names of the fields are also same...

Thanks in advance.
Preetham

endrue
December 10th, 2003, 02:40 AM
Hi, I Really need help with this unsolved problem, the problem is actually come when i try to send parameter value from ASP page to crystal report with stored procedure parameter...
In this link i have the unsolved problem for passing parameter with uniqueidentifier value .....

http://www.codeguru.com/forum/showthread.php?s=&threadid=274834

I hope u will be patient with my problem to read a while on the link above,thx a lot

rajbir
December 10th, 2003, 05:02 AM
hi,
i keep getting an unknown query engine error each time add a java bean as a data source, i looked it up on the crystal decisions forum and followed their tips to resolve the issue , i am still unable to do it.
Any help would be useful.

I also have another question, if i have a report generating a chart from an oracle table. I have displayed it using a jsp, but i need it to be refreshed each time the data in the tables changes. which i am unable to do.

thanks and regards,
Rajbir

pablohl
December 10th, 2003, 08:15 AM
I want to insert pictures into my report, this pictures are stored a sqlserver 2000 database in an image type field and i am working in Cristal Reports for Visual Studio .Net. I need a report with a table, where in each row i must insert the picture of each employee of my company.

How can i do that???

Please help me and thank you very much.

mr_chipo
December 10th, 2003, 02:07 PM
Hi!

I have some problems with a crystal report that has two subreports.

Problem is that for some reason I do not get anything on the subreports. It would be ok if there is not information matching with the parent, but there really is information that matches with the parent detail.

If I remove the link between the parent and the subreport, I get the whole list. So, for some reason filtering is not working properly. Main report and 2 subreports are based on ttx files. The field I am using to link subreports with the parent is a uniqueidentifier type. Does anybody has a clue about this?

I made a test creating new reports but instead of using ttx files I am using the stored procedures directly and they are working fine. The problem here is the architecture of the app was designed to use ttx files and they are fed at run time with the recordsets coming from the sp's I am using on the test.

I will really appreciate your help because I have spent too much time on this. Thanks.

Manuel

anandrege
December 11th, 2003, 03:36 AM
hi,

Can any one help me in getting the euro symbol in crystal report which can be exported into MS Excel while scheduling the report.
I can see the symbol in crystal output, but not in excel file.

Please help!!

Thanks
Anand

harmonycitra
December 12th, 2003, 05:14 PM
Hi shaikh_intekhab


I got something regarding your questions. Attached one zip file. This will be help ful to you.

endrue
December 13th, 2003, 09:39 PM
I've read about that sample that you gave to me, about SAmple to make report over the web, but the problem is i can't pass the parameter value.....not how to preview it....maybe u can't read the problem carefully...cause i feel my problem is weird.....and i get mad of this problem,coz ake me stuck on this too long for my project...thx anyway

K.Babu
December 17th, 2003, 10:56 PM
Hi,

Find out the ASP Sample Code attachment, I hope this sample will solve your problem.

yours friendly,
K.Babu

Originally posted by endrue
I've read about that sample that you gave to me, about SAmple to make report over the web, but the problem is i can't pass the parameter value.....not how to preview it....maybe u can't read the problem carefully...cause i feel my problem is weird.....and i get mad of this problem,coz ake me stuck on this too long for my project...thx anyway

Kudlaguy
December 18th, 2003, 01:07 AM
Hi
I am preparing a sales report grouped by month and year

The data is something like this

Name1 MonthYear Year Date Sales
X1 200203 2002 date1 200
X1 200203 2002 date2 300
X1 200204 2002 date 400

I have grouped by MonthYear and then Month
The report format should be like this
Name Date Sales
x1 date1 200
date2 300
200203 500
date 400
200204 400
2002 900
I have done supress column if duplicated for name1.
The problem is that the name is not supressed for outer group.
The report that I have now is something like this
Name1 Date Sales
X1 date1 200
date2 300
200203 500
x1 date 400
My issue is that I dont want X1 to be repeated for the next month year group.
Please help...

Thanx for reading through...


I am using crystal reports 9.

Rgds
Kudla guy

snehal G
December 18th, 2003, 04:00 AM
hi
i am preparing a report which contains values -1 and 0
if value is -1 it is to be replaced by string pp
else it should be blank. the field name is papercode. how can i do this?
thanks

K.Babu
December 18th, 2003, 05:35 AM
Hi,

Insert Formula field in the Crystal Report,

inside that formula validate the papercode

eg. if papercode = -1 then "pp" else ""

Yours Friendly,
K.Babu


Originally posted by snehal G
hi
i am preparing a report which contains values -1 and 0
if value is -1 it is to be replaced by string pp
else it should be blank. the field name is papercode. how can i do this?
thanks

K.Babu
December 18th, 2003, 05:46 AM
Hi,

Group by name1, Year, Month.

So that it will come once in the name1 group.

Yours Friendly,
K.Babu


Originally posted by Kudlaguy
Hi
I am preparing a sales report grouped by month and year

The data is something like this

Name1 MonthYear Year Date Sales
X1 200203 2002 date1 200
X1 200203 2002 date2 300
X1 200204 2002 date 400

I have grouped by MonthYear and then Month
The report format should be like this
Name Date Sales
x1 date1 200
date2 300
200203 500
date 400
200204 400
2002 900
I have done supress column if duplicated for name1.
The problem is that the name is not supressed for outer group.
The report that I have now is something like this
Name1 Date Sales
X1 date1 200
date2 300
200203 500
x1 date 400
My issue is that I dont want X1 to be repeated for the next month year group.
Please help...

Thanx for reading through...


I am using crystal reports 9.

Rgds
Kudla guy

middenaveen
December 19th, 2003, 04:56 PM
hi,

How can I create a crystal report of a rtf file.

Any ideas or suggestions is appriciated

thanks,
bye,

Kudlaguy
December 22nd, 2003, 08:30 AM
//
Hi,

Group by name1, Year, Month.

So that it will come once in the name1 group.

Yours Friendly,
K.Babu




quote:
--------------------------------------------------------------------------------
Originally posted by Kudlaguy
Hi
I am preparing a sales report grouped by month and year

The data is something like this

Name1 MonthYear Year Date Sales
X1 200203 2002 date1 200
X1 200203 2002 date2 300
X1 200204 2002 date 400

I have grouped by MonthYear and then Month
The report format should be like this
Name Date Sales
x1 date1 200
date2 300
200203 500
date 400
200204 400
2002 900
I have done supress column if duplicated for name1.
The problem is that the name is not supressed for outer group.
The report that I have now is something like this
Name1 Date Sales
X1 date1 200
date2 300
200203 500
x1 date 400
My issue is that I dont want X1 to be repeated for the next month year group.
Please help...

Thanx for reading through...


I am using crystal reports 9.

Rgds
Kudla guy
--------------------------------------------------------------------------------


But the problem is that if I do so, the Name comes in a different section something like this

Name Date Sales
X1
Date1 100
Date2 200

I want X1 to be on the same line as Date1 and 100..

Please help
Rgds
Kudlaguy

prog nirvana
December 31st, 2003, 10:46 AM
I am using crystal 8.5 with VB front end.
i am using VB GUI for devlopment not
crystal. ADO recordsets are retriving data
for the reports. then retrived data is added
to report using following syntax
Set fld = m_Report.Section3.AddFieldObject
("{ado." & valarr(0) & "}", 400, 0)
i am using Crystal Report Viewer to
view/execute report
Now Problem is,
when report is run for first time it
produces expected results but if its re-
runned/re-executed new data overlaps older
data.
in short, i want report to refresh and
delete old data when new execution takes
place.
Any input will be deeply appreciated

-Rohan :)

GavD
January 2nd, 2004, 04:05 AM
Hi,

I have written a series of crystal reports, connecting via a UDL file pointing at an OLEDB provider. Now the reports have passed testing, I have changed the UDL, but the reports don't seem to care... they still reference the original Data Source and Catalogue (it’s as if crystal hard codes the connection parameters into the report rather than referencing the UDL each time:rolleyes: )

I have tried to change the data source location within crystal, but when I point the report at the new connection I get the error message "Some tables could not be replaced, as no match was found in the data source. Please specify the table required for any unmodified tables"

The reason that the report can’t find tables is that the connections are added as commands within the Add Command function.(example below)

PEARL Custom Reports.subPEARLSR19_1 "Legal Entity={?Legal Entity}" "Vehicle={?Vehicle}" "GLDate={?GLDate}"

This allows us to reference the OLEDB provider and pass parameters back from crystal to the OLEDB provider.

Has anyone come across this problem and/or know of how to resolve this issue.

Thanks

GavD:confused:

samehme
January 4th, 2004, 06:55 AM
Hello,

I have a report in CR8.5 and a subreport that goes into the first report. Is there a way that I can access the subreport fields from within the main report to be used in calculations, using either Formula editor or directly from within VB6.

Regards,

Samehme

bobbytom
January 5th, 2004, 07:26 AM
Dear Mr. Babu / friends

i want to take my reports (from crystal report with vb, Access) very speedly like Foxprow reports (Dos version). what are the precautions i have to take while designing in crystal report. i am using dot matrix printer also. what about font, size that help fast printing.

thks
bobby

bobbytom
January 5th, 2004, 07:33 AM
Dear Mr.babu/friends

my crystal report is working 100% perfectly. But if i alter my underlying table (change the datatype or width) , the report is not working properly. so what setting i have to make while designing the report.

Bobby

jeffvb
January 7th, 2004, 10:56 AM
Hi Mr Babu or other Crystal developers,
I am prompting for a parameter from a pick list on an ASP page using Crystal 9. I create the parameter pick list in Crystal via the "Set default values" > "Import pick list" tool. In the Crystal development environment itself, my pick list contains 300+ items. In my ASP page, on the report viewer parameter entry page, the pick list only contains about 38 of the items. Any ideas??

Thanks very much. Greatly appreciated!

:)

supi_1976
January 9th, 2004, 04:07 AM
Hi Mr. K Babu

1. I'm building the reports using crystal report included in MS VS .Net (ASP.net).
2. On runtime, to display report, I am using CrystalReportViewer by passing selection formula.
4. This works fine, It can only navigate to page 2, after that, clicking on the next button return the same page (page 2) over and over again.
5. Clicking the 'last page' button will bring you to the last page of the reports.
6. In short, the report can only be viewed on page 1,2, and the last page


Please help me...

Thanks in advance.

hitman67
January 12th, 2004, 03:15 AM
Hello everyone,

I'm using a blob field in a crystal report (v 8.5) to display an image stored in an access 2000 database (embedded bitmap in an ole field). This image was created by visual basic via picture box. Access shows this data as "binary-long data".

Crystal reports 8.5 shows this data correctly as an image.

But recently I had to update to crystal report 9 and now the image is blank!!

Does anybody know what the problem is?

(when I store an bitmap file via copy&paste in the access field, cr9 shows the image correct)

How can I store the bitmap via vb in the access database in a way that access shows it as "bitmap" data?

endrue
January 13th, 2004, 07:41 PM
Hi , I have a problem with crystal report. This time i have a problem when i pass a parameter with uniqueidentifier value into report with stored procedure, so if I don't use "Execute" command in my stored procedure to run my sql query it runs correctly, and i have trace the problem that if i use a variable into my exec command with uniqueidentifier value, but if i just put the uniqueidentifier with hard coded...it works.....and if try it on sql query analyser it works fine too
I really confused of this.....so everytime i preview the report always show error message"Error query engine on server : cannot converting char to uniqeidentifier
I hope someone can Help me.....thx....

harmonycitra
January 15th, 2004, 10:56 AM
Crystal Reports
Hi everybody,

I'd developed an application using VB6 and Crystal Reports 9 in Windows XP Pro. Everything works fine.

The problem is I need to make it as EXE and to run the program in Windows 2000 which is not havin VB or Crystal Reports. I manually copied all the exe, dll, ocx files including

craxdrt.dll
crystalviewer9.dll

But while trying to open the report it raises "Active X can't create object"

The code is

Set Report = Appl.OpenReport("path")

Report is craxdrt.Report
Appl is craxdrt.Application

Have any idea regarding this? please help me. I struck up with this. Can't move

To run this, Do I need to install the Crystal Reports 9 in Destination machine. Is it necessary?

Thanks in advance

malleyo
January 15th, 2004, 02:46 PM
Using:
VB 6
Crystal Reports 8.5 Developer Edition
Installshield 7.0
Windows 2000 Professional for both the Developer computer and the client computer


My program consists of a ServerAPI and a Client. The user chooses the type of report and sets the necessary criteria. The client passes the info to the server, who does a query against the database and passes the requested info back to the client in the form of a string. The client parses the strings and loads the data into an array. The array is then passed to the report via CDO.

This process works beutifully on my own computer (which has VB6 and CR 8.5 installed). When I run the Installshield setup on the client machine, everything installs fine. But when I run the program and try to bring up a report, I get "Error: -2147024770 - Automation Error, The specified module could not be found."

In my setup, I included:

Crystal_Database_Access2003.msm (which includes cdo32.dll and crpe32.dll)
cpeaut32.dll
p2smon.dll


Here's the code I use in my program:



Private m_crApplication As CRPEAuto.Application
Private m_crDatabase As CRPEAuto.Database
Private m_crTables As CRPEAuto.DatabaseTables
Private m_crTable As CRPEAuto.DatabaseTable
Private m_crView As CRPEAuto.View
Private WithEvents m_crReport As CRPEAuto.Report

If FindReport = True Then
Screen.MousePointer = vbHourglass
UpdateStatus "Generating Report, Please Wait..."

Dim clsPrtSel As New CSelectPrinter

m_cdoRowset.AddRows m_varRowsArray

'According to my debug info, it breaks on this line
Set m_crApplication = New CRPEAuto.Application


Set m_crReport = m_crApplication.OpenReport(m_strCRReportPath & "\" & m_strReportName)
Set m_crDatabase = m_crReport.Database
Set m_crTables = m_crDatabase.Tables
Set m_crTable = m_crTables.Item(1)

Call m_crTable.SetPrivateData(3, m_cdoRowset)


If blnPreview = True Then
Debug.Print "PreviewData"
Set m_crView = m_crReport.Preview
m_crView.ZoomPreviewWindow 100
Else
Debug.Print "PrintData"
m_crReport.SelectPrinter clsPrtSel.SelectedPrinter.DriverName, _
clsPrtSel.SelectedPrinter.DeviceName, _
clsPrtSel.SelectedPrinter.Port
m_crReport.PrintOut False, clsPrtSel.SelectedPrinter.Copies
End If


End If




Am I missing a dll, or a dependency for one of the dll's? In my research, it seems that that the only dll's I needed were Cdo32.dll, crpe32.dll, cpeaut32.dll, and p2smon.dll (along with all their dependencies).

Any information you have that might help me, or any website you could point me to, would be greatly appreciated. I've been working on this almost nonstop for the past 2 days and have come up empty handed. I've done online searches on every keyword that I can think of.

Thanks in advance!

Fiona

harmonycitra
January 21st, 2004, 08:40 PM
Hi,

I want to refer a sub report field in my main report. Is there any way to do this. Using CR9

cterburg
January 26th, 2004, 02:40 AM
Hello,

I'm working with Crystal Reports 8.5 and we're using a webbrowser to view the reports. Each report is scheduled to run once every day (using a recurrence), That works fine. However, the users also have to option [Run Now], to generate a new instance of the report. That works fine as well, however it also generates a recurrence. This means that if you click [Run Now] 5 times, it generates not only 5 instances, but also 5 recurrences. We don't want that. Is there a solution to that problem?

Thanks.

asp_worker
January 29th, 2004, 03:17 PM
Mr. Guru,

I created a CR report , and I tried to open it with ASP, code is like
following:

---------------------------------------------------
<%
Dim objReportApp
Dim objReport

set objReportApp = Server.CreateObject("crystalruntime.Application")
set objReport = objReportApp.OpenReport("c:/reports/ClientInformation.rpt")

%>
---------------------------------------------------------
and I got these error:

--------------------------------
Seagate Crystal Reports ActiveX Designer error '80043ac6'

Access denied.

/reporttest/test1.asp, line 8


How to slove it?

Thanks.

K.Babu
February 4th, 2004, 05:19 AM
Hi,

Make sure you have Read/Write access for your logon user in server machine.


Originally posted by asp_worker
Mr. Guru,

I created a CR report , and I tried to open it with ASP, code is like
following:

---------------------------------------------------
<%
Dim objReportApp
Dim objReport

set objReportApp = Server.CreateObject("crystalruntime.Application")
set objReport = objReportApp.OpenReport("c:/reports/ClientInformation.rpt")

%>
---------------------------------------------------------
and I got these error:

--------------------------------
Seagate Crystal Reports ActiveX Designer error '80043ac6'

Access denied.

/reporttest/test1.asp, line 8


How to slove it?

Thanks.

K.Babu
February 4th, 2004, 05:51 AM
Hi,

Try this, store the date to logfile in client machine, validate the logfile before starting the recurrence instance.

Originally posted by cterburg
Hello,

I'm working with Crystal Reports 8.5 and we're using a webbrowser to view the reports. Each report is scheduled to run once every day (using a recurrence), That works fine. However, the users also have to option [Run Now], to generate a new instance of the report. That works fine as well, however it also generates a recurrence. This means that if you click [Run Now] 5 times, it generates not only 5 instances, but also 5 recurrences. We don't want that. Is there a solution to that problem?

Thanks.

K.Babu
February 4th, 2004, 06:05 AM
Hi,

This code works through the RDC object model to identify a subreport object in the main report


Dim crSecs As CRAXDRT.Sections
Dim crSec As CRAXDRT.Section
Dim crRepObjs As CRAXDRT.ReportObjects
Dim crSubRepObj As CRAXDRT.SubreportObject
Dim crSubReport As CRAXDRT.Report
Dim i As Integer

Set crSecs = CRReport.Sections
For i = 1 To crSecs.Count
Set crSec = crSecs.Item(i)
Set crRepObjs = crSec.ReportObjects
For X = 1 To crRepObjs.Count
If crRepObjs.Item(X).Kind = crSubreportObject Then

Set crSubReport = CRReport.OpenSubreport(crRepObjs.Item(X).SubreportName)

'the following code sets the subreport table to a different database
crSubReport.Database.Tables(1).Location = CommonDialog1.FileName
'set the value for a text object in the header of the subreport
CRReport.Subreport1_Text2.SetText "This is the subreport"

'within this loop you can set other properties of the subreport and
'the field objects and sections in it.


End If
Next
Next



Originally posted by harmonycitra
Hi,

I want to refer a sub report field in my main report. Is there any way to do this. Using CR9

StephanieHarris
February 9th, 2004, 11:18 AM
Dear Babu,

I am new at using Crystal Reports and I'm hoping you can help me with a problem. I'm using Crystal Reports 9 and I'm trying to create a cross-tab.

On the left hand side of my cross-tab (columns) I have duration in seconds. I have to break the duration down into sections like 1 - 30 seconds, 31 - 60 seconds, etc.

Everything works fine unless there is no data for a particular column, like 1 - 30 seconds. If there is no data for that duration I would like my report to still show that column with '0' in the summarized fields section. Instead, it does not even display the 1 - 30 seconds column.

What are my options for correcting this?

Thanks so much,

Stephanie

xqyz8888
February 10th, 2004, 04:44 AM
K.Babu have given a deploy file list,that's for crystal report 8,not 9,i accord it and success .but cr9 is terrible,
i copy craxdrt9.dll to other machine,then want to register it using regsvr32 craxdrt9.dll(i put it under winnt\system32),no echo,i can not see the registration successful dialog,i think it must need some others files.Do you know HOW TO REGISTER CRAXDRT9.DLL?
when using cr8 ,i can register it successful.

no error message ,when register like this:regsvr32 craxdrt9.dll,only cursor become cup icon,several seconds,then finished the registration .it is very weird.

Dear K.Babu,can you give me the file list of cr9 for deploment?(if it can let cr9 run ,that's ok),thanks a lot to K.Babu.

i have got the anwser:
register follow dll file first :
keycode.dll
ExportModeller.dll
crtslv.dll
crqe.dll
then register craxdrt9.dll

K.Babu
February 10th, 2004, 05:33 AM
Have you got any error message while registering CRAXDRT9.DLL with regsvr32.

Originally posted by xqyz8888
K.Babu have given a deploy file list,that's for crystal report 8,not 9,i accord it and success .but cr9 is terrible,
i copy craxdrt9.dll to other machine,then want to register it using regsvr32 craxdrt9.dll(i put it under winnt\system32),no echo,i can not see the registration successful dialog,i think it must need some others files.Do you know HOW TO REGISTER CRAXDRT9.DLL?
when using cr8 ,i can register it successful.

Trancedified
February 10th, 2004, 04:46 PM
Hi,

I have a table full of <Nulls> and at first my application loads correctly after I log into SQL Server via ODBC. However, when I close the CrystalReportViewer, the login window for SQL Server comes up again.

I tried closing and closing, but I still get the same window. Any solutions? It only does it to this table, all my other reports work fine w/ different tables. Any solutions?

I am using Crystal Reports with VB.NET

Chris

deepak_iyengar
February 11th, 2004, 10:31 PM
Hi Babu and everybody,

I have got these problem which I am trying to breadk from past 2 days. I have explaine the problem below :

I have report called main.rpt. I am displaying the details from the
database like total number of persons who have given their response as 'Yes', 'No' and 'No Response'. These is display for all the categorys. Totally I have 6 categorys.
So I will be displayed 6 sections (Categories like Stratagies, Communications,Personnel, Plans, Maintainence, Awareness) with total number of persons who have given their response as 'Yes', 'No' and 'No Response'. Now the link is provided for all these 'yes', 'No' and 'No Response'. I can provide the hyper link at the design time only for one in the details section. But how to achive at the run time for all the categories. So depending on the categories the sub report has to be opened.

Please help me out.

Regards,
Deepak.

Cimperiali
February 12th, 2004, 02:10 AM
Now your post is added as a "reply" to Crystal Report Thread.
To add questions to an already existing thread, you have to hit
the "post reply" button you can find at bottom right of the page.

deepak_iyengar
February 12th, 2004, 03:00 AM
Hi,

How to view the reply for my question posted. I got a mail that Cimperiali has replied for my question. I want to see the contents.

Regards,
Deepak.

shminhas
February 20th, 2004, 04:51 PM
Hi Mr. Babu & everyone

Please guide me proper that I want to generate a report with multi_tables.

Suppose I have 3 tables like tables whose names are Men, Women,Childs. There three tables data should be listed in a report. When 1st table data is completed a parameter passed from Vb should be printed and so on.

Attachment file is here for more clear.

How can I do at runtime from VB

Thanx in Advance

DjChris14
February 21st, 2004, 02:00 AM
Sir Babu,

Im just new in using Crystal Reports.... would u give me a snippet of code in accessing the Report Designer Component (RDC). My main platform is VC but i understand VB... my real problem is the query attach to the report (that can be seen in Show SQL).
sample:
select own_ln, own_fn
from
db2inst1.own_names own_names

<db2inst1 is the owner of the table and also owner of the database, we were just given a schema access to use the database and tables as well>

when i run the program <my UserID is ProgI>, a message box saying "ProgI.own_names" is undefined name.... what seems to be the problem? hope u can give me samples that may modify the setting of the report file at runtime or dynamically.

By the way, im using DB2 as backend

thanks....

stephenex
February 24th, 2004, 05:03 AM
I post the error codes first.

Imports CrystalDecisions.CrystalReports.Engine
'Namespace or type 'Engine' for the Imports 'CrystalDecisions.CrystalReports.Engine' cannot be found.

Imports CrystalDecisions.Shared
'Namespace or type 'Shared' for the Imports 'Imports CrystalDecisions.Shared' cannot be found.

Imports CrystalDecisions.Web.Design
'Namespace or type 'Design' for the Imports 'CrystalDecisions.Web.Design' cannot be found.

Dim rpt As CrystalReport_item
'Type 'CrystalReport_item' is not defined.

rpt = New CrystalReport_item()
'Type 'CrystalReport_item' is not defined.



I have VB.NET Standard Version 2002. Then I bought Crystal Reports Version 9 in order to print reports. (Note that I don't have Visual Studio.NET, so this is not the embeded Crystal Reports in Visual Studio.NET)
First, I install the VB.NET. Second, I install the Crystal Reports. (I just select normal installation, not customize intallation)
After installation, I create and save a Crystal Reports called "CrystalReport_item" using the Crystal Reports software.
I move the "CrystalReport_item.rpt" to the folder of my solution.
Then at the VB.NET software, I click "Project->Add Existing Item...". Then I click the "CrystalReport_item.rpt" and click "Open" in order to add it to the solution.
Then I type the code
"Dim rpt As CrystalReport_item"
in a new form's button1.click.
However, there is a line under the "CrystalReport_item" and there is a yellow box telling that "Type 'CrystalReport_item' is not defined.".
Firstly, I think that I forget to import libraries, then I type the code
"Imports CrystalDecisions.CrystalReports.Engine".
However, there is a line under the "CrystalDecisions.CrystalReports.Engine" and there is a yellow box telling that "Namespace or type 'Engine' for the Imports 'CrystalDecisions.CrystalReports.Engine' cannot be found.".
Can you please tell me what I need to do in order to add the report to my solution and let it print the report?
Please tell me more detailly as I am just a beginner of VB.NET and Crystal Reports 9. Thanks a lot.

stephenex
February 24th, 2004, 05:05 AM
Sorry, forget to say hi first.
Hi, everybody.
Hope that Mr. K.Babu and other people can help me.
Thanks again.
^^

Andrea_Rossini
February 24th, 2004, 05:48 AM
I have a strange problem with a report in Crystal 8.0.

This report is used from a MFC application wich creates a temp table with a customized name to allow multiple user access.
So the reports works wonderfully on every kind of PC and every kind of printer settings. And also i have many applications reporting on temporary tables both in VB and VC++, and all these work perfectly.

But I have a single application doing a strange joke on a single PC and a single Printer.

When the user prints on the Epson4000 the printer defaults loading paper from the mail envelopes dish instead of the "A4" paper dish.

But this problem doesn't occour if the report is another one.

Note: all the rpt files I use got the same printer and page settings.

The code I use is:

m_Crystal1.Reset();
m_Crystal1.SetReportFileName(path);
m_Crystal1.SetSelectionFormula(Sel);
m_Crystal1.SetWindowTitle("Print");

m_Crystal1.SetFormulas(1, (LPCTSTR)("Title = " + Title));

m_Crystal1.SetWindowAllowDrillDown(TRUE);
m_Crystal1.SetWindowShowNavigationCtls(TRUE);
m_Crystal1.SetWindowShowCancelBtn(TRUE);
m_Crystal1.SetWindowShowPrintBtn(TRUE);
m_Crystal1.SetWindowShowExportBtn(TRUE);
m_Crystal1.SetWindowShowZoomCtl(TRUE);
m_Crystal1.SetWindowShowCloseBtn(TRUE);
m_Crystal1.SetWindowShowProgressCtls(TRUE);
m_Crystal1.SetWindowShowSearchBtn(TRUE);
m_Crystal1.SetWindowShowPrintSetupBtn(TRUE);
m_Crystal1.SetWindowShowRefreshBtn(TRUE);
m_Crystal1.SetWindowState(2);
m_Crystal1.SetConnect(pApp->m_StrConCrw);

// load up a ##temp table
m_Crystal1.SetSQLQuery(Temp);

m_Crystal1.SetDestination(0);

BeginWaitCursor();
m_Crystal1.PrintReport();
EndWaitCursor();

baluva
February 26th, 2004, 01:45 AM
Hi,
I am trying to create a radar chart. Now the radar chart I can draw lines on the sum of a column values. But my requirement is draw the lines depending on another column value. This should translate into multiple lines.

Any suggetions?

Dmorley
February 26th, 2004, 05:36 AM
I'm trying to change the currency format of a report at runtime, here is some of the code...



Private Sub SetReportFormat(crReport As CRPEAuto.Report)

Dim objSections As CRPEAuto.Sections
Dim objSection As CRPEAuto.Section
Dim objReportObjects As CRPEAuto.ReportObjects
Dim objTextBox As CRPEAuto.TextObject
Dim X As Integer

'// Get an object to represent each of the report sections
Set objSections = crReport.Sections

'// Begin loop for each section in the report
For Each objSection In objSections

'// Get an object to represent each of the objects in the report section
Set objReportObjects = objSection.ReportObjects

'// For each individual object in the report objects collection...
For X = 1 To objReportObjects.Count

'// If the object is a text box...
If objReportObjects.Item(X).Kind = crTextObject Then

'// Get an object-reference to the text box...
Set objTextBox = objReportObjects.Item(X)

'// If the text box is a currency field, then change the currency to
'// the new format
If objTextBox.Format = "Currency" Then
objTextBox.Format = GetCurrencyFormat
End If

'// Destroy this within loop...
Set objTextBox = Nothing

End If
Next
Next

'// Clean up
Set objTextBox = Nothing
Set objReportObjects = Nothing
Set objSections = Nothing

End Sub



However, I get a 'Feature Not Enabled' error on the following line...

objTextBox.Format = GetCurrencyFormat

{GetCurrencyFormat is just a function that returns a string - e.g; £#,##0.00;(£#,##0.00)}

Any ideas? I tried to manipulate other propeties of the object but they all generate the same error??

Thanks

GinkKA
February 26th, 2004, 06:45 PM
Hi,

I hope someone can help me with the following problem.

have a SQL-Server table which contains eight string fields with links to pictures which need to be shown on the report. These str255 fields can sound like "//blabla/pic/test1.jpg" and I really need to get them into the report without storing the pic in the database (we talk about 100 of Gigabytes of pictures).

Thx in advance,

Simon :)

endrue
February 26th, 2004, 09:24 PM
Hi K. Babu and Evryone,I have a problem to pass value to Stored Procedure parameter with crystal report RAS,this case happen when I use "Execute" command on my stored procedure that to control some parameter based on user input, but it shows an error when i Put the parameter in "Order By" clause....
The value for the parameter seems to be empty. this is my code :

Create Procedure RPT_PRint
@OrderBy varchar(50),
@SortOrder varchar(50)
as

exec(' Select
AbsenceCode,
AbsenceName
from Absence_T
order by '+@OrderBy+' '+@SortOrder)
Go

It comes weird, cause when i try to input the value on the crystal report designer it works fine, but when i pass the value from ASP page it won't show the report.....show error message " Syntax error near By"

pianme
March 2nd, 2004, 02:23 AM
hallo...K.Babu..

any idea how to solve my problem, descr as below;

I want to run a report ( Crystal Report 7.0) from my program
(code in VB 6.0).
But when I click a print button this error msg was appear ;
errMsg "Invalid report file name"

This are code of my program ;
Private Sub cmdPrint_Click()

On Error GoTo EmpPerDeterr
Cr.Action = 1

Cr.Reset
Cr.ReportTitle = "Catatan Aduan Pegawai MPSJ"
Cr.WindowState = crptMaximized
Cr.WindowTitle = "Catatan Aduan Pegawai MPSJ"
Cr.WindowShowGroupTree = True


Cr.Datafile(0) = App.Path & "\aswa.mdb"
Cr.ReportFileName = App.Path & "\Reports\Aduan.rpt"
Cr.Destination = crptToWindow
Cr.WindowShowRefreshBtn = True
Cr.WindowShowPrintBtn = True

Exit Sub

EmpPerDeterr:
MsgBox Err.Description, vbOKOnly, "OASYS"

End Sub

K.Babu
March 2nd, 2004, 06:42 AM
Hi,

action property should be at last line of all the cr.{properties}

cr.action = 1

yours friendly,
K.Babu

Originally posted by pianme
hallo...K.Babu..

any idea how to solve my problem, descr as below;

I want to run a report ( Crystal Report 7.0) from my program
(code in VB 6.0).
But when I click a print button this error msg was appear ;
errMsg "Invalid report file name"

This are code of my program ;
Private Sub cmdPrint_Click()

On Error GoTo EmpPerDeterr
Cr.Action = 1

Cr.Reset
Cr.ReportTitle = "Catatan Aduan Pegawai MPSJ"
Cr.WindowState = crptMaximized
Cr.WindowTitle = "Catatan Aduan Pegawai MPSJ"
Cr.WindowShowGroupTree = True


Cr.Datafile(0) = App.Path & "\aswa.mdb"
Cr.ReportFileName = App.Path & "\Reports\Aduan.rpt"
Cr.Destination = crptToWindow
Cr.WindowShowRefreshBtn = True
Cr.WindowShowPrintBtn = True

Exit Sub

EmpPerDeterr:
MsgBox Err.Description, vbOKOnly, "OASYS"

End Sub

Dmorley
March 2nd, 2004, 06:54 AM
Managed to solve my problem. Certain aspects of Crystal objects are not enabled, you can determine which ones they are by using the Crystal Object browser (CrystalExplorer.exe) located in your /sample/xtreme/browser directory.

You can change the currency format of the report at run-time by calling the SetLocaleInfo API just before the report is opened.



'// APIs
Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" _
(ByVal Locale As Long, _
ByVal LCType As Long, _
ByVal lpLCData As String, _
ByVal cchData As Long) As Long

Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" _
(ByVal Locale As Long, _
ByVal LCType As Long, _
ByVal lpLCData As String) As Long

Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long

Private Const LOCALE_SCURRENCY As Long = &H14


Private Function GetUserLocaleInfo(ByVal dwLocaleID As Long, _
ByVal dwLCType As Long) As String

On Error GoTo Fail

Dim sReturn As String
Dim nSize As Long

'// call the function passing the Locale type
'// variable to retrieve the required size of
'// the string buffer needed
nSize = GetLocaleInfo(dwLocaleID, _
dwLCType, _
sReturn, _
Len(sReturn))

'// if successful..
If nSize Then

sReturn = Space$(nSize)
nSize = GetLocaleInfo(dwLocaleID, _
dwLCType, _
sReturn, _
Len(sReturn))
If nSize Then
GetUserLocaleInfo = Left$(sReturn, _
nSize - 1)
End If

End If

Exit Function
Fail:

End Function

Private Sub ChangeCurrencyFormat(NewFormat As String)

Dim LCID As Long
Dim lResult As Long

'// Change the currency format in the LOCALE settings
LCID = GetSystemDefaultLCID()
lResult = SetLocaleInfo(LCID, _
LOCALE_SCURRENCY, _
NewFormat)

End Sub

Private Property Get LocaleCurrency() As String

On Error GoTo Fail

Dim LCID As Long
LCID = GetSystemDefaultLCID()
LocaleCurrency = GetUserLocaleInfo(LCID, LOCALE_SCURRENCY)

Exit Property
Fail:

End Property



So, you can query the current setting with the LocaleCurrency property, change to the required setting using ChangeCurrencyFormat with the desired format e.g. ChangeCurrencyFormat("£") or ChangeCurrencyFormat("€"), open your report, then change back to previous currency format.

Any fields in the report defined with 'Use System Default Format' will now pick up the correct currency from Locale!

aan_handoko
March 3rd, 2004, 02:45 AM
Hello K.babu and dear friends all around the world! Please help me to solve my problem. I want to format the rounding properties of a field number. For an example, I have this field [smallest_point] and another field number
[ Price ] and I set the rounding properties of field [Price] by this formula (Crystal Syntax) - in Customize number formatting menu :

IF {smallest_point} = 0.0001 THEN
0.0001
ELSE IF {smallest_point} = 0.01 THEN
0.01
ELSE IF {smallest_point} = 1 THEN
1

So why did the report send me this message : "Bad Formula Result" ?

I have to set the decimal number by the smallest_point. Let's say if the smallest point is 0.01, then the rounding must be 0.01 and decimal properties must be 1.00, if smallest point = 0.0001 then the rounding must be 0.0001 and decimal properties must be 1.0000.

How to solve this error ?

Please note that I've changed the Decimal Properties of the field to with this formula :

IF {smallest_point} = 0.0001 THEN
1.0000
ELSE IF {smallest_point} = 0.01 THEN
1.00
ELSE IF {smallest_point} = 1 THEN
1

THANKS TO ANYONE HELP ME! :wave:

Andrea_Rossini
March 3rd, 2004, 03:03 AM
:rolleyes:

Why don't they open a Crystal Report Forum?

It would be really very useful!!

Cimperiali
March 3rd, 2004, 08:17 AM
Why don't they open a Crystal Report Forum?

It would be really very useful!!


sounds good. Let me suggest it to Brad
:cool:

aan_handoko
March 5th, 2004, 09:50 PM
HELLO, IF ANYBODY READ THIS MESSAGE NOW, WOUL DYOU PLEASE ANSWER ME QUICKLY...

HOW TO PASS A SUMMARY FIELD IN SUBREPORT TO MAIN REPORT ? I NEED TO CALCULATE THE GRAND TOTAL OF SUMMARIZE FIELD IN SUB REPORT, AND SHOW IT TO MAIN REPORT!

PLEASE NOTE THAT THE RECORD HAVE EACH GROUP. FIRST I WANT TO TOTAL THE SUM OF DETAIL IN SUB REPORT OF EACH GROUP, AFTER THAT THE GRAND TOTAL....

THE SUM OF EACH GROUP AND THE GRAND TOTAL MUST BE ABLE TO BE VIEWED ON MAIN REPORT.....

IT'S EASY TO LINK FROM MAIN REPORT TO SUB REPORT, BUT TO THE OPPOSITE....HOW TO PASS IT FROM SUB REPORT TO MAIN REPORT, IN CRYSTAL, NOT FROM VB... THANKS IN ADVANCE

ralphtg
March 10th, 2004, 12:18 PM
i am having a problem with a crystal report that at one point would run and now is giving me an error
odbc error:canada][pvx odbc driver][fileio] table is not accesible
after you hit ok on that
the second error is
error detected by database dll
what i am trying to run is a crystal report from a mas90 database with an access table. if anyone can shed some light it would be greatly appreciated.
thanks ralph

hahsia
March 11th, 2004, 04:25 AM
Hi All,

This is my 1st time on this forum page.
I really hope K.Babu or somebody could help me with crosstab reports.

I've completed creating my crosstab reports but the only problem is how do i create column labels for my crosstab report.
My report looks like this

Job1 Job2 Job3 Total
1 Anne 8 4 2 14
240.00 120.00 60.00 420.00
2 Joe 2 2 2 6
60.00 60.00 60.00 180.00

How do i create a label for 1 & Anne as "Emp No" & "Name".
The total field is a summarized field so the word total is automatically generated, so how do i change it to "Total Hr & Total S$"

I'm really looking forward to suggestion and help from anybody here.
Thanks in advance.

koo9
March 11th, 2004, 10:19 AM
this single topic here is 1000 times better than the CrystalDecisions *support* forum . :D

mzainal
March 16th, 2004, 02:59 AM
Hi,

After deploying a VB.NET windows project with a CrystalReportViewer on the client's machine I'm getting the following error:

"Cannot Find keycodev2.dll, or invalid keycode"

Any help will be appreciated,

thanks.
mzainal

koo9
March 16th, 2004, 09:32 AM
Originally posted by mzainal
Hi,

After deploying a VB.NET windows project with a CrystalReportViewer on the client's machine I'm getting the following error:

"Cannot Find keycodev2.dll, or invalid keycode"

Any help will be appreciated,

thanks.
mzainal

take a look at this solution. I have the same problem as you, but it's your lucky day, I spend half a day to get it working after hunting for solution in the crystaldecisions support site.

http://support.businessobjects.com/library/kbase/articles/c2010681.asp

creer
March 19th, 2004, 04:55 AM
Hi,
I've a stupid question:
How insert to string formula a NEW LINE?

I tested Basic's

"something" & vbCrLf & "something"

C's backslash+n and I loooooooking foooor... and nothing...

Specification:
I've UnboundString field, where i need insert to EditFormula this:

If {myTable.col1}="" then
{myTable.col2}
else
{myTable.col2} + (damned new line) + {myTable.col1}
...

Thanks
Dusan

ramesh_cr
March 19th, 2004, 02:13 PM
Hi,
Is there any way to export .rpt files as text files. I am using crystal reports 9.0 and .Net framework..
I want to export them dynamically in the code.
I could able to export to pdf,doc and html..But not to text.

Thanks,
Ramesh

malleyo
March 19th, 2004, 03:23 PM
ramesh_cr:

You should post your questions in the main Crystal Reports forum instead of in this huge thread (the forum was created because of it). It's easier for someone to find your question and help you if they don't have to look through 500+ posts. It also makes it easier to find the answer to your question before you post.

That said, here's my best shot at an answer for you:

In CR 8.5, each export type has it's own dll that needs to be deployed with the program. From my experience, just putting that dll in the correct location will populate the Export box on the report. In order to see the export box on the report, use the following line in your VB app:

crReport.PrintWindowOptions.HasExportButton = True

I'm not sure if CR 9 is the same, but it's a start. CR 8.5 includes a file called runtime.hlp that lists all the files you need to deploy your app. You can also search on Crystals website (http://support.businessobjects.com/search/advsearch.asp) or on another search engine such as www.google.com.

Hope that helps!

keylen
March 22nd, 2004, 06:41 AM
Using multiple tables and 1 group
Hi everyone.....

I am using Crystal reports embedded in VS .NET but I am actually having problems with my principal report

I´ve 2 DB, one DB is MySQL and the another is Access.

I have a table in my access database called "TblSpot", this table contains spot info (its columns are spotName, productName,ClientName, spotURL, spotVersion,spotDurationn) actually this table contains only 17 data rows.

I have a table in MySQL database called "TblSpotReproduction", it contains spot reproduction info (its columns are spotName. playerName, reproductionTime) also it has 150000 data rows.

I tried to make a report grouped by SpotName with only TblSpotReproduction:

SpotName <------ Init Group Header
---------------------------------------------
playerName reproduction Time
---------------------------------------------------
<---------End Group Header

ALL DATA
..
.
.
.
.

----------------------------
Group Foot

Next group etc etc etc


This report works perfectly. It shows the solution delayed but it works perfectly.

But my client ask me to make a better report that include spot information. For that i´d to include the Access database. My new report must be like this:

SpotName <------ Init Group Header
spotURL
spotVersion
Client
Product
spotDuration
---------------------------------------------
playerName reproduction Time
---------------------------------------------------
<---------End Group Header

ALL DATA
..
.
.
.
.

----------------------------
Group Foot

Next group etc etc etc

My problem is that this reports never open, i think that the combination of 2 databases causes CR crash, maybe the combination between 150000 rows with 17 rows make a impossible JOIN. Friends told me I have to use sub-reports but i have no idea how to use them on the fly. :confused:

P.D. Sorry for my really bad english.


Thanks for advance-----

Keylen

keylen
March 22nd, 2004, 07:14 AM
Thanks i got the solution, i change the link in Visual Link Assistant

Ba bye people

creer
March 22nd, 2004, 07:26 AM
Stupid question, stupid answer... :-)

chr(10), obviously...

rioleti
March 22nd, 2004, 08:31 AM
Hi Babu,

i have a question about a runtime error that appears with the activeXviewer when i want to run a report through the browser.

My Report has a subreport on it. The Report has an SQL-Stament as a datasource. The statement has a paremater-value in its where clause. Before running the report i set the value of the parameter-field depending on the selections i made. These selection are like filters.

Now when i make some specific combinations of selections the following error occurs:

Error occured on Server. -2147482963:
Error in File c:\winnt\temp\{2824C0F2-A23B-4BA7-9239-D75C53D838A}.rpt
The request could not be submitted for background processing.

With some other combinations of selection the report works fine. I tested the database and the complet sql-statements but they were all ok. I have no idea anymore how i can solve the problem. Have you got an idea?

curio11
March 23rd, 2004, 08:00 AM
hi babu

pls pls help me......

where to write the code lines given by you to run crystal reports using a password protected database.

i am using a database which is password protected. i am creating a DSN for Crystal Reports. If i do not give password while creating DSN, it asks for it while running the reports.

can u help me in any way.... waiting anxiously for ur reply
bye

salmaan
March 24th, 2004, 10:04 AM
Hi curio11,

I am not sure as to what platform you are working on. I am using VS.Net 2003 and using C#. Here is what I did to solve this issue:

Right before I set the dataSource for my report. I did this:

myReport report = new myReport();
string login = "UserID";
string passWd = "Password";
report.SetDatabaseLogon(login,passWd);

crystalReportViewer1.ReportSource = report;

This did it for me. I hope this helps.

Take care.

Adios!
Salmaan.

fourplet
March 24th, 2004, 11:36 AM
I have the following code :
select {?TroubleType}
case "All Types":
{tbl_tickets.CustomerAcctNumber} <> '0' and
{tbl_tickets.OpenDate} >= {?BeginDate} and
{tbl_tickets.OpenDate} <= {?EndDate} and
{tbl_tickets.CustomerAcctNumber} <> '184114' and
{tbl_tickets.TroubleType} <> ""
case {?TroubleType}:
{tbl_tickets.TroubleID}<> 0 and
{tbl_tickets.OpenDate}>= {?BeginDate} and
{tbl_tickets.OpenDate}<= {?EndDate} and
{tbl_tickets.CustomerAcctNumber}<> '184114' and
{tbl_tickets.TroubleType}= {?TroubleType}

and I need to duplicate it for 3 other parameter fields. Is there a way to nest the case statements - I continually get an error everytime I try add just one other case statement to a new parameter....

curio11
March 25th, 2004, 12:45 AM
Hi

I am working with VB.net 2002 and MS-Access(password protected). Have created a DSN to work with Crystal Reports. Now the problem is that it does not accept the following line code

CrystalReportViewer1.LogOnInfo(0) = "DSN = ABC;UID = ;PWD = XYZ;DSQ = "

have searched the whole thread, the only solution i found is this piece of code but it does not work et all...

do i require to import any files?? i am importing CrystalDecisions.CrystalReports.Engine and CrystalDecisions.Shared

my code is:
Dim rptTransporter As New rptTransporterCostingRpt()

CrystalReportViewer1.LogOnInfo(0) = "DSN = ABC;UID = ;PWD = XYZ;DSQ = "

CrystalReportViewer1.ReportSource = rptTransporter
CrystalReportViewer1.Show()

Thanks in advance
Bye

sumil_sp
March 26th, 2004, 05:19 AM
How do i dynamically through MFC/VC++ add and remove fields in the crystal report?

maheshperumal
March 27th, 2004, 01:55 AM
Hi,

I have the databse (Oracle) in Unicode (UTF8 encoding) and using reports 4.5. So I am not able to get the strings in the report. First of all, Does crystal report 9.0 works fine with UTF8 encoding backend? (now i get the string as UTF8 characters)

Now, to escape from upgrading to reports 9.0, I have another way. I can convert the Unicode characters to ASCII and use my own font to display and print. (The conversion and fonts are working properly.)

I want to call my converter while reading database (for every string value of every records). The front-end is VB6 and the coverters are functions written in VB6 (also used other dlls).

Can you guys help me to get a solution?

Thanx in advance.

Regards,
Mahesh

sudhar
April 1st, 2004, 01:35 PM
I am reading a record grouped by name and then by project name from Sql server DB. The database has records based on year of week. But the report should be based on pay period(dates). I have the logic to filter the data based on input pay period range. I used array to stretch the 3 rows from DB to 1 report row using

if({TimeSheet.Week} = {@beginWk}) then
populate week1 array;
else if({TimeSheet.Week} = {@endWk}) then
populate week3 array;
else
populate week2 array;

TimeSheet.Week - is the databasew field

Then I form the finalHrarray by stretching week1, week2 and week3 based on the pay period range. But in the report under the detail section it displays 3 rows from the DB for the project
like
projectA 0 1 2 3 4 5 0 0 0 0 0 0 0 0 0
projectA 0 1 2 3 4 5 0 0 0 0 0 0 0 0 0
projectA 0 1 2 3 4 5 0 0 0 0 0 0 0 0 1

Somehow it reads only 1 and 3 row and in some case 1 and 2 row. But I want
projectA 0 1 2 3 4 5 0 5 6 7 2 3 0 0 1 All three weeks in 1 row

StephanieHarris
April 2nd, 2004, 08:14 AM
Please help Babu:

For a couple days I've been battling with writing a report that has to tables linked by a left outer join. The left table simply holds all possible hours of the day (00 - 23). The right table holds all of my data.

My report groups on the hour of the day and it needs to show every hour of the day regardless of whether there is data there or not. I tried a bunch of things but I finally came to the conclusion that crystal was creating my sql syntax incorrectly.

I think I found a work around. I'm using an access database. If I write my own sql command I got it to work. Apparently, crystal was creating the wrong syntax for my sql statement when I used the select expert.

Crystal was creating the following query:

SELECT holdertable_hours.startingtimehours, recordcontrolnumber
FROM holdertable_hours LEFT OUTER JOIN Master ON HolderTable_Hours.StartingTimeHours=Master.StartingTimeHours
Where Master.GroupUsed='083';

If I create a sql command and put the where clause in the join statement it worked:

SELECT HolderTable_Hours.StartingTimeHours, RecordControlNumber
FROM HolderTable_Hours LEFT JOIN [Select * From Master Where GroupUsed='083']. AS Master ON HolderTable_Hours.StartingTimeHours=Master.StartingTimeHours;

I have two questions though:
1) Is it possible to change the sql that crystal generates without writing my own sql command?

2) If I have to write my own sql command, is it possible to create a drop down list for my parameter field, Master.GroupUsed? Originally I was not writing my own command and I had a parameter field where I could select my value for GroupUsed from a drop down list. Now that I have my parameter field as part of my command, it appears that crystal is making me type in the GroupUsed value. It would be nice to still be able to use a drop down list.

Thanks again for all of your help on this!

Steph-

amit_mash
April 4th, 2004, 12:27 PM
looks like kbabu is away.........but still, hope lives

i hope somebody can help me.............

i have attached a zip file, which contains my problem, pls have a look and help me.

Cimperiali
April 5th, 2004, 05:45 AM
Originally posted by amit_mash
looks like kbabu is away
K.Babu is now the moderator of this board.
He asked to receive notifications of new posts in this forum.
I think one of best ways to contact him is the following:
make your questions as new thread, and then...mail him or send
him a pm (look in profile) the link to your question (do not rewrite
your question, but simply write: New Crystal Report Question
and paste the link to your question...

Cesare I.

K.Babu
April 5th, 2004, 11:19 PM
Hi,

Iam also recommanded for your questions as new thread.

K.Babu

Originally posted by Cimperiali
K.Babu is now the moderator of this board.
He asked to receive notifications of new posts in this forum.
I think one of best ways to contact him is the following:
make your questions as new thread, and then...mail him or send
him a pm (look in profile) the link to your question (do not rewrite
your question, but simply write: New Crystal Report Question
and paste the link to your question...

Cesare I.