Quantcast
Channel: SCN : All Content - SAP Crystal Reports
Viewing all 4716 articles
Browse latest View live

Can you export out a band suppression formula in a report definition file

$
0
0

Hello,

 

We are trying to export out all the formulas in a crystal report with Crystal 2013.  We are exporting the report out to a Report Definition file.  We are seeing most of the formulas but we are missing the band suppression formulas.  Is there a way to get the band suppression formulas to export in a Report Definition file?

 

Matthew


Report with dynamic SQL and variable number and order of columns

$
0
0

Hello,

I use crystal reports 2013.

 

I have 30+ reports with different queries. However we find it a little bit too hard to maintain them and I am wondering if it is possible to make just one report file and pass the SQL query to it.

 

I tried passing query as a parameter select * from ( {?query} ) .

 

My query is something like SELECT  first_name  as col1, to_char( kids_count as col2 from person where person_id  in (....) ;

Second version of the query is " SELECT  to_char(kids_count ) as col1, first_name  as col2 from person where person_id  in (....) ; "

However the data no matter that it is all chars is different type and crystal reports doesn't like this and returns null values no matter that my query returns results.

 

Third query of mine will be like SELECT to_char (company_nr)  as col1, to_char(numberplate ) as col2 from vehicle.

 

 

 

Can you give me some tips how this can be done, please?

 

 

I am also starting to consider using different tool or something else to create dynamic reports.

Any suggestions?

Create Cost Center Report for Department

$
0
0

Hello Friends,

 

Can you guide me to create a cost center report for a department.

What is required to pull such a report.

Everyone feedback would be highly appreciated.

 

Thank you,

Pammi

How to change the parameter value in crystal report parameter prompt? After click on refresh.

$
0
0

Hi,

 

 

 

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

using CrystalDecisions.Web;      

 

protected void Page_Load(object sender, EventArgs e)

{      

  ReportDocument myReportdoc = new ReportDocument();             

  myReportdoc .Load ( Server.MapPath("CrystalReport.rpt"));            

   myReportdoc.SetParameterValue("My Parameter",Parameter Value);           

    CrystalReportViewer1.ReportSource = myReport;

}

 

i'm able to pass value to parameter like having Username,Location parameters so that on with out displaying default parameter prompt able passing the value. after report loaded when i am click in refresh button  i'm able to pass value to parameter but on default parameter prompt  for Username,Location  it is showing for Parameter Prompt.

Creating a Grid Layout of DataSet Information within a Group

$
0
0

I am trying to create a section in Crystal Reports that will produce the layout in the image BelowConsistent.jpg:

The reports DataBase is a DataSet that is passed to the report from my C# application and for purposes of this example, there are two tables; "Consistent" that contains the one row for each 'Prescribed Medication' and 'Comment' and linked to a 2nd table "CResults" which contains one row for each 'Expected Metabolite', 'Amount', 'Cut-Off' and 'Interpretation'. Note there may be one or more rows in the "Consistent" table and one or rows in its related "CResults" table.

 

By using two Groups (one for the "Consistent" table that contains the header text and a 2nd group that contains fields for 'Medication', 'Expected Metabolite', 'Amount', 'Cut-Off', 'Interpretation' and 'Comment'.

 

In the 2nd Group I have come close to reproducing this format by using "lines".  The vertical lines to the left and right of Medication Field and Comment field are set to "Extend to Bottom of section when Printing" and a horizontal line under the Medication Field and Comment Field set to "Move to bottom of section".  Each of the "CResults" field are "boxed". One Horizontal line covers from the Metabolite to the Interpretation to form the bottom of each cell for the 4 parameters.

 

The issue I run into is the the last Horizontal line (under Medication and Comment) do not line up with line under the 4 parameters (it is a line width too low).   I have tried this with both using the Horizontal Linn under the 4 parameters as well as using a Bottom Border for each of the four fields with the same issue.

 

I also understand that this may not even be the correct approach and I am open to trying other approaches.  Also as the DataSet is produced by my C# Application I can control the Schema and it can be changed is required.

 

Any help here would be greatly appreciated

 

Neal Flora

How to capture the latest status in a crystal formula

$
0
0

Hi All,

 

I have the following loop in my crystal report to calculate the days between when a First "In Progress" Status occurred in the data till the status went into a "On Hold" progress. .

 

 

 

shared numbervar diff;

shared datevar start;

shared datevar end;

 

 

if {NAME} = 'In Progress' then

    start := date({DATE_TIME})

else if {NAME} = ['On Hold', 'Fulfilled'] then

 

 

(

    end := date({DATE_TIME});

    if start <> cdate(0,0,0) then

    (

        diff := diff + DateDiff('d',start,end);

    );

    end;

)

 

I want to exclude the days between when the Status was "On Hold" to the Next "In Progress" and stop the counter if it encounters a "Fulfilled" status.


However, sometimes my data has multiple "Fulfilled" statuses and hence the code above doubles the days between for every time a "Fulfilled" status is encountered.


Here is an example:


DATE_TIME     Status               Days between as per formula

01/01/2016     In Progress               0

01/17/2016     Fulfilled                     17

01/17/2016     Fulfilled                     34    

01/17/2016     Fulfilled                     51

01/17/2016     Fulfilled                     68


Is there any way to modify my code above to calculate the days between only till the first occurrence of the "Fulfilled" status and stop the counter at that point?

Why does record selection return different results for logical operations

$
0
0

Hi All,

 

I have created a formula in the record selection that restricts the records when Status = 27 and I get 44 rows back. When I do not have a restriction on the report, I get 808 rows back.

 

Ideally, when i put a filter for Status <> 27 the report should return me 808-44 = 764 rows, however I keep getting 1677 rows instead and I am not sure the reason for this.

 

Please note that this report calculates summary fields for Sum in the group headers and Distinct Count for the group footer totals.

 

Any thought on why the report is showing this behavior?

Complex report from a DataSet passed to Crystal Reports

$
0
0

First let me say I have tried to find a "Consultant" that could help me with experience in DataSets to no avail as of yet.  If there are any resources anyone knows about I would be interested.

 

Now onto the issue;

My report is driven from a DataSet passed to it from a C# application.  (note that I have control over the DataSet Schema and Data therein.)

"Copy of PrecDX Lab Report_Example for APV.jpg" is one of the reports I need to generate ("PMREPORT")

 

Up until the inclusion of "PMREPORT" my reporting works fine using the Following Approach

     I created a "TOP" level report that consisted of several "Detail" section each of which was a different report;

          Detail A: Subreport "Sample"

          Detail B: SubReport "Drug"

     The "TOP" reports DataSet simply was a single table with one row and two columns; "standard" and "drug".  If "standard" = "No" then Subreport "Sample" was suppressed and if "drug" = "No" then Subreport "Drug" was supressed

     My C# Code passed the DataSet for SubReport "Sample" to that Subreport and the DataSet for "Drug" to tat Subreport.  This all works fine.

 

In attempting to create the same scenario for the "PMREPORT" I ran into the issue of producing this report to closely resemble the attached example.

As can be seen by the example, there are six "sections" (I used grouping for each section)

     "Header" that includes the Reported Clinical History

     "Consistent" that has one or more Medications

     "Inconsistent" that has one or more Medications

     "Present" that contains one or more Medications

     "Reported but not tested" that is sinfle field

     "Specimen Validity" that contains one or more tests

     "Footer" that contains the disclaimer text

The problem is in the "Consistent", "Inconsistent", and "Present" groups.  To the right of a given Medication there are four columns and one or more rows ("Results").  To the left of this is a Comment.  Trying to accomplish a layout (grid around each of the"Results", Box around the Medication that grows depending upon the number of "Result" rows, and the box around the comment that again grows depending upon the number of "Result" rows.

 

To follow this through we look at one section Consistent.  My original approach was to group on "medication" (a group that was not output), then group on "Results". I placed a Box on the left that "extends to the Bottom of Section when printing" and placed "medication" inside the box, then to the right the 4 columns of the "Results" using lines to create the grid, then to the right of that a Box (also extends to the Bottom of Section when printing) placing "Comment" onside of it.  This does not work because when there is more than one Row in "Results" the section is repeated for each row so there is a "Medication" and "Comment" box output for each "Result" which defeats the purpose.

 

The solution would be to use a SubReport as the "Results" but my understanding is you cannot pass a DataSet to a SubReport of a SubReport.

 

Any solutions to this issue would be greatly appreciated.


Printer name on report

$
0
0

Hi,

 

I need to show/print printer name to which the report is been printed on the Crystal Report.

Is there any function or method returns the printer name ?

Report Page Header from sub report

$
0
0

I have created a report where there 6-7 sub reports.

Main report has a header i.e H1.

when the report moves to the sub report 1. the page header becomes H1+H2 where H1 is header from main report and when the page where the sub report starts the page header will concatenate H1+H2.

 

Regards.

Maps in Crystal Reports 2013

$
0
0

I have been asked to create a report that will show on a map visited locations by users in the field. Since our staff have to "check-in" when they arrive and leave a location we record the grid coordinates in a mobile application. Management would like a Crystal Report that plots those coordinates to study travel patterns of staff. I see that Crystal 2013 allows for inclusion of maps in a report, but when I add the map and supply it the coordindates to plot the map does not show on the report. What could be happening?

 

Thank you.

colorsin diagram don't fit with legend

$
0
0

Hi,

 

I have a silly question.

 

I created a diagram with legend. In the tab that I thought was used for choosing colors, I have 4 different colors. I thought that these colors would reflect in the graph itself bu it doesn't seem to work this way.

 

What am I doing wrong?

 

I have attached 2 files, one of my graph and one of the chosen colors

 

Thanks for your help

Code39 Barcodes - spaces??

$
0
0

Hi anyone/everyone,

 

I'm having an issue using the StringToCode39 function in Crystal Reports XI.

 

I'm trying to create a single barcode using data that has spaces.  In this case, that data is "ROW 2 A-1".  However,  the barcode is generating with large gaps, basically like separate barcodes for each space.  Is there a simple fix I can enter in the formula for this?  I'm a beginner with Crystal Reports. 

 

 

Appreciate any help!

Is it possible to suppress a details section based upon another details section?

$
0
0

I'm trying to get a handle on something at work. So we have information on clients (that is the same) being entered on one of 4 different tables (don't ask.)

 

In order to run a report i linked all these tables separately to one table and created a separate details section for each of the 4 tables. I'm trying to catch results where the status is either "draft" or null. Now my results produce something like this.

 

 

 

 

Staff Member: Staff Member 001

 

Header 1Header 2
ClientStatus

123 (Table 1)

123 (Table 2)Final
123 (Table 3)
123 (Table 4)
303 (Table 1)Draft
303 (Table 2)Draft
303 (Table 3)
303 (Table 4)
901(Table 1)
901 (Table 2)
901 (Table 3)Draft
901 (Table 4)
999 (Table 1)
999 (Table 2)
999 (Table 3)
999 (Table 4)

 

 

 

What it would ideally look like is 

 

Header 1Header 2
ClientStatus
303 (Table 1)Draft
901 (Table 3)Draft
999 (Table 1)

 

 

So nothing for client 123 would show up at ll because they were listed as final in the second table, 303 lists the draft in table 1 only, 901 lists the draft in table 3 only and 999 lists table 1 because all 4 tables returned null values. Is any of this possible?

how can i fixed this problem

$
0
0

    please help how i can fixed CrystalReport viewer

 

hata.jpg


How to assign an element to another report object

$
0
0

Hi,

   

I hope anyone could help me to solve my problem with a report. I am trying to assign an element to another object which is only available on higher level.

 

For instance it looks like this:

 

Level

Object

Attribute

1

  1. BG.T

   EM

   3

  1. BG.TA1

#

   3

  1. BG.TB1

#

   3

  1. BG.TB2

#

1

  1. GG.T

   A

   3

  1. GG.TA1

#

   3

  1. GG.TR1

#

The aim is to show the attribute from level 1 at all belonging objects below. It is like an inheritance.

The technical number of all related objects is identical on the first three digits; excluding the point.

 

Is there any possibility?

 

Thanks in advance,

Uli

Crystal reports Displaying column data in one row

$
0
0

I want to display few rows of data in a one column and i am using the below 3 formula method:

Group header

WhilePrintingRecords; Shared StringVar hazards := ""; If Not InRepeatedGroupHeader Then hazards := ""; 

Detail section

WhilePrintingRecords; if ( {CARRIERLOADBYJOB.REDUNDANT_STOCK_ID} in StringVar hazards ) then StringVar hazards := hazards else StringVar hazards := hazards + {CARRIERLOADBYJOB.REDUNDANT_STOCK_ID} + ', ' ; 

Footer section

WhilePrintingRecords; if length(trimright(StringVar hazards)) > 1 then StringVar hazards else StringVar hazards := left(hazards, (length(trimright(hazards)) - 1)); 

expected result is 80045,85263

but i am getting a result as 8920,5269,80045,85263

few additional records from the different is getting accumulated for the result. any help to omit the additional records

I want to filter the data in the report based on a condition

$
0
0

I have a condition and need to filter the data displayed in the report based on that condition. I have no idea how to do this. any help below is my condition

 

( {IVRDVUBYOVERPRINT.LATE_AREA_SECTIONS} / {IVRDVUBYOVERPRINT.TOTAL_SECTIONS}  ))*100  < {IVRDVUBYOVERPRINT.IVR_RED} 

using array across groups

$
0
0

i want to use array variable across groups...

 

Report has 3 groups trying to use the same array variable it looks like reset once the group completed. started with default value on the next group.

Need Help In Scheduling Crystal report Instance with Default Prompt

$
0
0

     Hi,

 

I have a Crystal Report created over BEx query where I have a Mandatory Prompt of Fiscal Year. Now the BEx query is designed in such a way that it by default picks up the Current Fiscal year.

 

Now I have created that report and was trying to schedule a report So its asking me from prompts I can give it to 2016 since its the current Fiscal year. But in future if this instance is run it will pick up 2016 itself since I have saved the instance with the same value.

 

SO my question is. Is there a way I can schedule the report in such a way that it picks up the Fiscal year on which instance runs.

 

Note: I can't put record selection since this report can be run manually as well for any specific Fiscal Year selected by End user.

 

Any help would be appreciated. Thanks in advance.

 

Regards

niraj

Viewing all 4716 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>