Solved

Change sql query in data definition of report

Posted on 2002-03-14
1
305 Views
Last Modified: 2008-03-17
Hello

I design a report in Crystal Report as

Start Crystal report
Open new file
In Data tab select SQL/ODBC
In Server type select ADO (Active Data)
Select an ADO (ODBC)
Next -> Finish
Then select SQL and written a sql query
and design report on base of query fields.

Now question is that i want to change query of this report how can i edit the query.

Thanks.


0
Comment
Question by:pak_slm
1 Comment
 
LVL 1

Accepted Solution

by:
kzbera earned 25 total points
ID: 6864107
First time while creating report save the sql query.
OPTION 1:
I have tried with a table called AM_PM_TYPE which has two column "Index" and "TX"
I have written the query as
"select * from AM_PM_TYPE"
build it . The microsoft query designer will open
chose the column "INDEX" AND "TX"
click on next next
then the query looks like following:
select AM_PM_TYPE.INDEX, AM_PM_TYPE.TX from AM_PM_TYPE
and save the query.
design the report
shows
INDEX                  Description

AM                     bla bla bla
PM                     bla bla bla
Save the report
go to the Report Expert
click ok to warning message
select the ADO
follow the same procedure (change the query)
click ok
it will ask you that the report with the ado name already added with alias "whgkh" want to add another alias for "whgkh"
click yes
change the name of the alias.
Then remove the fields from the first query
select the desired fields from the second alias name.

Then after designing the report go to Database ->remove from report and remove the first alias name.
If you now see the visual linking expert it will show the fields from second query.
It worked ..

Option 2:

change the saved query file
refresh the report with verify database.
redesign the report.

Best of luck.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question