?
Solved

Problem with Reporting Services

Posted on 2006-11-03
2
Medium Priority
?
228 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Starting up a Project

762 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