Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Zoma
Yak Posting Veteran
76 Posts |
Posted - 2008-09-05 : 02:53:20
|
| Hi All.I recently created a new report for our client,I 1st created a view which will be used by that report. Now i added few parameters on my report for the transaction date which the process happened. I will put a query below see if anyone could offer some help. This View Query is used by my report which i already created.I do get the dates as i want to in my report parameter but the data it does not show only the data from that date. PLease Help Guys.Thanks.Here is the Query Below,Remember i wnat it to view,The very same date where the transaction happened!SELECT dbo.MaterialDefinition.Description, dbo.OrderItem.OrderItem, dbo.Transporter.Transporter, dbo.WeighBridgeTicket.WBTicketNumber, dbo.WeighBridgeTicket.WeighInTime, dbo.WeighBridgeTicket.WeighOutTime, dbo.WeighBridgeTicket.InMass, dbo.WeighBridgeTicket.OutMass, dbo.WeighBridgeTicket.NetMass, dbo.WeighBridgeTicket.Comments, dbo.WeighBridgeTicket.VehicleRegistration, dbo.WeighBridgeTicket.DriverName, dbo.WeighBridgeTicket.DriverID, dbo.WeighBridge.WeighBridge, dbo.[Order].OrderNumber, dbo.[Order].VendorName, dbo.WBTicketProperty.PropertyValue AS [Supplier Mass], [red][/red]CONVERT(varchar(20), dbo.WeighBridgeTicket.WeighInTime, 103) AS TransactionDateFROM dbo.MaterialDefinition INNER JOIN dbo.WeighBridgeTicket ON dbo.MaterialDefinition.MtrlDefID = dbo.WeighBridgeTicket.SourceMatDefID AND dbo.MaterialDefinition.MtrlDefID = dbo.WeighBridgeTicket.DestMatDefID INNER JOIN dbo.OrderItem ON dbo.WeighBridgeTicket.OrderItemID = dbo.OrderItem.OrderItemID INNER JOIN dbo.Transporter ON dbo.WeighBridgeTicket.TransporterID = dbo.Transporter.TransporterID INNER JOIN dbo.WeighBridge ON dbo.WeighBridgeTicket.InWeighBridgeID = dbo.WeighBridge.WeighBridgeID AND dbo.WeighBridgeTicket.OutWeighBridgeID = dbo.WeighBridge.WeighBridgeID INNER JOIN dbo.[Order] ON dbo.OrderItem.OrderID = dbo.[Order].OrderID INNER JOIN dbo.WBTicketProperty ON dbo.WeighBridgeTicket.WBTicketID = dbo.WBTicketProperty.WBTicketID.* The basic query that i used is the highlighted colour one.Thanks. If anyone could offer some help very urgent Thanks |
|
|
dexter.knudson
Constraint Violating Yak Guru
260 Posts |
Posted - 2008-09-05 : 03:30:23
|
| It depends where your reporting tool is looking at the date.It could be the date format causing problems if your reporting tool/method is expecting a different format. As you using Reporting Services? Is so, there is a datetime format you can select for your date parameter. Reporting services also does have a problem with dd/mm/yyyy verses mm/dd/yyyy in the Visual Studio environment. Try deploying it if you have not already done so. The problem isn't there on the Report Server. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-07 : 00:10:34
|
| I guess you question was to display only datepart in your report. you've standard date format available in your report to show only date. no need of changing the query for display format. bring the date time value as it is from table and select a suitable format from cell properties. right click on cell and select properties. go to format tab and then set a suitable format for cell. |
 |
|
|
|
|
|
|
|