How to distinguish records in two different runs in Crystal Reports? - crystal-reports

For instance on Sept 1st there were 5 records in the report.
When the report ran on Oct 1st there were 7 records, so basically there were 2 new records added.
Is there way to mark/highlight those new records in the report export? They don’t have any date fields associated with them which makes job little challenging i guess.
Any hint is appreciated!

One option is to use a UFL (User Function Library) that provides functions for writing/reading info to/from text/excel/ini file/registry/database.
You would use one function from the UFL to lookup the info for the current record in one of these alternative data stores. If that info is found, you can suppress that record. And if it's not found, you would use another function from the UFL to write identifying info from the record so it can be looked up on the next run.
You can create your own UFL or see list of 3rd-party UFLs maintained by Ken Hamady here.

Depending on the database you're using you could create a "command" in Crystal Reports, which both queries from database and writes back the records that were retrieved into some kind of a logging table.

Related

{EpicorERP} Running a Report to see what users are doing/printing

I was wondering if anyone had a method of running a report to see what a user is doing in Epicor or what they are printing. We are having users report that in the middle of the night, when no one is here at the plant, there are 500 page reports being printed. We are able to see in the print queue who printed what, but the report doesn't match up with anything in our system. We would have for example a report called DailySales.rpt, but in the printer queue it would be something like hb986a87dthr.rpt. Just wondering if anyone else has seen this, or would have a solution that would let me see what a user is printing.
It is not possible to link the print job directly to the SysTask record because neither the print job number, the temp file, nor mac addresses are saved in Epicor for cross referencing. It can be approximated by looking at runtimes and the SysTask record.
You can create a BAQ and BAQ report to display Active and recently completed SysTask information by user. This will give you the report run, start/end times, user, and current status. If you need more detailed information such as the criteria used in the report, you can also join to the SysTaskParam table. Keep in mind that the SysTaskParam table is fully normalized by field name, so you may want to join multiple copies of the table with specific criteria if you need a lot of information. Unfortunately, for "print all pages" jobs, Epicor doesn't know how many pages the report will be until after the data is instantiated and then it is rendered in the reporting software, so you won't be able to get any estimate of number of pages or size.
There are many strategies for mitigating the issue you described. Here are a couple:
You can use criteria within the BAQ to limit the number of records returned for a specific query
You can create a subquery criteria from BAQ parameters to return no data when abnormally open parameters are used for the report (e.g. > 30 days range). You could also use this method with time gates based on the current system time.
Retrain users

Is it possible to schedule refresh different parts of a dataset?

I have a report on PowerBI that has many pages/tabs and each one also has alot of data being displayed. As I didn't design this, I'm going through the report to eliminate as much as I can and possibly splitting the report as alot of the data only requries refreshing once a week.
This is where my query comes in, I have information on one page that requires a refresh every two hours over a 12 hour duration, one field of data that requires a daily refresh and two more fields only require refreshing when required.
Is it possible to segment scheduled refreshes throughout a single part of the report, or does scheduled refresh only allow the entire report to be refreshed? (I.E. Sales status is hourly, Outbound status is daily, and sales summary is weekly)
I'd rather avoid having to split reports, as it is very handy to have them on one page; rather than having to open two and view them on multiple monitors.
I am just starting out on PowerBI reports, having been shown enough to get what I need done; but plan to delve further in, this being my first port of call if it is possible.
Thanks for any reponses in advance.
Brian.
No. It's Not Possible.
PowerBI Internal working like Tabular Model.
In Import mode we can not do incremental refresh also.
So other option is you can create Reporting layer and define denormilized with calucaluated columns Reporting tables.( Sales ,summary )
and use Direct query or Refresh and Do ETL for This table.
So you can schedule ETL for specific Tables i.e.Sales or summary.

CRM 2011 and SSRS - Generating a report for a single record

