Showing posts with label coded. Show all posts
Showing posts with label coded. Show all posts

Monday, March 19, 2012

Datetime parameter / Report Viewer

I have a .net 2.0 web form with a report viewer control (RS 2005) and have hard coded the report server and path. The report has two date time parameters that have a default value set up. When the user clicks the calendar icon to change the date range, the page refreshes without displaying the calendar... I don't remeber having this problem in the past. The parameters function fine in Report Manager. Any idea what could be causing this?

I am having the same problem and ran across this thread. Hopefully it will help you.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=591513&SiteID=1

Saturday, February 25, 2012

Dates in a DTS

I am running a DTS package and the dates are hard coded...which means I have
to change the date each time I go to run it.
I would like to change it so that it does it automaticaly...so when it runs,
it takes one off the system date and transfers the data...so it only
transfers the previous days data.
Can anyone help, please.
Here is the package details
****************************************
***
SELECT IDTYPP, IDINVN, IDLINE, IDCUNO,
TRIM(IDPRDC) AS IDPRDC, TRIM(IDUNIT) AS IDUNIT,
OLCONV,
CASE
WHEN IDTYPP = 2 THEN -OLOQTY
ELSE OLOQTY
END OLOQTY,
CASE
WHEN IDTYPP = 2 THEN -IDQTY
ELSE IDQTY
END IDQTY,
IDSALP - (IDSALP * IDDCPR / 100) AS IDNPRC,
CASE
WHEN IDTYPP = 1 THEN IDAMOU * IDEXR3
ELSE -IDAMOU * IDEXR3
END IDAMOU,
CASE
WHEN IDTYPP = 1 THEN IDCOSP * IDEXR3
ELSE -IDCOSP * IDEXR3
END IDCOSP,
TRIM(IDCAGR) AS IDCAGR, TRIM(IDSALE) AS IDSALE, IDIDAT,
CASE
WHEN IDTYPP = 1 THEN IDQTY * IDCOSP * IDEXR3
ELSE -IDQTY * IDCOSP * IDEXR3
END IDLCVA
FROM LTR403FLL.SR3ISD D
LEFT OUTER JOIN LTR403FLL.SRBSOL O
ON D.IDORNO = O.OLORNO
AND D.IDOLIN = O.OLLINE
WHERE IDPERI >= 200411
AND IDIDAT >= 20050301 AND IDIDAT < 20050307
****************************************
******
The line
AND IDIDAT >= 20050301 AND IDIDAT < 20050307
is the one I would like to change to retrieve the data from the previous daySet up global variables for the dates you want to assign on the fly.
You can then set them in ActiveX scripts or using a dynamic properties task.
Simon Worth
"Billy" <Billy@.discussions.microsoft.com> wrote in message
news:B1EE60B2-2E10-46DC-891C-FFAB658F6562@.microsoft.com...
> I am running a DTS package and the dates are hard coded...which means I
have
> to change the date each time I go to run it.
> I would like to change it so that it does it automaticaly...so when it
runs,
> it takes one off the system date and transfers the data...so it only
> transfers the previous days data.
> Can anyone help, please.
> Here is the package details
> ****************************************
***
> SELECT IDTYPP, IDINVN, IDLINE, IDCUNO,
> TRIM(IDPRDC) AS IDPRDC, TRIM(IDUNIT) AS IDUNIT,
> OLCONV,
> CASE
> WHEN IDTYPP = 2 THEN -OLOQTY
> ELSE OLOQTY
> END OLOQTY,
> CASE
> WHEN IDTYPP = 2 THEN -IDQTY
> ELSE IDQTY
> END IDQTY,
> IDSALP - (IDSALP * IDDCPR / 100) AS IDNPRC,
> CASE
> WHEN IDTYPP = 1 THEN IDAMOU * IDEXR3
> ELSE -IDAMOU * IDEXR3
> END IDAMOU,
> CASE
> WHEN IDTYPP = 1 THEN IDCOSP * IDEXR3
> ELSE -IDCOSP * IDEXR3
> END IDCOSP,
> TRIM(IDCAGR) AS IDCAGR, TRIM(IDSALE) AS IDSALE, IDIDAT,
> CASE
> WHEN IDTYPP = 1 THEN IDQTY * IDCOSP * IDEXR3
> ELSE -IDQTY * IDCOSP * IDEXR3
> END IDLCVA
> FROM LTR403FLL.SR3ISD D
> LEFT OUTER JOIN LTR403FLL.SRBSOL O
> ON D.IDORNO = O.OLORNO
> AND D.IDOLIN = O.OLLINE
> WHERE IDPERI >= 200411
> AND IDIDAT >= 20050301 AND IDIDAT < 20050307
> ****************************************
******
> The line
> AND IDIDAT >= 20050301 AND IDIDAT < 20050307
> is the one I would like to change to retrieve the data from the previous
day