|
-
Feb 14th, 2007, 03:55 PM
#1
Thread Starter
Addicted Member
HOw to pass a dataset column as a parameter to Crystal?
I am using vb.net 2005 and crystal reports and I am wanting to pass a calculation I have in my select statement to crystal as a parameter.
My select is like this
Select (ks.TotWeight / 100) * price.mkprice)) As TotalPrice, ks.Pay, ......
my select contains alot of other fields + a join on the price table.
-
Feb 15th, 2007, 04:12 AM
#2
Re: HOw to pass a dataset column as a parameter to Crystal?
VB Code:
If Not [Parameter] = "" Then Report.SetParameterValue(0, [Parameter])
-
Feb 15th, 2007, 02:04 PM
#3
PowerPoster
Re: HOw to pass a dataset column as a parameter to Crystal?
Shak,
This code sample you provided....it that within a VB.Net app or CR? Also, for the SelectionFormula....can you use an embedded SQL statement?
Thanks,
-
Feb 15th, 2007, 04:22 PM
#4
Thread Starter
Addicted Member
Re: HOw to pass a dataset column as a parameter to Crystal?
I tried that with no luck. The essential problem I am having is this:
I have 2 tables with fields that appear in my report. My select statement does on a join to have conditions met on both tables. If I run the query in Query Analyzer, it returns 1 record, like it should. One of the fields on my report is a formula.
({ks.tot_c_weight} / 100) * {price.mkprice}
Whenever I add this formula to the report, the report removes ALL data when I actually run it. If I remove the fomula from the report, then all of the data appears at runtime. I tried it by just adding any field from the Price table to the report, and it doesn't matter which field I drop onto the report, all data is removed.
This is why I was going to try to pass it as a parameter.
Any ideas what causes this? I am lost!
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
|