How to offer parameter for user to select an amt and then show that data - crystal-reports-xi

I have done report that shows summary of sales of items by free shipping or not free shipping. They are actually Product lines, that get free shipping or not.
It looks like this.
date Invoice# Free PL NOt free PL etc.
061113 1234 $29
061213 5678 $89
They want to have the flexibility to select ranges of BOTH free PL’s and non-free PL’s (e.g., “free PL’s over $70 and non-free over $30”, or “free PL’’s over $80 and non-free PL’s over $25” etc.)
They want to specify I guess in the param what amount then the CR should display according, so that in out case here only the second line would show.
Is this able to be done just in the param? if so, how would you code this?

this method may be a bit lengthy but will work for you hopefully.
make a table named PL history, now give it three fields, with ID, PL_DATE and PL_RATE, you need to insert new record in to that daily. if you want it to be more finer, add another column as PL_TIME as well. now when inserting the PL_Transaction, make sure that you enter time to that table as well.
Once it is done, make a view and like the transaction table with the respective PL_DATE and PL_TIME if you incorporate time, this will ensure that you pick the right PL specified during the transaction. YOu can do it behind the generate report button, will take no time to execute.
JUst call that view to the report, and get your specific PL using the formulas,
I tried calling a field to the report mannualy, it did come to the report, but it could not be called to the formula editor so , I thought of this solution , may help. thanks

Related

When using QUERY, how can I make it so that data moves together when using filter?

I am creating a tool for a video game I play.
Link to the example spreadsheet (Please make a copy to edit so that this copy stays intact for additional helpers).
Sheet 1 is “Choose Owned”. It contains a list of all of the champions available in the game and includes their attributes.
Column A contains checkboxes. Checking a checkbox indicates that the user owns that champion, and brings it to Sheet 2.
Sheet 2 is called “Owned”. It contains a list of the champions checked off in “Choose Owned” (aka the champions the user owns). “Owned” includes the champion attributes too, as first seen in “Choose Owned”.
Beyond those same attributes, “Owned” contains 8 additional columns.
These columns are from Columns G:N and are labeled ‘Level’, ‘Rank’,
‘Ascension Lvl’, and ‘Team Label(s)’ (‘Team Label(s)’ takes up
columns J:N). This data is all unique information and requires the
user to input the information themselves depending on their
champions.
Because there are so many champions, I want the user to be able to use the Filter function in “Owned” so they can easily locate the champion they need or sort the table however they wish.
However, because I use the QUERY function to get the data from “Choose Owned”, the Filter function tends to break. The most obvious error comes when you try to sort A-Z or Z-A; this simply cannot be done. I was fine with this, and have even included a note at the top telling the user to avoid sorting alphabetically.
Everything else works correctly until the user tries to add a new champion from “Choose Owned”. When the champion is added to “Owned”, the additional, unique data in columns G:N go out of order because they don’t move with their original champions.
Example:
I choose my champions. These champions are copied to “Owned”.
I pick their relative data in columns G:N.
A few days later, I obtain new champions and check them off in “Choose Owned” so they are added to “Owned”. However, when I do this, the champions stay in the same order as they are in “Choose Owned”, and columns G:N do not move with their champions so now, that information is with the wrong champion.
I want the additional data (G:N) to move with their champions when the table is edited due to champions being added. Or, in other words, I want those columns to stay linked to the first columns.
If there is a different way to achieve all of this like if I have to use a function other than QUERY, that is fine!
Please share any solutions you may have. I would prefer to not use a script but will consider the idea if it works.
this is a common issue within Google Sheets and it's solvable in 2 ways:
either by introducing a common value (unique ID) and then linking the manual input to query and aligning it by ID
or easier approach in your case - using timestamp/linear ID so every new entry would be added to the bottom and then the query would be sorted based on this order.

better design for fact table where each row has a Start & End Date

