Solved

Change sql query in data definition of report

Posted on 2002-03-14
1
311 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

631 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