Is it at all possible using CRM 2011 and SSRS to generate a report on a single record, and only get results for that one record?
EDIT
Additional Info - Must Use:
Custom SSRS report
Custom entity in CRM
Here's a more specific link to your question: link. You're probably looking for pre-filtering (look for "3. Pre-filtering Element" in the link provided) if you want the report to be record specific (context sensitive).
Here's a link describing the 2 types of pre-filters (CRM 4.0 but the theory applies to CRM 2011): link. And here's an example of prefiltering in CRM 2011: link
I have done this successfully in CRM 2011 with a completely custom report made in BIDS, on a custom entity, with full context sensitivity.
Make sure to learn fetchXML as it's going to be the going forward technology for these reports. The existing reports are using SQL which make them bad examples to copy off of.
Here's an example on how to extract fetchXML from an advanced find: link It also has more information on pre-filtering.
Take a look a the report Account Overview.rdl. It could be executed for a single account record or multiple records.
See Reporting for Microsoft Dynamics CRM Using Microsoft SQL Server Reporting Services
Create an embedded connection to the CRM database engine for the environment you want to target.
Create an embedded dataset to query the current record. This going to be kind of weird since experience will tell you that you are going to get tons of records, but because of the clunkiness behind CRM it will actually only get the current record. For example, if you wanted to get the current quote you would use "SELECT quoteid FROM FilteredQuote AS CRMAF_Quote"
Add a parameter to store the reference to the entity you just queried. In keeping with this example I created #QuoteFilter which is type text, could store multiple values (even though that's not what we're using it for), and gets its default value from the dataset in step 2. Also, probably ought to make this hidden since GUIDs aren't end user friendly.
Finally, use the parameter discovered in the where clause of the other datasets. For example, a search on quote products for the current quote would look something like SELECT * FROM FilteredQuoteDetail WHERE (quoteid = #QuoteFilter)
As a final note, you should keep in mind that CRM loves to remember everything even when you don't want it, too. On one of my reports I messed up my datasource and CRM was forever convinced that the report should run against all records. I fixed my datasource, but uploading the report did not trigger a refresh and correct the problem. In the end, I deleted the report from CRM, created a new one, uploaded the same exact file with no changes, and everything worked. Go figure.

Reporting within CQRS

I'm trying understand CQRS to see if it can help out in an reporting environment.
Problem: An CQRS designed system is already in production, happily generating commands, events and updating the necessary query views. A new report is required. This report takes a number of parameters; Start Date, End Date, Product Type, and Product Category.
How do I generate the aggregate views for:
A query store that will initially be empty
And, can pass parameters with very different values
Do I try and solve this using a CQRS approach, or is there a better alternative?
Thanks
If it is not reasonable to precompute all your report data into flat view, then just don't do that. You may want to join a bunch of tables for your report. It's your decision what can be precomputed, and what is not worth it (cpu, storage considerations).
In your particular case (StartDate, EndDate,..) - i can't see what is the problem to generate a single ViewModel table for it, and just query directly against the parameters.
Figure out which events are required to gather all report data.
Query all those events, republish them to the endpoint that handles updating the new report table(s).
Wait until all events have been processed.
Put some indexes on the columns that will function as report query criteria.
Done!

Adding a new group in Crystal Reports causes all of my existing groups to disappear

My problem in a nutshell: I create a new report, I insert a number of groups one at a time, and everything goes fine until I add the final group and suddenly I get zero results back for the entire report.
I'm new to Crystal Reports, so I'm not even sure I'm using the right vocabulary, and I'm sure this is one of the reasons I'm having such a hard time googling this. I have a book I'm going through (Pro VS 2005 Reporting Using SQL Server and Crystal Reports) but it's very specific about putting forth a set of steps to follow and it doesn't really explain the why of things.
I'm using VS 2005, C#, with built in Crystal Reports; I don't have a fancy stand alone version.
I am creating a DataSet and passing it into the report as the report Database. The DataSet has four tables: a user table (which includes a user Group ID), a course table with a list of courses that the user has taken, an exam details table with details about each exam in the course (including an exam score), and a topic details table, with information about exam topics (including a score for each topic on the exam).
I can add a user group group, a users group, a courses group, and an exam group, and return the details for each exam. But when I add a topic group everything disappears. If I add a topic group by itself I see a list of topics, but making the topic group an inner group of any other group only gives me a blank report.
I checked and I have relations defined between all my tables that should indicate which topic goes with which exam, etc.
Let me know if you need any additional information. I'm sure this is something simple that I'm overlooking because I don't have a dedicated Crystal Reports book.
Can you try and re-create the essential SQL that is being used, directly in the database? It sounds like you're getting data back until that last group is added, and that makes the query now return an empty set.
One of the remedies I found was removing underscore from sql fields, to keep the other tags from disappearing. I was initially having the field "abc_xyz" in sql, had to change it to "abcxyz" to make it work in crystal.