Showing posts with label formula. Show all posts
Showing posts with label formula. Show all posts

Monday, March 26, 2012

Passing Formula as a parameter to SQL Query in AddCommand

Hi,

I'am new to Crystal reports,

I created a formula based on that i have to fetch column value from database

for that i wrote a very simple query in SQLCOMMAND

as SELECT <TABLE.CPLUMN> FROM <TABLE>

WHERE <TABLE.OTHERCOLUMN>='@.CRYSTAL REPORT FORMULA'

when closing the commandbox i'am getting error "OLE DB ERROR NO DATABSE RECORDS FOUND"

if i pass a some hardcoded vale(data whic exists in database) then the query is not throwing any error..

Thanks
MikeI don't think you can do that. You can create and use parameters in you query but not formulas. Your query looks really simple, so I have some doubts if it was that necessary to create it in your case.

Why don't you use something like that:

if {TABLE.OTHERCOLUMN}>=here print what you have in your '@.CRYSTAL REPORT FORMULA' then {TABLE.OTHERCOLUMN}

This formula does the same.

Friday, March 23, 2012

Passing Data From VB to SSRS using LocalReport

With Crystal reports, it was easy to pass a single piece of data from VB to a report in a formula field. How do you implement this functionality in SSRS 2005 (I am using VS 2005)?

Seems like this should be commonplace, but I can't seem to find any info on it.

I am using a LocalReport, so a URL is not an option.

Thanks.

For anyone else having this problem:

I have figured it out - you have to create a parameter using the Report - Report Properties menu. Then, you link the parameter to a TextBox on the report. Finally, you can pass data from a client using the LocalReport.SetParameters method.

Never did find any documentation on it. Very obscure.

Passing Data From VB to SSRS using LocalReport

With Crystal reports, it was easy to pass a single piece of data from VB to a report in a formula field. How do you implement this functionality in SSRS 2005 (I am using VS 2005)?

Seems like this should be commonplace, but I can't seem to find any info on it.

I am using a LocalReport, so a URL is not an option.

Thanks.

For anyone else having this problem:

I have figured it out - you have to create a parameter using the Report - Report Properties menu. Then, you link the parameter to a TextBox on the report. Finally, you can pass data from a client using the LocalReport.SetParameters method.

Never did find any documentation on it. Very obscure.