Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Wednesday, March 21, 2012

Nested Tables

Hi

I have 3 tables each with a diferent dataset's, is there any way i can nest 2 of the tables inside one of the other table's group's?

Any other way tath i could repeat 3 tables in some grouping method?

Using different datasets inside one top-level table is not currently supported, so you cannot nest the two tables inside the other table. But you can create two subreports and put the two tables in the subreports respectively, then nest the subreports in the other table.|||

That's exactly what i did. Was hopping there was some other way not using SubReports.

Never the less it works fine with Sub-Reports , thank you for your time

Nested Tables

Hi

I have 3 tables each with a diferent dataset's, is there any way i can nest 2 of the tables inside one of the other table's group's?

Any other way tath i could repeat 3 tables in some grouping method?

Using different datasets inside one top-level table is not currently supported, so you cannot nest the two tables inside the other table. But you can create two subreports and put the two tables in the subreports respectively, then nest the subreports in the other table.|||

That's exactly what i did. Was hopping there was some other way not using SubReports.

Never the less it works fine with Sub-Reports , thank you for your time

Nested Subreports

Hi!

I have a report (A) that has a list where a subreport (B) is displayed. This subreport includes nested sub-reports (C) which have other nested subreports (D) (globally there are 3 levels of subreports). When I try to preview report A in Visual Studio I get the "Object not set to an instance of an object" but when I try to preview report B everything is ok. I have RS SP1 installed and I have already tried to include a dummy query in the subreports so that they always have a result....

Does any one had a similar error?

Thank you in advance

csr

Problem solved!

i seems someone had installed SP2 in Server and I did not have Client updated

Thank you and keep the good work!

Monday, March 19, 2012

Nested queries difficulty

Hi!
I'm a SQL beginner struggling with some SQL textbook examples, and i'm stuck at one exercise. :eek:
Can anyone give me a hint??

Ok, here it goes:
I'm trying to simulate a airport booking system, where CUSTOMER makes a RESERVATION to a FLIGHT. The FLIGHT have a ROUTE, a AIRCRAFT, and some CABINSTAFF. Plus some other minor attribures..

The question i'm trying to answer now is "how many seats are there left on all flights having a specific route?". I can get how many seats the airplanes have with this:

SELECt SEATS
FROM FLIGHT FL, AIRCRAFT AC, ROUTE R
WHERE FL.FNUMBER = R.FLIGHTNUMBER
AND FL.AIRCRAFT = AC.NAME
AND DEPARTURECITY = 'Paris' AND ARRIVALCITY = 'London'
AND "DATE" = '2005-03-01';

It will return:
100
200
(there are two flights that match the selected route and date, one airplane have 100 seats, the other one 200).

I then find out how many customers that are booked on those flights:

SELECT COUNT(RESERVATION_NO)
FROM FLIGHT F, AIRCRAFT A, ROUTE R, RESERVATION RN, RESERVES RS
WHERE RN.RESERVATION_NO = RS.RESERVATION_NO
AND RN.FNUMBER = R.FLIGHTNUMBER
AND F.FNUMBER = RN.FNUMBER
AND F.AIRCRAFT = A.NAME
AND DEPARTURECITY = 'Paris' AND ARRIVALCITY = 'London'
AND FDATE = '2005-03-01'
GROUP BY RN.RESERVATION_NO

It will correctly return:
1
2

Now i want to substract the second query from the first to get the number of seats left in those flights:

SELECT FLIGHTNUMBER, SEATS - (SELECT COUNT(RESERVATION_NO)
FROM FLIGHT F, AIRCRAFT A, ROUTE R, RESERVATION RN, RESERVES RS
WHERE RN.RESERVATION_NO = RS.RESERVATION_NO
AND RN.FNUMBER = R.FLIGHTNUMBER
AND F.FNUMBER = RN.FNUMBER
AND F.AIRCRAFT = A.NAME
AND DEPARTURECITY = 'Paris' AND ARRIVALCITY = 'London'
AND FDATE = '2005-03-01'
GROUP BY RN.RESERVATION_NO)
FROM FLIGHT FL, AIRCRAFT AC, ROUTE R
WHERE FL.FNUMBER = R.FLIGHTNUMBER
AND FL.AIRCRAFT = AC.NAME
AND DEPARTURECITY = 'Paris' AND ARRIVALCITY = 'London'
AND "DATE" = '2005-03-01';

But that does'nt work since you can't substract a set, only a single row, right?? So how do i fix this??
The answer should be:
219
98

Thanks!Without getting into the details of your query, you need to correlate the subquery to the main query something like this:

SELECT FL.FLIGHTNUMBER, SEATS - (SELECT COUNT(RESERVATION_NO)
FROM FLIGHT F, ...
WHERE ...
AND F.FLIGHTNUMBER = FL.FLIGHTNUMBER)
FROM FLIGHT FL, ...;

Monday, March 12, 2012

Nested dataregions

Hi!

I'm having some problems with a basic thing I guess.

I have a table of visits as the whole Dataset. Let's call it group A.

I then group the visits per customer, let's call that group B.

After that i filter out some unwanted visits and call that group C.

