Max function in Report

  • Thread starter Thread starter bhm7319
  • Start date Start date
B

bhm7319

I used max function in my report to find the maximum value in that column.
But I have another column which gives the description of the of those value.
I would like to know that also when I get the maximum value. So when I see
maximum value, I also know the name of the object which has the maximum value.

Thanks in advance.
 
Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
 
Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.
 
A couple of things -
I do not see Max in your query.
You do not have DESC in the select statement.
LFR.kV) Not Like 500 is improper - use LFR.kV) <> 500 instead.

Post the SQL where you have DESC and Max in the query.

--
Build a little, test a little.


bhm7319 said:
Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.

--
Bharat


KARL DEWEY said:
Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
 
Karl:

I put that query in the report. It reads like "=Min([VoltMag1])". That way I
know what is minimum voltage in my report. I want connect that value with the
"FromId".

Thanks for your help!
--
Bharat


KARL DEWEY said:
A couple of things -
I do not see Max in your query.
You do not have DESC in the select statement.
LFR.kV) Not Like 500 is improper - use LFR.kV) <> 500 instead.

Post the SQL where you have DESC and Max in the query.

--
Build a little, test a little.


bhm7319 said:
Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.

--
Bharat


KARL DEWEY said:
Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
--
Build a little, test a little.


:

I used max function in my report to find the maximum value in that column.
But I have another column which gives the description of the of those value.
I would like to know that also when I get the maximum value. So when I see
maximum value, I also know the name of the object which has the maximum value.

Thanks in advance.
 
I put that query in the report. It reads like "=Min([VoltMag1])".
I asked you to post your query SQL.

--
Build a little, test a little.


bhm7319 said:
Karl:

I put that query in the report. It reads like "=Min([VoltMag1])". That way I
know what is minimum voltage in my report. I want connect that value with the
"FromId".

Thanks for your help!
--
Bharat


KARL DEWEY said:
A couple of things -
I do not see Max in your query.
You do not have DESC in the select statement.
LFR.kV) Not Like 500 is improper - use LFR.kV) <> 500 instead.

Post the SQL where you have DESC and Max in the query.

--
Build a little, test a little.


bhm7319 said:
Sorry, I was outof town. Following is sql of my query.

SELECT LFR.kV, LFR.IDFrom, Round([VoltMag]+0.000001,2) AS VoltMag1,
Round([LFMW]+0.000001,2) AS LFMW1, Round([LFMvar]+0.000001,2) AS LFMvar1,
Round([LFAmp]+0.000001,2) AS LFAmp1, LFR.TYPE
FROM LFR
WHERE (((LFR.kV) Not Like 500) AND ((LFR.IDFrom) Not Like "*-*") AND
((LFR.TYPE)<>"0")) OR (((LFR.IDFrom)="LV-SWY") AND ((LFR.TYPE)<>"0"))
ORDER BY LFR.kV DESC , LFR.IDFrom;

Thanks.

--
Bharat


:

Post the SQL of your query that feeds the report. Open in design view, click
on VIEW - SQL View, highlight all, copy, and paste in a post.
--
Build a little, test a little.


:

I used max function in my report to find the maximum value in that column.
But I have another column which gives the description of the of those value.
I would like to know that also when I get the maximum value. So when I see
maximum value, I also know the name of the object which has the maximum value.

Thanks in advance.
 
Back
Top