How to program crystal report to lookup a record in a table - sql

i Have a Table with Fields
Material Number
Order Code
Supplier Code
Description
I have a crystal reports rpt file that i manually enter all the information to generate labels.
I am trying to program this using the built in formula editor, so when i enter the Material Number (which is a unique code) it will automatically display other 3 relevant fields.
I have tried few formulas in the formula editor without any luck.
can anyone help?
relliK
UPDATE
#Siva - I have added the table for clarification
i simply want a lable printed with only one user input being the Material Number, and then the code/fomula in crystal reports to fetch the other data based on the Materila number and produce the label.
thank you for you interest in this issue.
UPDATE
#Siva - I have added a sample label, i would only want to enter 20506871 as Material and the other data fields to be pulled from excel
not sure if i can use parameter fields and/or i would like some help on programming the parameter fields

Related

SSRS: How To Create Dynamic Report With Multiple Subreports?

I am still fairly new to SSRS, and I do not know what I need to/can provide as examples to help clarify my issue.
I am developing an SSRS report that accesses a NAV database and generates a report for an equipment number. My task is to generate a master report that can print multiple of those kind of reports(currently 10 max). I am using sub-reports to get the content that I need for an equipment number.
I am looking for a way to make this dynamic, where I can generate 1 to n sub-reports based on how many values were picked for the multi-value parameter. The end result should be one PDF file that contains the full report for each equipment number listed. I am trying to only use SSRS.
I have seen where I could hide sub-reports then make them visible if a condition is met, but this isn't the functionality that I am looking to use. So, what would be the best way to dynamically generate sub-reports based on a multi-value parameter?
I figured it out. I made the sub-report parameter equal no value. I made the main report with a parameter that can select multiple equipment numbers, a list, and a data set which filtered down to the appropriate equipment numbers to avoid duplication. I made the sub-report object in the main take in the cell value from the list equipment number. When the list proceeded to the next row, it copied all of the objects in the box area.

Displaying Multiple String Values as separate fields in Crystal Reports

I'm a bit of a noob with crystal reports so be as detailed as possible.
I'm working with two fields in a report, "CRD_NAME", and "CREDIT_CARD_AMOUNT". I can right click the former to browse data and see the credit card types: AMEX, VISA, DISCVR, and MASTER. When I drag this field out to the report, it will only display one value (currently "AMEX").
When I place the Credit_card_amount field under this, it will properly display AMEX totals for that day. Browsing data on this field shows all of the CC totals, and I'm not sure how to associate them with a card type.
What I'm looking to accomplish, is to have CRD_NAME repeated in 4 columns, displaying the different CC types, and the correlating totals under each one. Do I need to create multiple parameters for each field and what I want it to represent?
Any clues would be much appreciated :)
Your best bet might be to create a "Cross Tab" crystal report. When you create a new crystal report, cross tab is one of the options.

Crystal Report charts with strings

I'm trying to create a chart in crystal reports that displays count(x) on change of A , B
it's supposed to show number of merchants "count(x)" who paid "B" for each region "A"
the problem is that on Data tab in chart expert, on the available fields, it shows only the numeric fields "e.g: region ID / payers ID" while i want it on change of names not ID
*Note: they're already displayed on the report so it's not a connection/command problem
I tried to check all the types that CR accepts in charts and it were numbers / date / varchar
the fields in my DB was "nVarchar(MAX)" I tried to change it from DB, but CR didn't get affected by this change (God knows why!) and also even if it got affected this will result in other problems , so I thought about changing the type from the CR itself and it really worked
right click on "Formula fields" > New > name your field
then in formula workshop write:
CStr ({table_name.field_name})
while creating your chart, made it on change of the field you've created
I hope it helps as I've made a lot f research and came across many facing the same problem without a working solution

Access 2007 - drop down box in a Report

I need to create a drop-down box so that an employee can select a pre-set reason in the "RE:" field of a Report. There are only two selections that need to be in the box: "personal events" and "lack of adequate notice".
The report itself is already made and there are a number of fields that link back to the database - name, address, specific dates, etc that are already in the report. I've figured out how to make the drop-down box using the combo box function in a form but is there any way I can merge the combo box into the report?
I'm a beginner, by the way so I'm still figuring things out.
Currently your report sits on a query (query get relevant data from the table)
Steps to follow:-
Change the table by adding a column with the two options you just
mentioned above
Add combobox to Form with items as the two options
Adjust your query to use these options as a criteria to change
results returned by the query
Show the results in the report as you are showing right now.
If you have a code already, please post that snippet. So we can help you accordingly.
Some reference for you to get ideas
BUT I HAVE A DOUBT, ARE YOU TRYING TO SAY YOU WANT TO SWTICH BETWEEN TWO REPORTS BASED ON THE USER CHOICE SELECTED IN COMBOBOX?

Images in Crystal Reports

I am working on Windows Forms Projects.
I am creating a report for customers.
The report data is pulled from a "CustomerDetails" table.
A field in the table is called "CustPhotoName", this holds a string which relates to an image file.
I Currently have a report set up which runs for a single customer by passing in a customer ID. Then using the passed in ID to populate a Dataset with an ImageRow and then a sub report with the image from the dataset.
I am wanting to set up this report where I can pass in an array of customer IDs and produce the reports (1 page per customer with image (if CustPhotoName has value))
Please can someone let me know how is the best way to do this for the multiple customers.
Add a CustomerID parameter to the report. Type Number. Set it to allow multiple values. In the report's record-selection formula, add the following:
AND {table.customer_id} IN {?CustomerID}
You probably want to group the report by {CustomerID} as well. In the group's footer, select Section Expert and check New Page After. This way each customer will start on a new page.