我怎样才能获得sql命令只报告工作? [英] how do i get a sql command only report to work?

查看:69
本文介绍了我怎样才能获得sql命令只报告工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的水晶报告里面有一个sql命令,但没有添加任何表格。我想知道如何让报告显示已排序和条件特定的数据?这是我的sql命令,所以你可以提供帮助:

I have a sql command inside of my crystal report but no tables added. I was wondering how do i get the report to display the sorted and condition specific data? Here is my sql command so you can help:

SELECT     dbo.Calendar.startDate,dbo.Calendar.endDate,dbo.Course.name,dbo.Course.number,DBO。[特征] .lastName,DBO。[特征] .firstName,DBO。[特征] .middleName,


                       dbo.Person.studentNumber,dbo.School.name AS Expr1,dbo.School.address,dbo.School.city,dbo.School.state,dbo.School.zip,dbo.School.phone

FROM         dbo.School INNER JOIN

                  &NBSP ;   dbo.Calendar INNER JOIN

                  &NBSP ;   dbo.Course ON dbo.Calendar.calendarID = dbo.Course.calendarID ON dbo.School.schoolID = dbo.Calendar.schoolID CROSS JOIN

      &NBSP ;               dbo.Person INNER JOIN

                  &NBSP ;   dbo。[Identity] ON dbo.Person.personID = dbo。[Identity] .personID AND dbo.Person.currentIdentityID = dbo。[Identity] .identityID

      ;                 WHERE NOT dbo.Person.studentNumber = 'NULL' AND dbo.School.name ='加勒德县高中的

                       ORDER BY dbo。[Identity] .firstName

SELECT     dbo.Calendar.startDate, dbo.Calendar.endDate, dbo.Course.name, dbo.Course.number, dbo.[Identity].lastName, dbo.[Identity].firstName, dbo.[Identity].middleName,
                      dbo.Person.studentNumber, dbo.School.name AS Expr1, dbo.School.address, dbo.School.city, dbo.School.state, dbo.School.zip, dbo.School.phone
FROM         dbo.School INNER JOIN
                      dbo.Calendar INNER JOIN
                      dbo.Course ON dbo.Calendar.calendarID = dbo.Course.calendarID ON dbo.School.schoolID = dbo.Calendar.schoolID CROSS JOIN
                      dbo.Person INNER JOIN
                      dbo.[Identity] ON dbo.Person.personID = dbo.[Identity].personID AND dbo.Person.currentIdentityID = dbo.[Identity].identityID
                      WHERE NOT dbo.Person.studentNumber='NULL' AND dbo.School.name = 'GARRARD COUNTY HIGH SCHOOL'
                      ORDER BY dbo.[Identity].firstName

问题是它的行为很奇怪,当我在visual studio 2010水晶报表编辑器中加载它时,它的行为就像它不会加载一样。 Windows几乎试图关闭它,我不知道它是否有效。  

The problem is it acts weird and acts like its not going to load when i load it in the visual studio 2010 crystal reports editor. Windows almost tries to shut it down and i dont know if it works.  

我确实在sql server management studio 2008中使用了它。

                      

I did get this working in sql server management studio 2008 though.
                     

推荐答案

我希望它显示我的报告中的字段并按照以下顺序对它们进行分组:schoolname-> lastname-> firstname。

I want it to display the fields inside my report and group them according to this order: schoolname->lastname->firstname.

上面的句子我只想用它上面的sql命令。

The above sentence is all i want to do with the sql command above it.


这篇关于我怎样才能获得sql命令只报告工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