Solved

Problem with Reporting Services

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
object oriented javascript web form 8 104
parentbit challenge 3 72
firstChar challenge 13 107
drawing animated level bar based on numbers 3 88
A short article about a problem I had getting the GPS LocationListener working.
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.
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 …
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…

911 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

17 Experts available now in Live!

Get 1:1 Help Now