Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with Reporting Services

Posted on 2006-11-03
2
Medium Priority
?
229 Views
Last Modified: 2010-04-16
Hi

I am calling a report developed in reporting services from my aspx page. I am passing the order Number as the parameter to the report. I am using the following path to access the report.
strReportPath = ConfigurationSettings.AppSettings("ReportingServicesDirectURL") & "/CommercialInvoice&rs:command=Render&Order_Number=" & strOrderNo

On a button click, I am calling the above report, and while calling I am doing some changes to the database.

But the report is not showing the changes if I call the report for same order number for a second time. The report is not getting the values from the database for the same order number. But it is displaying the previous values. It is working fine if I change the order number.

I guess the problem is, for the same report and same parameters, the reporting services are not executing the database again, but getting the values from some tempararily stored location.

How to make the report to look the database, every time a report is executed irrespective of same parameter or different parameter.

this is a big problem for me. I have some other reports with the same problem.

Thanks in advance.
0
Comment
Question by:rvkbs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
jay_gadhavi earned 2000 total points
ID: 17872276
YOU PASS THE PARAMETERS ,IT IS THE RIGHT WAY TO PASSING  PARAMETERS , AND AFTER CLICKING ON THE OK BUTTOM IT SHOULD BE SHOW THE RESULT CORRECTLY.
IT IT IS NOT WORK PROPERLY THEN PASS THE PARAMETER LIKE FOLLOWINT,IN QUARY AND FETCH THE DATA IN BIND IT IN THE DTASET.
[NOTE : IN THE FOLLOWING EXAMPLE I PASS THE DATE AS PARAMETER TO QUARY ]
[NOTE : THNE QUARY GENERATE THE RESULT BY DATE VALUE PASSED BY CODEBEHIND AND BIND THE DATAGASE]
[NOTE :  I GOT THE PERFECT RESULT WITH THIS TECHNIQUES]

Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click
        Try
            Dim date1 As Date
            date1 = dtpDate.Text
            Dim monthofDate As String
            Dim fulldate As String
            If date1.Month < 10 Then
                monthofDate = "0" + date1.Month.ToString
                fulldate = CStr(monthofDate + "/" + date1.Day.ToString + "/" + date1.Year.ToString)
            Else
                date1 = Format(date1, "MM/dd/yyyy")
                fulldate = date1
            End If

            If cmbCompany.Text = "All" Then
                Me.AttendanceTableAdapter.Fill(Me.rptDsDailyAttendance.Attendance, fulldate)
                Me.PrintOnDateInReportsTableAdapter.Fill(Me.PrintOnDateParameter.PrintOnDateInReports)

                If Me.rptDsDailyAttendance.Attendance.Rows.Count > 0 Then
                    Me.ReportViewer1.Visible = True
                    Me.ReportViewer2.Visible = False
                    Me.ReportViewer1.RefreshReport()
                    Me.ReportViewer1.RefreshReport()
                Else
                    Me.ReportViewer1.Visible = False
                    Me.ReportViewer1.Visible = False
                    MessageBox.Show(My.Resources.Messages.Holiday_Search_NoRecordFound, "Record Not Found", MessageBoxButtons.OK, MessageBoxIcon.Information)
                End If
            Else
                If Not IsNothing(Me.rptDsDailyAttendance.DailyAttendance_company) Then
                    If Me.rptDsDailyAttendance.DailyAttendance_company.Rows.Count > 0 Then
                        Me.rptDsDailyAttendance.DailyAttendance_company.Clear()
                    End If
                End If
               
                dscompany.Fill(Me.rptDsDailyAttendance.DailyAttendance_company, fulldate, cmbCompany.SelectedValue)
                Me.PrintOnDateInReportsTableAdapter.Fill(Me.PrintOnDateParameter.PrintOnDateInReports)
                If Me.rptDsDailyAttendance.DailyAttendance_company.Rows.Count > 0 Then
                    Me.ReportViewer2.Visible = True
                    Me.ReportViewer1.Visible = False
                    Me.ReportViewer2.RefreshReport()
                    Me.ReportViewer2.RefreshReport()
                Else
                    Me.ReportViewer1.Visible = False
                    Me.ReportViewer2.Visible = False
                    MessageBox.Show(My.Resources.Messages.Holiday_Search_NoRecordFound, "Record Not Found", MessageBoxButtons.OK, MessageBoxIcon.Information)
                End If

            End If

        Catch ex As Exception

        End Try
       
    End Sub

0
 

Author Comment

by:rvkbs
ID: 17881512
Thanks Jay,

By passing the timestamp as a parameter, I got the desired result. In this case, because I am passing different value for the parameter each time, I am getting the correct value.

Again thanks for your timely help.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Six Sigma Control Plans

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question