My fact table contains details for clients who attend a course.
To ensure i can get a list of clients registered on any particular day, I have not related the date dimension to the fact table.
Instead i created a measure that does basic between logic (where startDate <= selectedDate && endDate >=SelectedDate)
This allows me to find all clients registered on one single selected day.
There are a few drawback to this however:
-I have to ensure the report user only selects a single day, i.e. they cannot select a date range.
-I cant easily do counts for samePeriodLastMonth or Year.
Is there a better design i should consider that will still allow me to see counts of registered clients on any given day, along with allowing me to use SamePeriodLastMonth/Year functionality?
Would you mind uploading the structure of your fact and dim tables?
Just a thought bubble: if you would like to measure counts for a program over calendar years, I believe you would definitely need to create a Date dimension. Also depending on your reporting needs you might want to consider whether you need an Accumulating Snapshot Fact table.
Please find further details on this:
http://www.kimballgroup.com/2012/05/design-tip-145-time-stamping-accumulating-snapshot-fact-tables/
Cheers
Nithin

Is it safe to "search" creating db records in Rails?

I need to build a search form including some fields like "city, price range, key word and date". I saw this video which is recommending to create a "searches" table. Every time any user made a search, it creates a table row in the db, and show the results depending on the submitted fields.
Seems easy to build but is it safe? I mean, if this is used in the practical world, I think we also have to use "I'm not robot" from Google.
https://www.youtube.com/watch?v=QRE7KxIvUb4&t=29s
Any idea is welcome.

Hyperlink from a count query to extract associated data in access

I have a Count query that uses multiple criteria to produce a result looking like:
count ID
1 "abc"
4 "bcd"
5 "def"
1 "cde"
This shows how many times the ID appears in a given database. The datasource is through an odbc connection that updates automatically. So the ID values change everytime it is opened. I would like to try to turn the unique ID or the associated count into a hyperlink that when clicked will return all information involved in the count (*note the database has much more information associated with the ID's than is counted, a date range of the previous three months is applied.) Can this be done simply?
Database format:
ID Instance Device DateBeg DateEnd
Thanks in advance,
LP
The short version -
This should be simple to do using a report (but could also be done using a form I will be explaining how to do a report for this version). You would just make a report that includes all of your fields then call the report on click. It is important to mention that you will need to view the query via a form to make this work.
A more detailed version -
The first step will be to make a form based on your query (you will not be able to do this directly from a query). To do this select your query then click on the create tab then click Multiple Items Form. Adjust as needed.
Then create a report that shows ALL of the records how you want it to display. (I will call it rpt_ViewDetails) (we will limit later)
When you are done adjusting click on the field that contains the "abc" etc. results (if this is a calculated field it will be more complicated.) I will call this field "Criteria" for the example. Go to the events tab on the property sheet (in design view). use the On Dbl Click event and go to code builder.
This is what the code would look like (place in between the private sub.... and the end sub lines of code):
DoCmd.OpenReport "frm_ViewDetails", acViewNormal, , "[Criteria] = " & Me.Critera
Let me know if you have any trouble with this, also let me know if the structure is different than I am assuming, I will need a more detailed report of what the query is doing if this is the case, what the structure of the database is etc.

How to handle Append Only text fields in a Sharepoint DataSheet view?

We've created a Sharepoint site to track a process. Eventually we're going to make a workflow out of it, but in the meantime there's a list we all have to look at which lists the various dates each piece is supposed to be finished.
So basically My group needs to see and update columns X, Y, Z and Comments while ignoring the other 30 billion or so columns. Which is great in datasheet view because we can easily view our columns, and update them right there without drilling into the item and browsing through all the other crap we don't need.
The problem is the Comments field, in which we really need to see the last actual comment made. Unfortunately whenever anyone saves the record the field is updated with a blank value (unless they entered a comment) and the last actual comment is lost unless you drill into the item.
Is there some way to get the Datasheet view to show all the entries?
I should also note that I know very little about Sharepoint 2007... so detailed answers would be nice!
Append-only comments are implemented with the version mechanism, so in the Datasheet View you're seeing every row update as a new version of the item with a new comment. In normal data views this logic is handled by the AppendOnlyHistory control. I don't know of any way around this behavior for views that aren't history-aware like the Datasheet.

Resources