Hi people!!.. I need to make a report, I created it using Navision and it was unusable.. very very slow.. because I have millions of records...
I have the Report using a SQL query, I was wondering if is any way to create a view with this query dinamically, passing 2 parameters using Navision. And then use the view to create the report. Below is the SQL query and the parameters I want to pass in bold.
Thank u for your time!!
select year(s.[Posting Date]) as [PYear],month(s.[Posting Date]) as [PMonth],d.[Recognition Year],d.[Recognition Month],sum([Amount To Be Recognized])as Amount
into DeferralReport_Partial_invoices
from
[US Trend Micro$Deferral Detail] d,
[US Trend Micro$Sales Invoice Header] s
where
d.[Document No_]=s.[No_]
and s.[Posting Date] between PARAMETER1 and PARAMETER2
group by
year(s.[Posting Date]),month(s.[Posting Date]),d.[Recognition Year],d.[Recognition Month]
0
Comments
Than you can filter in navision on the viewfield.
if you not need this table and eed only he reult set by for example 10 recs, you can also create an scalar function with parameters and call this function via ADO from C/AL
Regards
The thing is that I need to create an excel report with the table, not just see it...
Do you have any example of the scalar function you told?..
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
And call it from Navision?... sounds good, but how?
Hopefully 2005.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
But, you say, you will create an excel document. Why you not make an ODBC Connection from excel to the SQL Server?
Here an very simple example for an SQL function that you can call from Navision with using ADO (search the forum)
This SQL Function returns the document No from Cust_ Ledger Entry. It req. an Parameter -> Customer No. and an Parameter 2 -> Posting date
Now you must call this from Navision per ADO
But other question. What is the problem with an view :?:
(Create View ......)
Regards
Actually there was. It just didn't ship in the SQL box for "free". It was part of the development products. Reporting Services is not a new product. It is a repackaging of an existing feature along with a sizable feature upgrade.
You could setup a 2005 Reporting Services environment and use it to report from the SQL 2000 database. The data sources do not need to be SQL 2005.
That's right, its an better way to install the Reporting Services environment and use this with 2000 database.