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....
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
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).
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
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.
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.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
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.
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.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.