sainisherry
asked on
How to write sql statement in crystal report 10.?
I made a simple report in CR 10.
I want to display one field independent of the mail query.
So how can i write a sql to render the field.
And one more point where can i write this sql query.
help me guys.
its urgent.
bye
I want to display one field independent of the mail query.
So how can i write a sql to render the field.
And one more point where can i write this sql query.
help me guys.
its urgent.
bye
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agree woth Gary
Multiple data sources in Crystal
http://support.businessobjects.com/library/kbase/articles/c2008838.asp
Subreports in Crystal
http://support.businessobjects.com/communityCS/TechnicalPapers/scr_subreports.pdf.asp
Sgaring data between a subreport and the main report
http://support.businessobjects.com/library/kbase/articles/c2007600.asp
mlmcc
Multiple data sources in Crystal
http://support.businessobjects.com/library/kbase/articles/c2008838.asp
Subreports in Crystal
http://support.businessobjects.com/communityCS/TechnicalPapers/scr_subreports.pdf.asp
Sgaring data between a subreport and the main report
http://support.businessobjects.com/library/kbase/articles/c2007600.asp
mlmcc
ASKER
Gary , u r on the right track.
How can i resolve this issue. I just want to fetch a value from separate sql and print on the report.
thankx
How can i resolve this issue. I just want to fetch a value from separate sql and print on the report.
thankx
Build a new report that gets the information. Use that as a subreport and then use the Sharing data method outlined in my 3rd link.
mlmcc
mlmcc
You can also write the SQL statement in a SQL Expression, as long as it returns only one value, and avoid the Subreport.
Create a new SQL Expression from the field explorer.
Add your SQL statement in the editor, and enclose the whole statment in parenthesis.
Save and Close.
Add the SQL Expression field ot the report.
Run the report.
This can be a bit faster, and easier than using a subreport since the value will be returned with the original reports recordset.
With a subreport, you will have to deal with shared variables in if you need the value for any calculations.
Create a new SQL Expression from the field explorer.
Add your SQL statement in the editor, and enclose the whole statment in parenthesis.
Save and Close.
Add the SQL Expression field ot the report.
Run the report.
This can be a bit faster, and easier than using a subreport since the value will be returned with the original reports recordset.
With a subreport, you will have to deal with shared variables in if you need the value for any calculations.
If I am correct the easiest way to accomplish this is to insert a subreport and use this to return the unrelated data.
Gary