The hiarchy then looks like this, A contains B that contains C.

The problem is that I want to know the number of rows in C above the actual table. Something like

CustomerName (John Doe) Number of visits (54 from group C but printed out while in group B)

Visit 1 blablabal
Visit 2 blablabla
... and so on ...

As far as I understand the aggregate functions, you can only use them on the current group or a group above, never below. I tried to make an invisible textbox below C and it works if there is just one customer. If there are more than one customer the sum flipped between all the customers. (A gets the sum of B, and so on).

Thanks
Johan

But you can have multiple C group sections (each time your grouping expression changes), correct? If an outer group can reference an inner group, there will be multiple totals that are only known at runtime.|||

In my case, I only have one C groping per B grouping. Its a table that filters out preknown types of visits. Its the number of rows in this table that I would like to print out above the table in question, inside grouping B. What I did was to create a textbox within the C grouping that I referenced from a B grouping. Works for one (1) customer, but if there are more customers the totals get calculated correctly, but displayed in the wrong order.

I realise that it might be inpossible to do this, but I would hope that I at least could "transfer" a number higher up if I know that it only would be one other C grouping.

What I would like to do is something like this:

(pseudocode)

=Count(Fields!VisitId.Value, "not VisitType=BadVisit")

Am I making sence at all? :)

|||Yes, you are but in general you can have more than one group sections and referencing an inner group is not allowed. Why don't you bring the C totals at the B level in your dataset? A simple scalar function (assuming SQL Server) will do the job.|||

The problem is that I don't deside the datasource at the moment and all I have is a view containing Visits of two types. The first type is carried out visits and the second one is missed visits.

They are not in any specific order and missed and carried out visits could be at random rows.

If I could change the dataset, are you suggesting that I put the total amount of visits with each row per customer and just read the first row by each customer grouping to get the value? Kind of like how they denormalized the name of the customer in every row?

Thanks for a quick answer by the way! :)

|||Correct. In this way, you don't have waste your time to find a hack. In addition, you'll never go wrong by pushing work to the database.

Wednesday, March 7, 2012

Needing to run reporting services on SQL Server 2000

Hi
I want to install SQL Server 2000 Enterprise Edition on Windows XP but it isn't installing.
I have installed SQL Server 2000 Personal Edition but Reporting Services are not installing on the server.
PLZ some one help me out.

SQL 2000 Enterprise Edition is not supported on XP. Please see this link for requirements:

http://www.microsoft.com/sql/prodinfo/previousversions/system-requirements.mspx

Thanks,
Sam Lester (MSFT)

Saturday, February 25, 2012

Need Tutorial for SQL Server Reporting Tool

Hi

I need good tutorial for Sql Server Reporting Service .

I m a beginner ......

Regards

Niroshan

Free training CD ROMs

http://www.appdev.com/promo/freecd.asp?PC=SN00031

Videos

http://content.ricksql.com/content/

Google

http://www.google.ca/search?q=reporting+services+filetype%3Adoc+rendering&hl=en

http://www.google.ca/search?hl=en&q=reporting+services+filetype%3Adoc+handson&meta=

cheers,

Andrew

|||

Check out these:

TechNet Webcast: Introduction to Microsoft SQL Server 2005 Reporting Services (Level 200)

Monday, October 23, 2006

11:30 A.M.–12:30 P.M. Pacific Time

Tune in to learn about the many new and exciting features that have been added to Reporting Services since Microsoft SQL Server 2000.

and these links

SQL Server 2005 Webcasts: http://www.microsoft.com/events/series/msdnsqlserver2005.mspx or http://www.microsoft.com/events/series/technetsqlserver2005.mspx


SQL Server 2005 Virtual Labs: http://msdn.microsoft.com/virtuallabs/sql/

Monday, February 20, 2012

Need to View some type of LOG file

Hi
I need to view a log of all SQL scripts that were RUN in Sequel Server.
Is It possible to view some type of a log, which will show me the script
as well as when it was run.
Many Thanks
AQ
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Retroactively, no. Going forward, you can use SQL Server Profiler to catch
scripts as they run.
Look up SQL Profiler in Books Online for information about how to use the
tool.
"AQ Mahomed" <aq786@.shoecrazy.co.za> wrote in message
news:OHxDvpWTEHA.2464@.TK2MSFTNGP10.phx.gbl...
> Hi
> I need to view a log of all SQL scripts that were RUN in Sequel Server.
> Is It possible to view some type of a log, which will show me the script
> as well as when it was run.
> Many Thanks
> AQ
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi,
You can get the object creation date from sysobjects system table.
use dbname
go
select substring(name,1,35) as Object_name,type as Object_type,crdate from
sysobjects
Description for Object_type displayed in the above query
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inlined table-function
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure
Thanks
Hari
MCDBA
"AQ Mahomed" <aq786@.shoecrazy.co.za> wrote in message
news:OHxDvpWTEHA.2464@.TK2MSFTNGP10.phx.gbl...
> Hi
> I need to view a log of all SQL scripts that were RUN in Sequel Server.
> Is It possible to view some type of a log, which will show me the script
> as well as when it was run.
> Many Thanks
> AQ
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!