Solved

Problem with Reporting Services

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
zeroMAx challenge 20 76
count8 challlenge 13 85
parentbit challenge 3 52
topping2 challenge 13 58
A short article about a problem I had getting the GPS LocationListener working.
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now