|
-
Jul 29th, 2003, 09:03 AM
#1
Thread Starter
Frenzied Member
order by
I need to order by vendor name when I call my report from my app...everything works in the formula, except for the "order by"...any help?
VB Code:
rpt.DataDefinition.RecordSelectionFormula = "{pcms_pcard_transaction_header.end_billing_date} =#" & tranPeriodEnd & "# and {pcms_pcard_transaction_header.card_work_unit}='" & userid_wu & "' order by{pcms_pcard.employee_last_name}"
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jul 29th, 2003, 09:38 AM
#2
How abpout putting a space between by and {
-
Jul 29th, 2003, 09:44 AM
#3
Thread Starter
Frenzied Member
same
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jul 29th, 2003, 09:47 AM
#4
Sleep mode
Why are using {} instead of [] ?? . Try to replace it with [ ] after ORDER BY .
-
Jul 29th, 2003, 09:56 AM
#5
Thread Starter
Frenzied Member
still the same err msg...
remaining text does not appear to be part of the formula
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jul 29th, 2003, 09:58 AM
#6
Sleep mode
What's the error msg ? and btw , are you sure you should use {} instead of [] ?
-
Jul 29th, 2003, 09:59 AM
#7
Sleep mode
-
Jul 29th, 2003, 10:01 AM
#8
Thread Starter
Frenzied Member
the brackets are working fine in the rest of the formual. I only get the err msg when I add the "order by" clause.
The err msg is from Crystal...shows my formula and at the end says:
remaining text does not appear to be part of the formula
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jul 29th, 2003, 10:02 AM
#9
Thread Starter
Frenzied Member
not really a sql string...just adding parameters when the reports are ran...is there another way I can order by then?
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jul 29th, 2003, 10:09 AM
#10
Sleep mode
Try this :
rpt.DataDefinition.RecordSelectionFormula = "{pcms_pcard_transaction_header.end_billing_date} =#" & tranPeriodEnd & "# and {pcms_pcard_transaction_header.card_work_unit}='" & userid_wu & "=" & "' order by{pcms_pcard.employee_last_name}"
Changed ...
-
Jul 29th, 2003, 10:17 AM
#11
Thread Starter
Frenzied Member
same
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jul 29th, 2003, 10:36 AM
#12
Hyperactive Member
Your problem is that you are using the record selection formula to use an 'order by clause'. Remember this is not an sql styring, it is a record selection formula and only accepts record selection criteria.
If you need to order the records, other than their normal order then either create a view in server explorer and use that, or in your VB code, fill a dataset with your record selection and ordering and then set your datasource on the report obect to use that dataset.
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
|