Solved

Problem with Reporting Services

Posted on 2006-11-03
2
225 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

738 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