Click to See Complete Forum and Search --> : HOw to pass a dataset column as a parameter to Crystal?
o9z1
Feb 14th, 2007, 02:55 PM
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.
shakti5385
Feb 15th, 2007, 03:12 AM
If Not [Parameter] = "" Then Report.SetParameterValue(0, [Parameter])
blakemckenna
Feb 15th, 2007, 01:04 PM
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,
o9z1
Feb 15th, 2007, 03:22 PM
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!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.