Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6974417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:14:05+00:00 2026-05-27T17:14:05+00:00

I am working with a set of reports that were designed and converted over

  • 0

I am working with a set of reports that were designed and converted over into Visual Studio 2008 BIDS.

I have one report that does the following, it has no use of the @DistID parameter in the SQL code. I do have a DistID parameter setup.

When the report is viewed the report will load just fine, when the user enters a number into the DistID Parameter box it will reload the report with just that single DistID

SELECT  o.Orderid, 
        o.Distid, 
        it.invoicetypedesc, 
        SUM(ol.Volume * ol.Quantity) AS Volume, 
        SUM(ol.Amount) AS Amount, 
        SUM(retailPrice * quantity) AS Retail, 
        o.TaxAmt, 
        o.ShipAmt, 
        o.PostAmount, 
        o.Status, 
        w.WarehouseDesc
FROM Orders o 
inner join Orderlines ol on o.orderid = ol.orderid
Inner Join Warehouse w on o.warehouseid = w.warehouseid
inner join invoicetype it on o.invoicetype = it.invoicetype
WHERE o.OrderDate  between @fromdate and
                           @todate + ' 11:59:59 PM' and 
      o.EnteredBy in (@EnteredBy) AND 
      o.InvoiceType IN (@InvoiceType)
Group by o.OrderID, 
         o.DistID,
         it.InvoiceTypedesc,
         o.taxamt,
         o.shipamt,
         o.postamount,
         o.status,
         w.WarehouseDesc

There are other paramaters setup @fromDate @toDate etc that also work just fine.

I have another report where I need the same functionality, except for DistID I need ItemId. I have setup a parameter and expected it to work the same, but the report will always load all items, even when I enter an item number into the ItemID Text Box.

select ol.itemid, 
        i.description, 
        it.invoicetypedesc, 
        sum(ol.quantity) as quantity, 
        sum(ol.amount) as amount, 
        ol.volume, 
        sum(ol.volume * ol.quantity) as totvolume, 
        o.warehouseid, 
        w.warehousedesc, 
        o.invoicetype, 
        ol.retailprice, 
        ol.wholesaleprice, 
        inv.sku 
from orders o 
inner join orderlines ol on o.orderid = ol.orderid 
left join items i on ol.itemid = i.inventoryid
left join inventory inv on ol.itemid = inv.inventoryID
inner join invoicetype it on o.invoicetype = it.invoicetype
inner join warehouse w on o.warehouseid = w.warehouseid
where o.orderdate between @fromdate and @todate + ' 11:59:59 PM' and 
      ol.quantity > 0 and 
      o.EnteredBy in (@EnteredBy)
group by ol.itemid, 
         i.description,
         it.invoicetypedesc,
         ol.volume,
         o.warehouseid,
         w.warehousedesc,
         o.invoicetype,
         ol.retailprice,
         ol.wholesaleprice,
         inv.sku

Both report were made a long time ago. I am modifing the item report to have the same functionality as the distID in the other report but I cannot seem to get this to work.

I have searched both reports for any differences that I am missing and I cannot find any. The other oddity is when I add another parameter in the DistID report to break it down further by orderID that as well will not work.

I have found nothing in the Filters, Variables or Code section of the report. I am not sure what I am missing here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:14:06+00:00Added an answer on May 27, 2026 at 5:14 pm

    There appears to be more than one question here. I am going to concentrate on the (implied) first question: why doesn’t the second report select a single ItemID in the same way that the first report selects a single DistID?

    I think the underlying cause is that there is more going on in the first report than has been stated – given its description so far, when the user enters a number into the DistID Parameter box the report should not reload with just that single DistID. It therefore sounds as though there is an additional filter on the table/tablix report object being used to display the output, or possibly the visibility of the detail rows has been made conditional on the parameter value.

    If this is the case, you could replicate the functionality of the first report in the second by duplicating whichever method it has used to display the single ID. However, given the maintenance difficulties this method has produced (ie. this question) I strongly recommend you add it to the query selection criteria instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a report renderer in C# that runs and attaches reports to
I am working on a project that uses Crystal Reports WPF, so I have
I am working with a set of T4 script that generate partial classes for
I have jQuery draggable set up and working ok on a table row. Currently
To set the scene, I'm currently working on an XML adapter for Android that
The application that I'm currently working on has a funky set up for the
I'm working on pseudo-transport layer software that runs over UDP, providing reliable connection-oriented transmission,
SO I'm working on a schedule app that uses a MySQL DB. One of
I am new to Crystal reports. I have to set the datasource of the
I am working on crystal report, i am using data set in c#, i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.